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
prefixItems
Description
Using prefixItems generates incorrect type.
openapi-typescript
7.3.3
20.17.0
Reproduction
The following schema
type: array items: type: number prefixItems: - number - number
generates incorrect type:
[number, number];
Expected result
This should generate open-tuple type according to JSON Schema 2020-12 draft1:
[number, number, ...number[]];
and closed-tuple type should be generated23 by
type: array items: false prefixItems: - number - number
or
type: array unevaluatedItems: false prefixItems: - number - number
Checklist
npx @redocly/cli@latest lint
https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-01#name-prefixitems ↩
https://json-schema.org/draft/2020-12/release-notes#closed-tuple ↩
https://json-schema.org/understanding-json-schema/reference/array#unevaluateditems ↩
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Description
Using
prefixItems
generates incorrect type.openapi-typescript
7.3.3
20.17.0
Reproduction
The following schema
generates incorrect type:
Expected result
This should generate open-tuple type according to JSON Schema 2020-12 draft1:
and closed-tuple type should be generated23 by
or
Checklist
npx @redocly/cli@latest lint
)Footnotes
https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-01#name-prefixitems ↩
https://json-schema.org/draft/2020-12/release-notes#closed-tuple ↩
https://json-schema.org/understanding-json-schema/reference/array#unevaluateditems ↩
The text was updated successfully, but these errors were encountered: