Closed
Description
In 3.0.0_enhancements
branch, I noticed this line:
This appears to select the only the first content-type for a RequestBody.
What can we expect will be the plan for code generation, for the RequestBody for cases 1) and 2) below?
1) Multiple content-types with the same Schema
"requestBody": {
"description": "Pet object that needs to be added to the store",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
}
},
"required": false
},
2) Multiple content-types with different Schemas
Schemas can vary by media type.
https://swagger.io/docs/specification/describing-request-body/
"requestBody": {
"description": "Pet object that needs to be added to the store",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Cat"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/Dog"
}
}
},
"required": false
},