Description
Description
--array-length
with minItems: 1
generates empty array.
Tested with v7.4.4 and v7.1.2.
Reproduction
Copy the example here: https://openapi-ts.dev/cli#arraylength
components:
schemas:
TupleType:
type: array
items:
type: string
minItems: 1
maxItems: 2
Expected result
export interface components {
schemas: {
readonly TupleType: [string] | [string, string];
};
}
Actual result
export interface components {
schemas: {
readonly TupleType: [
] | [
string
];
};
}
Checklist
- My OpenAPI schema passes the Redocly validator (
npx @redocly/cli@latest lint
) - I’m willing to open a PR (see CONTRIBUTING.md)