This section details the available configuration options for the TypeScript SDK. All configuration is managed in the gen.yaml file under the typescript section.
Sets the module format to use when compiling the SDK (
,
, or
). Using
provides optimal compatibility while enabling modern bundler optimizations.
Performance optimization
For optimal bundle size and tree-shaking performance in modern applications, we recommend using moduleFormat: "dual" together with useIndexModules: false. This combination ensures maximum compatibility while enabling the best possible bundler optimizations.
Import management
Field
option
Required
false
Default Value
"openapi"
Description
Defines the type of import strategy. Typically set to
, indicating that the structure is based on the OpenAPI document.
paths
Required
false
Default Value
{}
Description
Customizes where different parts of the SDK (e.g., callbacks, errors, and operations) will be imported from.
Field
Required
Default Value
Description
option
false
"openapi"
Defines the type of import strategy. Typically set to
, indicating that the structure is based on the OpenAPI document.
paths
false
{}
Customizes where different parts of the SDK (e.g., callbacks, errors, and operations) will be imported from.
Import paths
Component
callbacks
Default Value
models/callbacks
Description
The directory where callback models will be imported from.
errors
Default Value
models/errors
Description
The directory where error models will be imported from.
operations
Default Value
models/operations
Description
The directory where operation models (i.e., API endpoints) will be imported from.
shared
Default Value
models/components
Description
The directory for shared components, such as reusable schemas, and data models imported from the OpenAPI spec.
webhooks
Default Value
models/webhooks
Description
The directory for webhook models, if the SDK includes support for webhooks.
Component
Default Value
Description
callbacks
models/callbacks
The directory where callback models will be imported from.
errors
models/errors
The directory where error models will be imported from.
operations
models/operations
The directory where operation models (i.e., API endpoints) will be imported from.
shared
models/components
The directory for shared components, such as reusable schemas, and data models imported from the OpenAPI spec.
webhooks
models/webhooks
The directory for webhook models, if the SDK includes support for webhooks.