Skip to content

Media Types Registry #4808

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

Draft
wants to merge 4 commits into
base: gh-pages
Choose a base branch
from
Draft

Media Types Registry #4808

wants to merge 4 commits into from

Conversation

handrews
Copy link
Member

@handrews handrews commented Jul 22, 2025

[NOTE: This is only a "draft" to keep it from being published too early. It is fully ready for review.]

This registry groups media types by their data modeling approaches, and provides pages that give a brief overview of that approach as well as links to relevant OAS sections. The section titles and anchors are intended to work with 3.2 (so we should not publish it until 3.2 is published).

The summary and remarks are only intended to give the general idea of how the media types work, and what changes have been made from release to release.

This initial set only includes media types that are mentioned in the OAS, but the layout should work without needing any links to such sections. We'll have to decide how much detail to put if and when we start making additions outside of the OAS, which we hope to eventually do. The point of this is to not require a minor OAS version to add future media types, as long as they do not require new fields or Objects.

I omitted YAML since AFAIK it is rarely used in actual API payloads, and the OAS provides no guidance on how to handle YAML features that are not compatible with JSON. And of course for JSON-compatible YAML, you just treat it like JSON.

This registry groups media types by their data modeling
approaches, and provides pages that give a brief overview
of that approach as well as links to relevant OAS sections.
The section titles and anchors are intended to work with
3.2 (so we should not publish it until 3.2 is published).

The summary and remarks are only intended to give the general
idea of how the media types work, and what changes have
been made from release to release.

This initial set only includes media types that are mentioned
in the OAS, but the layout should work without needing any
links to such sections.  We'll have to decide how much detail
to put if and when we start making additions outside of the OAS,
which we hope to eventually do.  The point of this is to not
require a minor OAS version to add future media types, as long
as they do not require new fields or Objects.

I omitted YAML since AFAIK it is rarely used in actual API payloads,
and the OAS provides no guidance on how to handle YAML features that
are not compatible with JSON.  And of course for JSON-compatible
YAML, you just treat it like JSON.
@handrews handrews added this to the v3.2.0 milestone Jul 22, 2025
@handrews handrews requested review from philsturgeon and a team July 22, 2025 20:18
@handrews handrews added the registries Related to any or all spec.openapis.org-hosted registries label Jul 22, 2025
@handrews handrews marked this pull request as draft July 22, 2025 20:18
Copy link
Contributor

@philsturgeon philsturgeon left a comment

Choose a reason for hiding this comment

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

This is really good. There are plenty of examples of times tooling was unaware of a particular variant of multipart or whatever and because the spec isnt a good place to list potentially evolving lists of formats this is a great solution.

I edited one bit for more neutral language but it ofc made me chuckle.

Copy link
Contributor

@ralfhandl ralfhandl left a comment

Choose a reason for hiding this comment

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

+1 in general, with some questions

Copy link
Contributor

Choose a reason for hiding this comment

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

Add links to the mentioned OAS Objects?

handrews and others added 2 commits July 23, 2025 08:21
Add specification links, add parent sections, link to Objects,
use a name and description, use the name of the registry, add
some notes to specifications where appropriate.
@handrews
Copy link
Member Author

@ralfhandl OK I just added a lot of updates, including some you did not ask for :-)

@handrews
Copy link
Member Author

@ralfhandl Addressed both the remaining things. I just rewrote the Link Sets page a bit and I hope it overall makes more sense now.

{% endcapture %}

{% capture remarks %}
In addition to normal use as HTTP message contents or `multipart` parts, `text/plain` is useful with the `content` field of the Parameter Object or Header Object to work around the automatic percent-encoding triggered by the use of the `schema` field.
Copy link
Member Author

Choose a reason for hiding this comment

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

@handrews to update this for fixed percent-encoding / style stuff


{% capture remarks %}
In addition to normal use as HTTP message contents or `multipart` parts, `text/plain` is useful with the `content` field of the Parameter Object or Header Object to work around the automatic percent-encoding triggered by the use of the `schema` field.
In particular, cookies with multiple values are not well-served by `style: form` and are better modeled as text.
Copy link
Member Author

Choose a reason for hiding this comment

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

This too if the draft PR is accepted

Comment on lines +11 to +12
- name: application/json-seq
registered: https://www.iana.org/assignments/media-types/application/json-seq
Copy link
Member Author

Choose a reason for hiding this comment

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

Not showing up as registered, check why

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. 👍

@ralfhandl ralfhandl requested a review from a team August 8, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
registries Related to any or all spec.openapis.org-hosted registries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants