Skip to content

Commit 8d2600b

Browse files
authored
Add --export-type to README, flag cleanup (openapi-ts#878)
1 parent 5be459c commit 8d2600b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,16 @@ npx openapi-typescript schema.yaml
151151
| :----------------------------- | :---- | :------: | :-------------------------------------------------------------------------------------------------------------------------------------- |
152152
| `--output [location]` | `-o` | (stdout) | Where should the output file be saved? |
153153
| `--auth [token]` | | | (optional) Provide an auth token to be passed along in the request (only if accessing a private schema) |
154+
| `--header` | `-x` | | (optional) Provide an array of or singular headers as an alternative to a JSON object. Each header must follow the `key: value` pattern |
155+
| `--headersObject` | `-h` | | (optional) Provide a JSON object as string of HTTP headers for remote schema request. This will take priority over `--header` |
156+
| `--httpMethod` | `-m` | `GET` | (optional) Provide the HTTP Verb/Method for fetching a schema from a remote URL |
154157
| `--immutable-types` | `-it` | `false` | (optional) Generates immutable types (readonly properties and readonly array) |
155158
| `--additional-properties` | `-ap` | `false` | (optional) Allow arbitrary properties for all schema objects without `additionalProperties: false` |
156159
| `--default-non-nullable` | | `false` | (optional) Treat schema objects with default values as non-nullable |
157160
| `--prettier-config [location]` | `-c` | | (optional) Path to your custom Prettier configuration for output |
161+
| `--export-type` | | `false` | (optional) Export `type` instead of `interface` |
158162
| `--raw-schema` | | `false` | Generate TS types from partial schema (e.g. having `components.schema` at the top level) |
159-
| `--httpMethod` | `-m` | `GET` | (optional) Provide the HTTP Verb/Method for fetching a schema from a remote URL |
160-
| `--headersObject` | `-h` | | (optional) Provide a JSON object as string of HTTP headers for remote schema request. This will take priority over `--header` |
161-
| `--header` | `-x` | | (optional) Provide an array of or singular headers as an alternative to a JSON object. Each header must follow the `key: value` pattern |
163+
| `--version` | | | Force OpenAPI version with `--version 3` or `--version 2` (required for `--raw-schema` when version is unknown) |
162164

163165
### 🐢 Node
164166

0 commit comments

Comments
 (0)