Type object
File match **/tsoa.json
Schema URL https://catalog.lintel.tools/schemas/schemastore/tsoa/latest.json
Source https://www.schemastore.org/tsoa.json

Validate with Lintel

npx @lintel/lintel check
Type: object

JSON Schema for the tsoa configuration file

All of

1. compilerOptionsDefinition compilerOptionsDefinition
2. variant
controllerPathGlobs string[]

An array of path globs that point to your route controllers that you would like to have tsoa include.

entryFile string

The entry point to your API

ignore string[]

Directories to ignore during TypeScript metadata scan

noImplicitAdditionalProperties string

Modes that allow you to prevent input data from entering into your API. This will document your decision in the swagger.yaml and it will turn on excess-property validation (at runtime) in your routes.

Values: "ignore" "silently-remove-extras" "throw-on-extras"
routes object
7 nested properties
authenticationModule string

Authentication Module for express, hapi and koa

basePath string

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

iocModule string

IOC module; e.g. './inversify/ioc' where IOC container named iocContainer is defined (https://github.com/inversify/InversifyJS)

middleware string

Middleware provider.

Values: "express" "hapi" "koa"
middlewareTemplate string

Override the Middleware template

routesDir string

Routes directory; generated routes.ts (which contains the generated code wiring up routes using middleware of choice) will be dropped here

routesFileName string

Routes filename; the filename of the generated route file ('routes.ts' by default)

spec object
15 nested properties
basePath string

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

contact object

Contact Information

3 nested properties
email string

The email address of the contact person/organization.

Default: "npm package author email"
name string

The identifying name of the contact person/organization.

Default: "npm package author"
url string

API Info url The URL pointing to the contact information.

Default: "npm package author url"
description string

API description; defaults to npm package description

host string

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

license string

API license; defaults to npm package license

name string

API name; defaults to npm package name

outputDirectory string

Generated SwaggerConfig.json will output here

schemes string[]
securityDefinitions Record<string, Swagger.BasicSecurity3 | Swagger.BasicSecurity | Swagger.ApiKeySecurity | Swagger.OAuth2Security3 | Swagger.OAuth2ImplicitSecurity | Swagger.OAuth2PasswordSecurity | Swagger.OAuth2ApplicationSecurity | Swagger.OAuth2AccessCodeSecurity>

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.

spec

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

specMerging string

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.
Default: "'immediate'"
Values: "deepmerge" "immediate" "recursive"
specVersion number

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

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

Swagger Tags Information for your API

version string

API version number; defaults to npm package version

yaml boolean

Definitions

RoutesConfig object
authenticationModule string

Authentication Module for express, hapi and koa

basePath string

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

iocModule string

IOC module; e.g. './inversify/ioc' where IOC container named iocContainer is defined (https://github.com/inversify/InversifyJS)

middleware string

Middleware provider.

Values: "express" "hapi" "koa"
middlewareTemplate string

Override the Middleware template

routesDir string

Routes directory; generated routes.ts (which contains the generated code wiring up routes using middleware of choice) will be dropped here

routesFileName string

Routes filename; the filename of the generated route file ('routes.ts' by default)

SpecConfig object
basePath string

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

contact object

Contact Information

3 nested properties
email string

The email address of the contact person/organization.

Default: "npm package author email"
name string

The identifying name of the contact person/organization.

Default: "npm package author"
url string

API Info url The URL pointing to the contact information.

Default: "npm package author url"
description string

API description; defaults to npm package description

host string

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

license string

API license; defaults to npm package license

name string

API name; defaults to npm package name

outputDirectory string

Generated SwaggerConfig.json will output here

schemes string[]
securityDefinitions Record<string, Swagger.BasicSecurity3 | Swagger.BasicSecurity | Swagger.ApiKeySecurity | Swagger.OAuth2Security3 | Swagger.OAuth2ImplicitSecurity | Swagger.OAuth2PasswordSecurity | Swagger.OAuth2ApplicationSecurity | Swagger.OAuth2AccessCodeSecurity>

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.

spec

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

specMerging string

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.
Default: "'immediate'"
Values: "deepmerge" "immediate" "recursive"
specVersion number

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

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

Swagger Tags Information for your API

version string

API version number; defaults to npm package version

yaml boolean
Swagger.ApiKeySecurity object
description string
in string
Values: "header" "query"
name string
type string
Values: "apiKey"
Swagger.BasicSecurity object
description string
type string
Values: "basic"
Swagger.BasicSecurity3 object
description string
scheme string
Values: "basic"
type string
Values: "http"
Swagger.ExternalDocs object
description string
url string
Swagger.OAuth2AccessCodeSecurity object
authorizationUrl string
description string
flow string
Values: "accessCode"
scopes Record<string, string>
tokenUrl string
type string
Values: "oauth2"
Swagger.OAuth2ApplicationSecurity object
description string
flow string
Values: "application"
scopes Record<string, string>
tokenUrl string
type string
Values: "oauth2"
Swagger.OAuth2ImplicitSecurity object
authorizationUrl string
description string
flow string
Values: "implicit"
scopes Record<string, string>
type string
Values: "oauth2"
Swagger.OAuth2PasswordSecurity object
description string
flow string
Values: "password"
scopes Record<string, string>
tokenUrl string
type string
Values: "oauth2"
Swagger.OAuth2Security3 object
description string
flows object
4 nested properties
authorizationCode object
4 nested properties
authorizationUrl string
description string
scopes Record<string, string>
tokenUrl string
clientCredentials object
4 nested properties
authorizationUrl string
description string
scopes Record<string, string>
tokenUrl string
implicit object
4 nested properties
authorizationUrl string
description string
scopes Record<string, string>
tokenUrl string
password object
4 nested properties
authorizationUrl string
description string
scopes Record<string, string>
tokenUrl string
type string
Values: "oauth2"
Swagger.OAuth2SecurityFlow3 object
authorizationUrl string
description string
scopes Record<string, string>
tokenUrl string
Swagger.OAuthFlow object
authorizationCode object
4 nested properties
authorizationUrl string
description string
scopes Record<string, string>
tokenUrl string
clientCredentials object
4 nested properties
authorizationUrl string
description string
scopes Record<string, string>
tokenUrl string
implicit object
4 nested properties
authorizationUrl string
description string
scopes Record<string, string>
tokenUrl string
password object
4 nested properties
authorizationUrl string
description string
scopes Record<string, string>
tokenUrl string
Swagger.OAuthScope Record<string, string>
Swagger.Tag object
description string
externalDocs object
2 nested properties
description string
url string
name string