Skip to content

v3.2 Respect encoding in all Media Type Objects #4559

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

Merged
merged 2 commits into from
May 1, 2025

Conversation

handrews
Copy link
Member

@handrews handrews commented Apr 29, 2025

There is no reason to restrict use of the encoding field of the Media Type Object to Request Body Objects only. Not only does this exclude legitimate use cases of returning multipart content (particularly as we fix the support for multipart/mixed), it also complicates implementation by requiring the handling of the Media Type Object to be context-aware.

This is a rare change that both simplifies implementation and adds functionality.

  • schema changes are included in this pull request
  • schema changes are needed for this pull request but not done yet
  • no schema changes are needed for this pull request

There is no reason to restrict use of the `encoding` field of
the Media Type Object to Request Body Objects only.  Not only
does this exclude legitimate use cases of returning multipart
content (particularly as we fix the support for `multipart/mixed`),
it also complicates implementation by requiring the handlingn of
the Media Type Object to be context-aware.

This is a rare change that both simplifies implementation and
adds functionality.
@handrews handrews added the media and encoding Issues regarding media type support and how to encode data (outside of query/path params) label Apr 29, 2025
@handrews handrews added this to the v3.2.0 milestone Apr 29, 2025
@handrews handrews requested review from a team as code owners April 29, 2025 18:57
This removes request body-specific wording where it was present.
Copy link
Contributor

@lornajane lornajane left a comment

Choose a reason for hiding this comment

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

This definitely needs to make it into the release notes! Tools will have support for encoding, but may have actively removed support for that outside of request bodies.

@lornajane lornajane requested a review from a team May 1, 2025 16:16
Copy link
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

@handrews handrews merged commit e511664 into OAI:v3.2-dev May 1, 2025
2 checks passed
@handrews
Copy link
Member Author

handrews commented May 2, 2025

For posterity, the use case for this most recently came up in an API that provides a streaming multipart json response. Somewhere I know this "request body only" restriction came up in an older issue but I cannot find it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
media and encoding Issues regarding media type support and how to encode data (outside of query/path params)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants