Skip to content

Adding Schema Identifier to Type in fields generated from oneOf. #2192

Open
@comsma

Description

@comsma

Description

I am currently using a schema that i'm returning search results with. I have implemented an aggregation schema that can represent multiple types of aggregations using the oneOf field in the openapi schema.

I am currently facing the issue of checking the aggregation schema type that is being used. Without explicitly checking for the existence of fields.

Proposal

When generating the schema typescript file is it possible to embed the type of schema being returned? Or implementing helper functions to check the type being returned?

Extra

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestopenapi-tsRelevant to the openapi-typescript library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions