Commit 2081703
authored
Bump OpenAPIKit to 3.0.0-rc.3 and recognize more base64/binary encoding locations (#357)
Bump OpenAPIKit to 3.0.0-rc.3 and recognize more base64/binary encoding locations
### Motivation
In OpenAPI 3.1.0, the `format: ...` part of schemas is deprecated, and instead `contentEncoding: ...` should be used. Before this PR, we'd recognize the encodings defined in `format` but not `contentEncoding`, this PR fixes that and finds them in both locations. This required a bump of OpenAPIKit, which added support for `contentEncoding` in `3.0.0-rc.3`.
### Modifications
Change the type matching logic to first look at `contentEncoding`, if no special value is specified there, look at `format`.
### Result
`contentEncoding: base64` and `contentEncoding: binary` will now be correctly represented as their runtime types instead of a plain string.
### Test Plan
Adapted the unit tests.
Reviewed by: simonjbeaumont
Builds:
✔︎ pull request validation (5.10) - Build finished.
✔︎ pull request validation (5.8) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (compatibility test) - Build finished.
✔︎ pull request validation (docc test) - Build finished.
✔︎ pull request validation (integration test) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
#3571 parent 16668dc commit 2081703
File tree
4 files changed
+20
-6
lines changed- Sources/_OpenAPIGeneratorCore/Translator/TypeAssignment
- Tests/OpenAPIGeneratorCoreTests/Translator/TypeAssignment
4 files changed
+20
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
81 | 87 | | |
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
| 301 | + | |
302 | 302 | | |
303 | | - | |
304 | | - | |
305 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
306 | 312 | | |
307 | 313 | | |
308 | 314 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
0 commit comments