Configuration File
Create a configuration file in your project root using one of these formats:The
defineConfig helper provides TypeScript autocomplete and type checking for your configuration.Core Configuration Options
Every configuration requires at minimum aninput and output:
Path to your OpenAPI specification. Can be a local file path, URL, or API registry shorthand.See Input Configuration for details.
Path to the output folder where generated files will be written.See Output Configuration for details.
Plugins generate artifacts from your OpenAPI specification. By default, TypeScript types and SDK functions are generated.See Plugins Configuration for details.
Customize how the OpenAPI specification is parsed and transformed before plugins process it.See Parser Configuration for details.
Additional Options
Path to the config file. Set this if you don’t use the default config file name, or it’s not located in the project root.
Skip writing files to disk. Useful for testing configuration without generating output.
Show an interactive error reporting tool when the program crashes. Generally kept disabled.
Configure logging behavior.
Multiple Configurations
You can export an array of configurations to generate multiple outputs from different inputs:openapi-ts.config.ts
Async Configuration
ThedefineConfig helper supports async functions for dynamic configuration:
openapi-ts.config.ts
Next Steps
Input Configuration
Configure how OpenAPI specifications are loaded
Output Configuration
Control where and how files are generated
Parser Configuration
Transform and filter your OpenAPI specification
Plugins Configuration
Choose what artifacts to generate