Skip to main content

Discriminator with Nested Schemas without Mapping

GET 

/discriminator-nested

Schema:

type: object
discriminator:
propertyName: type
properties:
type:
type: string
oneOf:
- $ref: '#/components/schemas/NestedTypeA'
- $ref: '#/components/schemas/NestedTypeB'

Responses

Successful response

Schema

    oneOf

    type stringrequired

    Possible values: [nestedTypeA]

    nestedA

    object

    propA1 string
    propA2 number
    type string
Loading...