Skip to content

Support discriminator for polymorphic types and support oneOf #219

@bowenwr

Description

@bowenwr

Is your feature request related to a problem? Please describe.

When an endpoint returns oneOf several different classes, currently it returns an empty object. Sample component snippet:

    ReturnedObject:
      oneOf:
        - $ref: '#/components/schemas/PolymorphicType'
        - $ref: '#/components/schemas/AnotherPolymorphicType'

Describe the solution you'd like

Support discriminators to be able to deserialize polymorphic types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions