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