mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
95ef1bf62e
* Add addiitional files from upstream * Remove mis-added files * Swift3: Properly percent-escape path parameters This change fixes the following issue: https://github.com/swagger-api/swagger-codegen/issues/6400 The problem was that path parameters were not properly percent-escaped before being placed into the URL path. This leads to creation of an invalid URL, which then fails. So therefore, in the API template where path parameters are handled, we propertly percent escape them, using the characters which are allowed in URL paths. In addition to this template change, then this PR includes the following changes: 1. Resulting changes in all generated code due to the above template change. 2. I added the objcCompatible run to the swift3-petstore-all.sh so that I could re-generated all of the generated code with a single script. 3. I added a unit test in UserAPITests.swift which verifies that paths are properly escaped. 4. In order to make the unit test work, then I needed access to RequestBuilder<T>.URLString to verify that the path was properly escaped. However, RequestBuilder<T>.URLString had "internal" access control so it was inaccessible from the unit test. So therefore, I made four contants in RequestBuilder<T> to be public. This should not harm anything, since they are constants ("let's") and cannot be changed from the outside of the class after initialization. 5. There were also some stray changes which look like they were caused by having not run bin/swift3-petstore-all.sh in a while. |
||
---|---|---|
.. | ||
swagger-codegen | ||
swagger-codegen-cli | ||
swagger-codegen-maven-plugin | ||
swagger-generator |