-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Correct statement that media type */* is equivalent to application/octet-stream #1692
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
Comments
Note that the wording you quote is within a comment in an example, and is not a normative part of the specification itself. The section originally looked like this when first added, and in the subsequent movement of the This appears to alter the intended meaning of the (perhaps not ideally worded) comment. I take it to mean that any media type is acceptable in the OAS document (i.e. anything matching '*/*'), not that any media type is accepted by the described API, but I may be wrong. I'm sure we can find better wording (or remove the comment if it is just misleading). Thanks for pointing it out. |
Ah, I see! I do believe the comment is currently misleading. I should note, too, that the Swagger website is currently using the comment to inform a statement on this page (in the "requestBody, content and Media Types" section) and possibly in other places. Thank you! I will share this information with my teams. I do believe the spec document should describe what is accepted by the API. That's essentially the purpose of the spec, right? To define a contract the client can consume to understand how to interact with the service? In this sense, I don't believe |
Also reviewing the old version you linked, it appears to make the same statement except in reverse (that |
We shall remove the comment "# any media type is accepted, functionally equivalent to |
Great, thank you! I appreciate the quick response! |
Will be included in |
The OAS 3 documentation states:
application/octet-stream:
# any media type is accepted, functionally equivalent to */*
I believe the intent here it to state that the type
application/*
is functionally equivalent toapplication/octet-stream
. Perhaps not. At any rate,*/*
, if*
is a wildcard, would not thought to be equivalent toapplication/octet-stream
in the common sense, as the wildcard for type (remember, media type is{type} + '/' + {subtype}
) should be taken to allowtext
,image
,multipart
,message
, and so on in addition toapplication
. If my spec says my service endpoint accepts*/*
, I don't want the callers to infer from OAS documentation that they are required to send some subtype ofapplication
.It could also be that I'm missing something that came out of internal discussion. Can you please explain this decision so my teams can better understand how to interact with the spec or otherwise consider my request to change the specification and existing documentation?
The text was updated successfully, but these errors were encountered: