Skip to content

Commit 71c3af6

Browse files
committed
Add document and help.
1 parent 89d2ac3 commit 71c3af6

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ npx openapi-typescript schema.yaml
159159
| `--default-non-nullable` | | `false` | (optional) Treat schema objects with default values as non-nullable |
160160
| `--prettier-config [location]` | `-c` | | (optional) Path to your custom Prettier configuration for output |
161161
| `--export-type` | | `false` | (optional) Export `type` instead of `interface` |
162+
| `--support-array-length` | | `false` | (optional) Generate tuples using array minItems / maxItems |
162163
| `--raw-schema` | | `false` | Generate TS types from partial schema (e.g. having `components.schema` at the top level) |
163164
| `--version` | | | Force OpenAPI version with `--version 3` or `--version 2` (required for `--raw-schema` when version is unknown) |
164165

bin/cli.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Options
2626
--prettier-config, -c (optional) specify path to Prettier config file
2727
--raw-schema (optional) Parse as partial schema (raw components)
2828
--export-type (optional) Export type instead of interface
29+
--support-array-length (optional) Generate tuples using array minItems / maxItems
2930
--version (optional) Force schema parsing version
3031
`;
3132

src/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ export interface SwaggerToTSOptions {
155155
* (optional) Export type instead of interface
156156
*/
157157
exportType?: boolean;
158+
/**
159+
* (optional) Generate tuples using array minItems / maxItems
160+
*/
158161
supportArrayLength?: boolean;
159162
}
160163

0 commit comments

Comments
 (0)