Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Generator] Improve parameter handling of MIME types in content types #646

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

czechboy0
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant