-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Encoding Object contentType
field: "comma-separated list of the two types"?
#3739
Comments
Side note: when I was looking at this area of the spec a few weeks ago while adding some multipart support in my implementation, I noticed that the schema specifies this field as a "media-range" format, which isn't a standard format. If one happened to use a custom jsonSchemaDialect that used the format-assertion vocabulary, validation would fail (as use of that vocabulary means that usage of unsupported formats will fail validation). Also, "inner type" in that paragraph needs clarifications. An example would help too :) |
"inner type" means whatever type is in the |
@OAI/tsc review request: Does anyone know what this was supposed to mean? |
Only allowing two media types makes no sense to me, especially considering we claim to allow wildcards. Considering the JSON schema mentions media-range my guess is that we were expecting to support this https://www.rfc-editor.org/rfc/rfc9110.html#section-12.5.1 media-range here. |
I think what was meant here is:
|
@mikekistler I'm 99.999% sure that's the same as saying a list of media-ranges (as is taken by the |
My reading of the BNF:
(and I certainly claim no expertise here) is that a "media range" can be either a specific "type/subtype" or a wildcard type with an "*" for either the subtype or both type and subtype. If that's right, then I agree that we only need to talk about "media types" and what was intended in the section in question is just a list of "media ranges". |
After a great deal of GitHub archaeology, I have determined the "two types" in question are "regular media types" and "wildcard media types", and not a limit on the list:
However, Anyway, this will get addressed in a new PR that is more comprehensive than the one I closed after @ralfhandl spotted that it wouldn't work. |
PR merged for 3.0.4 and ported to 3.1.1 via PR #3921! |
Docs for the
contentType
field of the Encoding Object in 3.1.0 read (emphasis added):In 3.0.3 it reads (emphasis added again):
Two types? Just exactly two? Was this meant to be "two or more types"? The 3.0.3. wording of "the two types" feels a bit different but no more clear to me.
The text was updated successfully, but these errors were encountered: