Discriminator with AllOf without Mapping
GET/discriminator-allof
Schema:
type: object
discriminator:
propertyName: type
properties:
type:
type: string
allOf:
- oneOf:
- $ref: '#/components/schemas/TypeA'
- $ref: '#/components/schemas/TypeB'
- type: object
properties:
sharedProp:
type: string
Responses
- 200
Successful response
- application/json
- Schema
- Example (from schema)
Schema
- TypeA
- TypeB
type
oneOf
type stringrequired
Possible values: [typeA
]
propA string
type stringrequired
Possible values: [typeB
]
propB number
sharedProp string
{
"type": "typeA",
"sharedProp": "string",
"propA": "string"
}
Loading...