tsoa-next / tsoa-next / SpecConfig
Interface: SpecConfig
Defined in: packages/runtime/src/config.ts:79
OpenAPI generation settings.
Properties
basePath?
optional basePath?: string;Defined in: packages/runtime/src/config.ts:163
Base API path; e.g. the 'v1' in https://myapi.com/v1
contact?
optional contact?: object;Defined in: packages/runtime/src/config.ts:135
Contact information for the published API.
email?
optional email?: string;The email address of the contact person/organization.
Default
npm package author emailname?
optional name?: string;The identifying name of the contact person/organization.
Default
npm package authorurl?
optional url?: string;URL pointing to the contact information.
Default
npm package author urldescription?
optional description?: string;Defined in: packages/runtime/src/config.ts:124
API description; defaults to npm package description
disableBasePathPrefixSlash?
optional disableBasePathPrefixSlash?: boolean;Defined in: packages/runtime/src/config.ts:170
Controls whether basePath is prefixed with / when composing OpenAPI 3 server URLs.
Only available with spec version 3 or 3.1.
host?
optional host?: string;Defined in: packages/runtime/src/config.ts:88
API host name for Swagger 2 output, for example localhost:3000.
license?
optional license?: string;Defined in: packages/runtime/src/config.ts:158
API license; defaults to npm package license when present
name?
optional name?: string;Defined in: packages/runtime/src/config.ts:119
API name; defaults to npm package name
operationIdTemplate?
optional operationIdTemplate?: string;Defined in: packages/runtime/src/config.ts:198
Template string for generating operation ids. This should be a valid handlebars template and is provided with the following context:
- 'controllerName' - String name of controller class.
- 'method' - Tsoa.Method object.
Default
'{{titleCase method.name}}'outputDirectory
outputDirectory: string;Defined in: packages/runtime/src/config.ts:83
Directory where the generated spec file should be written.
rootSecurity?
optional rootSecurity?: Security[];Defined in: packages/runtime/src/config.ts:233
Applies a default security to the entire API. Can be overridden with @Security(...) or @NoSecurity() decorators on controllers or methods.
schemes?
optional schemes?: Protocol[];Defined in: packages/runtime/src/config.ts:216
Supported protocols for Swagger 2 output.
securityDefinitions?
optional securityDefinitions?: object;Defined in: packages/runtime/src/config.ts:203
Security schemes declared for the specification.
Index Signature
[name: string]: SecuritySchemesservers?
optional servers?: string[];Defined in: packages/runtime/src/config.ts:95
Server URLs for OpenAPI 3 output.
Only available with spec version 3 or 3.1.
spec?
optional spec?: unknown;Defined in: packages/runtime/src/config.ts:177
Object merged into the generated spec. Supplied values override generated properties according to the selected merge mode. For Swagger 2.0, configured schemes are applied after this overlay.
specFileBaseName?
optional specFileBaseName?: string;Defined in: packages/runtime/src/config.ts:102
Base-name of swagger.json or swagger.yaml.
@default: "swagger"
specMerging?
optional specMerging?: "recursive" | "immediate" | "deepmerge";Defined in: packages/runtime/src/config.ts:187
Controls how spec is merged into the generated document. Possible values:
- 'immediate' overrides only top-level elements.
- 'recursive' performs a deep merge using
merge. - 'deepmerge' performs a deep merge using
ts-deepmerge, including arrays.
Default
'immediate'specVersion?
optional specVersion?: SupportedSpecMajorVersion;Defined in: packages/runtime/src/config.ts:114
Major OpenAPI version to generate; defaults to version 2 when not specified Possible values:
- 2: generates OpenAPI version 2.
- 3: generates OpenAPI version 3.
- 3.1: generates OpenAPI version 3.1.
tags?
optional tags?: Tag[];Defined in: packages/runtime/src/config.ts:210
Top-level tag metadata for the generated specification.
termsOfService?
optional termsOfService?: string;Defined in: packages/runtime/src/config.ts:130
Link to the page that describes the terms of service. Must be in the URL format.
useTitleTagsForInlineObjects?
optional useTitleTagsForInlineObjects?: boolean;Defined in: packages/runtime/src/config.ts:227
Adds titles to inline response and request-body object schemas to improve client generation.
version?
optional version?: string;Defined in: packages/runtime/src/config.ts:105
API version number; defaults to the package version.
xEnumVarnames?
optional xEnumVarnames?: boolean;Defined in: packages/runtime/src/config.ts:222
Enable x-enum-varnames support
Default
falseyaml?
optional yaml?: boolean;Defined in: packages/runtime/src/config.ts:213
Writes the generated spec as YAML instead of JSON.
