• Public
  • Public/Protected
  • All

Interface ExtendedSpecConfig




Optional basePath

basePath: string

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

Optional contact

contact: { email?: string; name?: string; url?: string }

Contact Information

Type declaration

  • Optional email?: string

    The email address of the contact person/organization.


    npm package author email

  • Optional name?: string

    The identifying name of the contact person/organization.


    npm package author

  • Optional url?: string

    API Info url The URL pointing to the contact information.


    npm package author url

Optional controllerPathGlobs

controllerPathGlobs: string[]

Optional description

description: string

API description; defaults to npm package description


entryFile: string

Optional host

host: string

API host, expressTemplate.g. localhost:3000 or myapi.com

Optional license

license: string

API license; defaults to npm package license

Optional name

name: string

API name; defaults to npm package name


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


outputDirectory: string

Generated SwaggerConfig.json will output here

Optional schemes

schemes: Protocol[]

Optional securityDefinitions

securityDefinitions: {}

Security Definitions Object A declaration of the security schemes available to be used in the specification. This does not enforce the security schemes on the operations and only serves to provide the relevant details for each scheme.

Type declaration

Optional spec

spec: any

Extend generated swagger spec with this object Note that generated properties will always take precedence over what get specified here

Optional specFileBaseName

specFileBaseName: string

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



Optional specMerging

specMerging: "immediate" | "recursive" | "deepmerge"

Alter how the spec is merged to generated swagger spec. Possible values:

  • 'immediate' is overriding top level elements only thus you can not append a new path or alter an existing value without erasing same level elements.
  • 'recursive' proceed to a deep merge and will concat every branches or override or create new values if needed. @see https://www.npmjs.com/package/merge
  • 'deepmerge' uses deepmerge to merge, which will concat object branches and concat arrays as well @see https://www.npmjs.com/package/deepmerge The default is set to immediate so it is not breaking previous versions.


Optional specVersion

specVersion: 2 | 3

Major OpenAPI version to generate; defaults to version 2 when not specified Possible values:

  • 2: generates OpenAPI version 2.
  • 3: generates OpenAPI version 3.

Optional tags

tags: Tag[]

Swagger Tags Information for your API

Optional version

version: string

API version number; defaults to npm package version

Optional xEnumVarnames

xEnumVarnames: boolean

Enable x-enum-varnames support



Optional yaml

yaml: boolean

Generated using TypeDoc