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

[Runtime] Improve parameter handling of MIME types in content types #113

Merged
merged 9 commits into from
Nov 19, 2024

Conversation

czechboy0
Copy link
Collaborator

Motivation

In service of an upcoming generator PR - to better handle parameters in MIME types.

This is needed for APIs such as Kubernetes, that has both application/json and application/json; watch=true in a single operation.

Modifications

Use the more modern OpenAPIMIMEType type for parsing and comparing content types, rather than the old naive logic that ignored parameter (mis)matches.

Result

More accurate handling of content types.

Test Plan

Adapted unit tests.

Copy link
Collaborator

@simonjbeaumont simonjbeaumont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, thanks!

@simonjbeaumont simonjbeaumont merged commit b820948 into apple:main Nov 19, 2024
25 checks passed
@czechboy0 czechboy0 deleted the hd-mime-type-params branch November 19, 2024 21:23
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.

2 participants