Commit 7e40bff
authored
Fix double encoding of path parameters (#15)
Fix double encoding of path parameters
### Motivation
Fixes apple/swift-openapi-generator#251.
### Modifications
Use the already escaped path setter on `URLComponents` to avoid the second encoding pass.
### Result
Path parameters that needed escaping are only escaped once, not twice.
### Test Plan
Adapted the existing unit test to cover a path item that needs escaping.
Reviewed by: simonjbeaumont
Builds:
✔︎ pull request validation (5.8) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
#151 parent 902cfc7 commit 7e40bff
File tree
2 files changed
+3
-3
lines changed- Sources/OpenAPIAsyncHTTPClient
- Tests/OpenAPIAsyncHTTPClientTests
2 files changed
+3
-3
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
0 commit comments