You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I encountered an issue when generating a discriminated union type with npx openapicmd typegen. When the discriminated union is assigned as a nullable property, the type is generated as null | null. but when assigned as a nullable: false property, it's generated fine.
I managed to get a minimal reproduction with the following command and apidoc:
note that I had to copy BudgetTarget into two different schemas in order to demonstrate it generating correctly for requiredTarget. If they both reference the same schema, then both properties generate as null | null
The text was updated successfully, but these errors were encountered:
Hi, I encountered an issue when generating a discriminated union type with
npx openapicmd typegen
. When the discriminated union is assigned as a nullable property, the type is generated asnull | null
. but when assigned as anullable: false
property, it's generated fine.I managed to get a minimal reproduction with the following command and apidoc:
command
npx -y openapicmd typegen api-doc.json > client.ts
api-doc.json
generated client.ts
note that I had to copy BudgetTarget into two different schemas in order to demonstrate it generating correctly for
requiredTarget
. If they both reference the same schema, then both properties generate asnull | null
The text was updated successfully, but these errors were encountered: