Challenges with Request object only mapping to one content type #41
Replies: 2 comments 1 reply
-
In OpenAPI <4.0.0, |
Beta Was this translation helpful? Give feedback.
-
I think allowing a request to specify multiple content types is a good solution to the redundancy problem. That is, requests that differ only in the contentType of the body can be more concisely described. The API designer still has the ability to use multiple requests whenever other aspects differ, so there are not downsides to this change that I can see. |
Beta Was this translation helpful? Give feedback.
-
There is a concern that this will create a lot of redundancy in request objects where an API accepts multiple media types.
Do recent APIs use the pattern of accepting application/json and application/xml?
How often do APIs accept multiple media types in a request body and have the same set of responses.
There are APIs that accept JSON and protobuf.
What about APIs that accept multiple image types?
Could this work?
Beta Was this translation helpful? Give feedback.
All reactions