tsoa-next
    Preparing search index...

    Interface ExtendedSpecConfig

    interface ExtendedSpecConfig {
        basePath?: string;
        contact?: { email?: string; name?: string; url?: string };
        controllerPathGlobs?: string[];
        description?: string;
        disableBasePathPrefixSlash?: boolean;
        entryFile: string;
        host?: string;
        license?: string;
        name?: string;
        noImplicitAdditionalProperties:
            | "ignore"
            | "throw-on-extras"
            | "silently-remove-extras";
        operationIdTemplate?: string;
        outputDirectory: string;
        rootSecurity?: Security[];
        schemes?: Protocol[];
        securityDefinitions?: { [name: string]: SecuritySchemes };
        servers?: string[];
        spec?: unknown;
        specFileBaseName?: string;
        specMerging?: "immediate" | "recursive" | "deepmerge";
        specVersion?: SupportedSpecMajorVersion;
        tags?: Tag[];
        termsOfService?: string;
        useTitleTagsForInlineObjects?: boolean;
        version?: string;
        xEnumVarnames?: boolean;
        yaml?: boolean;
    }

    Hierarchy

    • SpecConfig
      • ExtendedSpecConfig
    Index

    Properties

    basePath?: string

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

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

    Contact Information

    Type Declaration

    • Optionalemail?: string

      The email address of the contact person/organization.

      npm package author email
      
    • Optionalname?: string

      The identifying name of the contact person/organization.

      npm package author
      
    • Optionalurl?: string

      API Info url The URL pointing to the contact information.

      npm package author url
      
    controllerPathGlobs?: string[]
    description?: string

    API description; defaults to npm package description

    disableBasePathPrefixSlash?: boolean

    Base API prefix slash toggle e.g. the 'v1' with toggle true will be https://myapi.comv1 Otherwise, http://myapi.com/v1

    Only available with the specVersion 3

    entryFile: string
    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

    noImplicitAdditionalProperties:
        | "ignore"
        | "throw-on-extras"
        | "silently-remove-extras"
    operationIdTemplate?: string

    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.
    '{{titleCase method.name}}'
    
    outputDirectory: string

    Generated SwaggerConfig.json will output here

    rootSecurity?: Security[]

    Applies a default security to the entire API. Can be overridden with

    or

    decorators on controllers or methods

    schemes?: Protocol[]
    securityDefinitions?: { [name: string]: SecuritySchemes }

    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.

    servers?: string[]

    API servers, expressTemplate.g. [production.api.com, staging.api.com]

    Only available with the specVersion 3

    spec?: unknown

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

    specFileBaseName?: string

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

    @default: "swagger"

    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.
    'immediate'
    
    specVersion?: SupportedSpecMajorVersion

    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?: Tag[]

    Swagger Tags Information for your API

    termsOfService?: string

    Link to the page that describes the terms of service. Must be in the URL format.

    useTitleTagsForInlineObjects?: boolean

    Sets a title for inline objects for responses and requestBodies This helps to generate more consistent clients

    version?: string

    API version number; defaults to npm package version

    xEnumVarnames?: boolean

    Enable x-enum-varnames support

    false
    
    yaml?: boolean