Discriminator in OpenApi schema not recognized correctly #993
Labels
bug 🔥
Something isn't working
prioritized 🚚
This issue has been prioritized and will be worked on soon
Milestone
Description
Given this OpenApi schema yaml
I would expect the generated types to look like this
but this is what we are getting
At first it seems like types are correct but when trying to narrow the block type inside a switch statement by field "type" it is impossible since each block is not strictly connected to its "type" field.
An example:
It seems like the generator is ignoring the discriminator field from open api schema.
Reproducible example or configuration
https://stackblitz.com/edit/hey-api-client-fetch-example-emxls6?file=src%2FApp.tsx
OpenAPI specification (optional)
System information (optional)
No response
The text was updated successfully, but these errors were encountered: