Commit cdc23b5
authored
[Generator] Improve parameter handling of MIME types in content types (#646)
### Motivation
The generator piece of
apple/swift-openapi-runtime#113.
This is needed for APIs such as Kubernetes, that has both
`application/json` and `application/json; watch=true` in a single
operation.
Currently the parameters weren't taken into account, which could lead to
incorrect matching of content types.
### Modifications
Use the full MIME type, including the parameters, for matching.
### Result
More correct behavior, now we correctly handle multiple MIME types with
the same type/subtype in an operation.
### Test Plan
Added a unit test.1 parent e870f6b commit cdc23b5
File tree
2 files changed
+392
-114
lines changed- Sources/_OpenAPIGeneratorCore/Translator/Content
- Tests/OpenAPIGeneratorReferenceTests
2 files changed
+392
-114
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
0 commit comments