primaryData
attribute in Media Type Object
#2454
Labels
media and encoding
Issues regarding media type support and how to encode data (outside of query/path params)
Needs attention
The author has replied and people with triage rights should take action.
Media Type Object should have an optional
primaryData
attribute, to specify the name of the property, where the primary data is located in the schema.It is very common to return the response object wrapped in a top level property. This way, it is possible to provide additional metadata as well. Example:
The OpenApi tools could better understand these type of responses. It would be possible to express, that the
data
attribute is not really part of any schemas/objects. It is just a wrapper.The SDK Generators could benefit from this
primaryData
attribute as well. At the moment, these kind of responses usually have to be manually unwrapped.The text was updated successfully, but these errors were encountered: