oneOf, for example, is working when we have it at schema root :
"content": {
"application/json": {
"schema": {
"oneOf": [
but not when in embedded in a sub schema :
"Animal": {
"type": "object",
"oneOf": [
{
"$ref": "#/components/schemas/Cat"
},
{
"$ref": "#/components/schemas/Dog"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"cat": "#/components/schemas/Cat",
"dog": "#/components/schemas/Dog"
}
}
},
oneOf, for example, is working when we have it at schema root :
but not when in embedded in a sub schema :