Skip to content

CLI Options

The input file path of the OpenAPI schema file. This is a required option.

The output directory path for the generated files. The default value is openapi.

Name of the query parameter used for pagination (infinite query). The default value is page.

Name of the response parameter used for next page. The default value is nextPage.

Initial page value to infinite query. The default value is 1.

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.

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

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:

  • biome
  • prettier

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:

  • biome
  • eslint

Do not use operation ID to generate operation names. The default value is true.

Generate enum definitions? The default value is false. The available options are:

  • javascript
  • typescript

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.

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.

Disable generating JSON schemas. The default value is false.

Type of JSON schema. Only applies when --noSchemas is not set. The default value is json. The available options are:

  • json
  • form