-
Notifications
You must be signed in to change notification settings - Fork 154
Open
Labels
enhancementNew feature or requestNew feature or requestopenapi-featuresOpenAPI features support issuesOpenAPI features support issues
Description
Description
It would be really awesome if ogen would automatically generate an Accept header parameter and enum options for it based on the content-types in the response for a given operation. That way we can avoid specifying an Accept header ourselves (which I think openapi doesn't want us to do) and we can automatically deal with new content types as they are added to the spec without having to manually keep the enum in the header parameter in sync.
"200": {
"description": "200 OK",
"content": {
"application/vnd.sambasafety.json;version=2.0.4": {
"schema": {
"$ref": "#/components/schemas/IntelligentMvrJson2_04Response"
}
},
"application/vnd.sambasafety.json;version=3.0.0": {
"schema": {
"$ref": "#/components/schemas/IntelligentMvrJson3_00Response"
}
},
"application/vnd.sambasafety.xml;version=2.0.0": {
"schema": {
"$ref": "#/components/schemas/IntelligentMvrXml2_00Response"
}
},
"application/vnd.sambasafety.xml;version=2.0.2": {
"schema": {
"$ref": "#/components/schemas/IntelligentMvrXml2_02Response"
}
},
"application/vnd.sambasafety.xml;version=2.0.3": {
"schema": {
"$ref": "#/components/schemas/IntelligentMvrXml2_03Response"
}
},
"application/vnd.sambasafety.html": {
"schema": {
"$ref": "#/components/schemas/IntelligentMvrHtmlResponse"
}
},
"application/vnd.sambasafety.pdf": {
"schema": {
"$ref": "#/components/schemas/IntelligentMvrPdfResponse"
}
}
}
},
References
https://swagger.io/docs/specification/describing-parameters/

ayuhito, oliverkahrmann-basf, nics and cysp
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestopenapi-featuresOpenAPI features support issuesOpenAPI features support issues