Discriminator mapping does not seem to work properly #1700
Labels
bug
Something isn't working
good first issue
Straightforward problem, solvable for first-time contributors without deep knowledge of the project
openapi-ts
Relevant to the openapi-typescript library
PRs welcome
PRs are welcome to solve this issue!
Description
Discriminator + Enums does not work, there are a few problems.
openapi-typescript
7.0.0-rc.0
v18.17.1
macOS
Reproduction
npx openapi-typescript@next ./testapi.yaml -o ./testapi.ts --enum=true
Results in:
Expected result
CatPetType
better to havePetType.Cat
Omit<components["schemas"]["Pet"], "petType">
from the type to get rid of cycle type dependency Cat -> Pet -> Cat that causes typescript errorPreferred outcome
Checklist
npx @redocly/cli@latest lint
)The text was updated successfully, but these errors were encountered: