You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a method to specify the supported medias type for each request and response body.
If multiple media types are supported, we'll need a method (such as folder or file names?) to indicate which type each example pertains to.
Motivation
In OpenAPI documents, you can have request and response bodies that support various media types per https://spec.openapis.org/oas/v3.0.3#media-types
For example, the cat API (e.g cat aliases returns text/plain responses by default and you can use the format query parameter to get back JSON, YAML, etc.
It does not seem like we currently have a way to represent these media types in the current specifications.
I am converting the text/plain examples to json to work with the existing system, but it would be good to be able to specify the media type explicitly.
Example
When we were manually curating the examples, it looked like this (i.e. the cat aliases API responses could have both JSON and text formats:
🚀 Feature Proposal
Add a method to specify the supported medias type for each request and response body.
If multiple media types are supported, we'll need a method (such as folder or file names?) to indicate which type each example pertains to.
Motivation
In OpenAPI documents, you can have request and response bodies that support various media types per https://spec.openapis.org/oas/v3.0.3#media-types
For example, the cat API (e.g cat aliases returns
text/plain
responses by default and you can use theformat
query parameter to get back JSON, YAML, etc.It does not seem like we currently have a way to represent these media types in the current specifications.
I am converting the
text/plain
examples tojson
to work with the existing system, but it would be good to be able to specify the media type explicitly.Example
When we were manually curating the examples, it looked like this (i.e. the cat aliases API responses could have both JSON and text formats:
The text was updated successfully, but these errors were encountered: