You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-o, --output-dir <path> Output directory for generated services
31
-
-rm, --clean Clean output directory before generating services
32
-
--filter-services <glob-patterns...> Filter services to be generated using glob patterns. Example: "/user/**,/post/**". For more details, see the NPM `micromatch` package documentation.
33
-
--operation-predefined-parameters <patterns...> Predefined parameters for services. The specified service parameters will be optional. Example: "/**:header.x-monite-version,query.x-api-key" or "get /**:header.x-monite-entity-id"
34
-
--operation-name-modifier <patterns...> Modifies operation names using a pattern. Use the `==>` operator to separate the regular expression (left) and the substitution string (right). For example: "post /**:[A-Za-z]+Id ==> createOne"
35
-
--postfix-services <string> Postfix to be added to the generated service name (eg: Service)
36
-
--service-name-base <endpoint[<index>] | tags> Use OpenAPI Operation `endpoint[<index>]` path part (e.g.: "/0/1/2") or `tags` as the base name of the service. (default: "endpoint[0]")
37
-
--file-header <string> Header to be added to the generated file (eg: /* eslint-disable */)
38
-
--redocly [config] Use the Redocly configuration to generate multiple API clients
39
-
If the [config] parameter is not specified, the default Redocly configuration will be used: [redocly.yaml | redocly.yml | .redocly.yaml | .redocly.yml].
40
-
For more information about this option, use the command: --redocly-help
--openapi-types-import-path <path> Path to schema types file (.d.ts), e.g.: "../schema.d.ts"
44
-
--explicit-import-extensions [extension] All import statements will contain an explicit file extension. Ideal for projects using ECMAScript modules. (choices: ".js", ".ts", preset: ".js")
45
-
--export-openapi-types [bool] Add an export statement of the generated OpenAPI document types from the `./index.ts' file. Useful for sharing types within your project. (default: true)
46
-
--queryable-write-operations [bool] Enable generation of query hooks (useQuery, useSuspenseQuery, etc.) for writable HTTP methods like POST, PUT, PATCH. By default, only mutation hooks are generated for writable operations.
--dedupe-enums Dedupe enum types when `--enum` is set
51
-
-t, --export-type Export top-level `type` instead of `interface`
52
-
--immutable Generate readonly types
53
-
--additional-properties Treat schema objects as if `additionalProperties: true` is set
54
-
--empty-objects-unknown Generate `unknown` instead of `Record<string, never>` for empty objects
55
-
--default-non-nullable Set to `false` to ignore default values when generating non-nullable types
56
-
--properties-required-by-default Treat schema objects as if `required` is set to all properties by default
57
-
--array-length Generate tuples using array minItems / maxItems
58
-
--path-params-as-types Convert paths to template literal types
59
-
--alphabetize Sort object keys alphabetically
60
-
--exclude-deprecated Exclude deprecated types
61
-
--no-blob-from-binary If this option is enabled, binary format fields will not be converted to Blob types, preserving the native representation
62
-
--explicit-component-exports Enabling this option will export API components as separate type aliases, alongside `components` interface
63
-
-h, --help display help for command
30
+
-o, --output-dir <path> Output directory for generated services
31
+
-rm, --clean Clean output directory before generating services
32
+
--filter-services <glob-patterns...> Filter services to be generated using glob patterns. Example: "/user/**,/post/**". For more details, see the NPM `micromatch` package documentation.
33
+
--operation-predefined-parameters <patterns...> Predefined parameters for services. The specified service parameters will be optional. Example: "/**:header.x-monite-version,query.x-api-key" or
34
+
"get /**:header.x-monite-entity-id"
35
+
--operation-name-modifier <patterns...> Modifies operation names using a pattern. Use the `==>` operator to separate the regular expression (left) and the substitution string (right). For
36
+
example: "post /**:[A-Za-z]+Id ==> createOne"
37
+
--postfix-services <string> Postfix to be added to the generated service name (eg: Service)
38
+
--service-name-base <endpoint[<index>] | tags> Use OpenAPI Operation `endpoint[<index>]` path part (e.g.: "/0/1/2") or `tags` as the base name of the service. (default: "endpoint[0]")
39
+
--file-header <string> Header to be added to the generated file (eg: /* eslint-disable */)
40
+
--redocly [config] Use the Redocly configuration to generate multiple API clients
41
+
If the [config] parameter is not specified, the default Redocly configuration will be used: [redocly.yaml | redocly.yml | .redocly.yaml |
42
+
.redocly.yml].
43
+
For more information about this option, use the command: --redocly-help
44
+
Examples:
45
+
$ bin --redocly
46
+
$ bin my-api --redocly
47
+
$ bin my-api@v1 my-api@v2 --redocly
48
+
$ bin --redocly ./my-redocly-config.yaml
49
+
--openapi-types-import-path <path> Path to schema types file (.d.ts), e.g.: "../schema.d.ts"
50
+
--explicit-import-extensions [extension] All import statements will contain an explicit file extension. Ideal for projects using ECMAScript modules. (choices: ".js", ".ts", preset: ".js")
51
+
--export-openapi-types [bool] Add an export statement of the generated OpenAPI document types from the `./index.ts' file. Useful for sharing types within your project. Default:
52
+
true when --plugin openapi-typescript is used. (default: true)
53
+
--queryable-write-operations [bool] Enable generation of query hooks (useQuery, useSuspenseQuery, etc.) for writable HTTP methods like POST, PUT, PATCH. By default, only mutation hooks
54
+
are generated for writable operations.
55
+
--create-api-client-fn <functionName> [options...] Configure API client creation function. Allows specifying the function name, included services, and callbacks. Can be specified multiple times to
56
+
generate several different API client functions from a single OpenAPI document. (default: null)
57
+
--override-import-type <pathname overrides...> Override import paths for specific types in generated files. This allows using custom type implementations instead of the default ones. Expected
0 commit comments