CLI Options
Options
-i, —input
The input file path of the OpenAPI schema file. This is a required option.
-o, —output <value>
The output directory path for the generated files. The default value is openapi.
—pageParam <value>
Name of the query parameter used for pagination (infinite query). The default value is page.
—nextPageParam <value>
Name of the response parameter used for next page. The default value is nextPage.
—initialPageParam <value>
Initial page value to infinite query. The default value is 1.
Client Options
The generated clients (under the openapi/requests directory) are produced by @hey-api/openapi-ts using its plugins system. The CLI options below are mapped to the corresponding plugin configurations.
You can see the current configuration in the generate function.
-c, —client <value>
The HTTP client to use for the generated hooks. The default value is @hey-api/client-fetch.
The available options are:
@hey-api/client-fetch@hey-api/client-axios
More details about the clients can be found in Hey API Documentation
—format <value>
Process the generated queries output folder (openapi/queries) with a formatter. The openapi/requests directory generated by @hey-api/openapi-ts is not affected by this option. The default value is false.
The available options are:
biomeprettier
—lint <value>
Process the generated queries output folder (openapi/queries) with a linter. The openapi/requests directory generated by @hey-api/openapi-ts is not affected by this option. The default value is false.
The available options are:
biomeeslint
—noOperationId
Do not use operation ID to generate operation names. The default value is true.
—enums <value>
Generate enum definitions? The default value is false.
The available options are:
javascripttypescript
—useDateType
Deprecated: This option is currently accepted but has no effect. It will be removed in a future version.
Use Date type instead of string for date. The default value is false.
—debug
Deprecated: This option is currently accepted but has no effect. It will be removed in a future version.
Run in debug mode? The default value is false.
—noSchemas
Disable generating JSON schemas. The default value is false.
—schemaType <value>
Type of JSON schema. Only applies when --noSchemas is not set. The default value is json.
The available options are:
jsonform