Options
All
  • Public
  • Public/Protected
  • All
Menu

tsoa - v3.2.1

Index

Type aliases

DeprecatedOptionForAdditionalPropertiesHandling

DeprecatedOptionForAdditionalPropertiesHandling: true | false

these options will be removed in a future version since we would prefer consumers to explicitly state their preference that the tsoa validation throws or removes additional properties

ExtensionType

ExtensionType: string | {}

HttpStatusCodeLiteral

HttpStatusCodeLiteral: 100 | 101 | 102 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 422 | 423 | 424 | 426 | 428 | 429 | 431 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511

TsoaResponse

TsoaResponse<T, U, V>: (status: T, data: U, headers?: V) => any

Type parameters

Type declaration

    • (status: T, data: U, headers?: V): any
    • Parameters

      • status: T
      • data: U
      • Optional headers: V

      Returns any

Functions

Body

  • Body(): Function

BodyProp

  • BodyProp(name?: undefined | string): Function

Delete

  • Delete(value?: undefined | string): Function

Deprecated

  • Deprecated(): Function

Example

  • Example<T>(exampleModel: T): Function

Extension

Get

  • Get(value?: undefined | string): Function

Head

  • Head(value?: undefined | string): Function

Header

  • Header(name?: undefined | string): Function
  • Inject value from Http header

    Parameters

    • Optional name: undefined | string

    Returns Function

Hidden

  • Hidden(): Function
  • can be used to entirely hide an method from documentation

    Returns Function

NoSecurity

  • NoSecurity(): Function

OperationId

  • OperationId(value: string): Function

Patch

  • Patch(value?: undefined | string): Function

Path

  • Path(name?: undefined | string): Function

Post

  • Post(value?: undefined | string): Function

Put

  • Put(value?: undefined | string): Function

Query

  • Query(name?: undefined | string): Function
  • Inject value from query string

    Parameters

    • Optional name: undefined | string

    Returns Function

Request

  • Request(): Function

Res

  • Res(): Function
  • Inject a library-agnostic responder function that can be used to construct type-checked (usually error-) responses.

    The type of the responder function should be annotated TsoaResponse<Status, Data, Headers> in order to support OpenAPI documentation.

    Returns Function

Response

  • Response<T>(name: string | number, description?: undefined | string, example?: T): Function
  • Type parameters

    • T

    Parameters

    • name: string | number
    • Optional description: undefined | string
    • Optional example: T

    Returns Function

Route

  • Route(name?: undefined | string): Function

Security

  • Security(name: string | {}, scopes?: string[]): Function

SuccessResponse

  • SuccessResponse(name: string | number, description?: undefined | string): Function
  • Parameters

    • name: string | number
    • Optional description: undefined | string

    Returns Function

Tags

  • Tags(...values: string[]): Function

Const generateRoutes

  • generateRoutes(routesConfig: ExtendedRoutesConfig, compilerOptions?: ts.CompilerOptions, ignorePaths?: string[], metadata?: Tsoa.Metadata): Promise<Metadata>
  • Parameters

    • routesConfig: ExtendedRoutesConfig
    • Optional compilerOptions: ts.CompilerOptions
    • Optional ignorePaths: string[]
    • Optional metadata: Tsoa.Metadata

    Returns Promise<Metadata>

Const generateSpec

  • generateSpec(swaggerConfig: ExtendedSpecConfig, compilerOptions?: ts.CompilerOptions, ignorePaths?: string[], metadata?: Tsoa.Metadata): Promise<Metadata>
  • Parameters

    • swaggerConfig: ExtendedSpecConfig
    • Optional compilerOptions: ts.CompilerOptions
    • Optional ignorePaths: string[]
    • Optional metadata: Tsoa.Metadata

    Returns Promise<Metadata>

Generated using TypeDoc