CLI Options
Options
Section titled “Options”-i, —input
Section titled “-i, —input”The input file path of the OpenAPI schema file. This is a required option.
-o, —output <value>
Section titled “-o, —output <value>”The output directory path for the generated files. The default value is openapi.
—pageParam <value>
Section titled “—pageParam <value>”Name of the query parameter used for pagination (infinite query). The default value is page.
—nextPageParam <value>
Section titled “—nextPageParam <value>”Name of the response parameter used for next page. The default value is nextPage.
—initialPageParam <value>
Section titled “—initialPageParam <value>”Initial page value to infinite query. The default value is 1.
Client Options
Section titled “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>
Section titled “-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>
Section titled “—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>
Section titled “—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
Section titled “—noOperationId”Do not use operation ID to generate operation names. The default value is true.
—enums <value>
Section titled “—enums <value>”Generate enum definitions? The default value is false.
The available options are:
javascripttypescript
—useDateType
Section titled “—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
Section titled “—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
Section titled “—noSchemas”Disable generating JSON schemas. The default value is false.
—schemaType <value>
Section titled “—schemaType <value>”Type of JSON schema. Only applies when --noSchemas is not set. The default value is json.
The available options are:
jsonform