Skip to content

Map oneOf with discriminator to sum type #953

Closed
@benlongo

Description

@benlongo

The example here https://swagger.io/docs/specification/data-models/inheritance-and-polymorphism/ can map cleanly to a sum type in typescript. I don't believe the discriminator is currently analyzed however. This would enable narrowing in the client for polymorphic objects.

Metadata

Metadata

Assignees

Labels

3.1Part of OpenAPI 3.1enhancementNew feature or requestplannedExpected in an upcoming version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions