Type object
Schema URL https://catalog.lintel.tools/schemas/schemastore/speakeasy-generation-config-file/_shared/latest--typescript.schema.json
Parent schema speakeasy-generation-config-file
Type: object

Schema for configuration specific to a typescript SDK

Properties

author string required
packageName string required
pattern=^[\w0-9._@\/-]+$
version string required

The current version of the SDK

pattern=^[\w0-9._-]+$
clientServerStatusCodesAsErrors boolean

Whether to treat 4xx and 5xx status codes as errors.

compileCommand

The command to use for compiling the SDK. This must be an array where the first element is the command and the rest are arguments.

defaultErrorName string

The name of the default error class used to represent API errors

pattern=^[A-Z][a-zA-Z0-9]*$
enableCustomCodeRegions boolean

Allow custom code to be inserted into the generated SDK.

enableReactQuery boolean

Generate React hooks using TanStack Query.

enumFormat string

Determines the format to express enums in TypeScript

pattern=^(union|enum)$
envVarPrefix

The environment variable prefix for security and global env variable overrides. If empty these overrides will not be possible

flattenGlobalSecurity boolean

Flatten the global security configuration if there is only a single option in the spec

flatteningOrder string

When flattening parameters and body fields, determines the ordering of generated method arguments.

pattern=^(parameters-first|body-first)$
inputModelSuffix string

The suffix to add to models with writeOnly fields that are created as input models

pattern=^[\w0-9.\-_]+$
maxMethodParams number

The maximum number of parameters a method can have before the resulting SDK endpoint is no longer 'flattened' and an input object is created instead. 0 will use input objects always. https://www.speakeasy.com/docs/customize-sdks/methods

pattern=^\d+$
methodArguments string

Determines how arguments for SDK methods are generated

pattern=^(infer-optional-args|require-security-and-request)$
moduleFormat string

Specifies the module format to use when compiling the SDK.

pattern=^(commonjs|esm|dual)$
outputModelSuffix string

The suffix to add to models with writeOnly fields that are created as input models

pattern=^[\w0-9.\-_]+$
responseFormat string

Determines the shape of the response envelope that is returned from SDK methods

pattern=^(envelope|envelope-http|flat)$
templateVersion string

The template version to use

pattern=^v\d+$
useIndexModules boolean

Determine whether or not index modules (index.ts) are generated