We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description
I have a following openAPI 3.0.3 schema:
"Entity": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/FileEntity" }, { "type": "object", "required": [ "tag" ], "properties": { "tag": { "type": "string", "enum": [ "File" ] } } } ] }, { "allOf": [ { "$ref": "#/components/schemas/FolderEntity" }, { "type": "object", "required": [ "tag" ], "properties": { "tag": { "type": "string", "enum": [ "Folder" ] } } } ] } ], "discriminator": { "propertyName": "tag" } }
Which is generated by some other piece of code. After passing this through openapi-ts it gives:
Entity: ({ tag: "Entity"; } & (components["schemas"]["FileEntity"] & { /** @enum {string} */ tag: "File"; })) | ({ tag: "Entity"; } & (components["schemas"]["FolderEntity"] & { /** @enum {string} */ tag: "Folder"; }));
which gets evaluated to never
never
openapi-typescript
7.3.0
1.1.17
Windows 11
Reproduction
I run the openapi-typescript command on my schema.json file
Expected result
(in case it’s not obvious)
Checklist
npx @redocly/cli@latest lint
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
I have a following openAPI 3.0.3 schema:
Which is generated by some other piece of code. After passing this through openapi-ts it gives:
which gets evaluated to
never
openapi-typescript
7.3.0
1.1.17
Windows 11
Reproduction
I run the openapi-typescript command on my schema.json file
Expected result
(in case it’s not obvious)
Checklist
npx @redocly/cli@latest lint
)The text was updated successfully, but these errors were encountered: