Skip to content

tsoa-next / @tsoa-next/cli / ExtendedSpecConfig

Interface: ExtendedSpecConfig

Defined in: cli/src/api.ts:387

Normalized spec-generation config returned by validateSpecConfig.

Extends

  • SpecConfig

Properties

basePath?

ts
optional basePath?: string;

Defined in: packages/runtime/src/config.ts:163

Base API path; e.g. the 'v1' in https://myapi.com/v1

Inherited from

ts
SpecConfig.basePath

contact?

ts
optional contact?: object;

Defined in: packages/runtime/src/config.ts:135

Contact information for the published API.

email?

ts
optional email?: string;

The email address of the contact person/organization.

Default
ts
npm package author email

name?

ts
optional name?: string;

The identifying name of the contact person/organization.

Default
ts
npm package author

url?

ts
optional url?: string;

URL pointing to the contact information.

Default
ts
npm package author url

Inherited from

ts
SpecConfig.contact

controllerPathGlobs?

ts
optional controllerPathGlobs?: string[];

Defined in: cli/src/api.ts:390


description?

ts
optional description?: string;

Defined in: packages/runtime/src/config.ts:124

API description; defaults to npm package description

Inherited from

ts
SpecConfig.description

disableBasePathPrefixSlash?

ts
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.

Inherited from

ts
SpecConfig.disableBasePathPrefixSlash

entryFile

ts
entryFile: string;

Defined in: cli/src/api.ts:388


host?

ts
optional host?: string;

Defined in: packages/runtime/src/config.ts:88

API host name for Swagger 2 output, for example localhost:3000.

Inherited from

ts
SpecConfig.host

license?

ts
optional license?: string;

Defined in: packages/runtime/src/config.ts:158

API license; defaults to npm package license when present

Inherited from

ts
SpecConfig.license

name?

ts
optional name?: string;

Defined in: packages/runtime/src/config.ts:119

API name; defaults to npm package name

Inherited from

ts
SpecConfig.name

noImplicitAdditionalProperties

ts
noImplicitAdditionalProperties: "ignore" | "throw-on-extras" | "silently-remove-extras";

Defined in: cli/src/api.ts:389


operationIdTemplate?

ts
optional operationIdTemplate?: string;

Defined in: packages/runtime/src/config.ts:197

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

ts
'{{titleCase method.name}}'

Inherited from

ts
SpecConfig.operationIdTemplate

outputDirectory

ts
outputDirectory: string;

Defined in: packages/runtime/src/config.ts:83

Directory where the generated spec file should be written.

Inherited from

ts
SpecConfig.outputDirectory

rootSecurity?

ts
optional rootSecurity?: Security[];

Defined in: packages/runtime/src/config.ts:232

Applies a default security to the entire API. Can be overridden with @Security(...) or @NoSecurity() decorators on controllers or methods.

Inherited from

ts
SpecConfig.rootSecurity

schemes?

ts
optional schemes?: Protocol[];

Defined in: packages/runtime/src/config.ts:215

Supported protocols for Swagger 2 output.

Inherited from

ts
SpecConfig.schemes

securityDefinitions?

ts
optional securityDefinitions?: object;

Defined in: packages/runtime/src/config.ts:202

Security schemes declared for the specification.

Index Signature

ts
[name: string]: SecuritySchemes

Inherited from

ts
SpecConfig.securityDefinitions

servers?

ts
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.

Inherited from

ts
SpecConfig.servers

spec?

ts
optional spec?: unknown;

Defined in: packages/runtime/src/config.ts:176

Object merged into the generated spec. Generated properties always take precedence over values provided here.

Inherited from

ts
SpecConfig.spec

specFileBaseName?

ts
optional specFileBaseName?: string;

Defined in: packages/runtime/src/config.ts:102

Base-name of swagger.json or swagger.yaml.

@default: "swagger"

Inherited from

ts
SpecConfig.specFileBaseName

specMerging?

ts
optional specMerging?: "immediate" | "recursive" | "deepmerge";

Defined in: packages/runtime/src/config.ts:186

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

ts
'immediate'

Inherited from

ts
SpecConfig.specMerging

specVersion?

ts
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.

Inherited from

ts
SpecConfig.specVersion

tags?

ts
optional tags?: Tag[];

Defined in: packages/runtime/src/config.ts:209

Top-level tag metadata for the generated specification.

Inherited from

ts
SpecConfig.tags

termsOfService?

ts
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.

Inherited from

ts
SpecConfig.termsOfService

useTitleTagsForInlineObjects?

ts
optional useTitleTagsForInlineObjects?: boolean;

Defined in: packages/runtime/src/config.ts:226

Adds titles to inline response and request-body object schemas to improve client generation.

Inherited from

ts
SpecConfig.useTitleTagsForInlineObjects

version?

ts
optional version?: string;

Defined in: packages/runtime/src/config.ts:105

API version number; defaults to the package version.

Inherited from

ts
SpecConfig.version

xEnumVarnames?

ts
optional xEnumVarnames?: boolean;

Defined in: packages/runtime/src/config.ts:221

Enable x-enum-varnames support

Default

ts
false

Inherited from

ts
SpecConfig.xEnumVarnames

yaml?

ts
optional yaml?: boolean;

Defined in: packages/runtime/src/config.ts:212

Writes the generated spec as YAML instead of JSON.

Inherited from

ts
SpecConfig.yaml

TypeScript-first OpenAPI generation, route generation, and runtime validation.