Discriminator with AllOf and Mapping
GET/discriminator-allof-mapping
Schema:
type: object
discriminator:
propertyName: type
mapping:
typeA: "#/components/schemas/TypeA"
typeB: "#/components/schemas/TypeB"
properties:
type:
type: string
allOf:
- oneOf:
- $ref: '#/components/schemas/TypeA'
- $ref: '#/components/schemas/TypeB'
- type: object
properties:
sharedProp:
type: string
Responses
- 200
Successful response