Class DefaultRouteGenerator

Hierarchy (view full)

Constructors

Properties

metadata: Tsoa.Metadata
pathTransformerFn: ((path) => string)

Type declaration

    • (path): string
    • Parameters

      • path: string

      Returns string

template: string

Methods

  • Returns {
        authenticationModule: undefined | string;
        basePath: string;
        canImportByAlias: boolean;
        controllers: {
            actions: {
                fullPath: string;
                method: string;
                name: string;
                parameters: {
                    [name: string]: TsoaRoute.ParameterSchema;
                };
                path: string;
                security: Tsoa.Security[];
                successStatus: string | number;
                uploadFile: boolean;
                uploadFileName: {
                    name: string;
                }[];
                uploadFiles: boolean;
                uploadFilesName: undefined | string;
            }[];
            modulePath: string;
            name: string;
            path: string;
        }[];
        environment: ProcessEnv;
        esm: undefined | boolean;
        iocModule: undefined | string;
        minimalSwaggerConfig: {
            bodyCoercion: boolean;
            noImplicitAdditionalProperties: "ignore" | "throw-on-extras" | "silently-remove-extras";
        };
        models: TsoaRoute.Models;
        multerOpts: {
            dest?: string;
            limits: {
                fieldNameSize?: number;
                fieldSize?: number;
                fields?: number;
                fileSize?: number;
                files?: number;
                headerPairs?: number;
                parts?: number;
            };
            preservePath?: boolean;
            storage?: StorageEngine;
            fileFilter?(req, file, callback): void;
        };
        useFileUploads: boolean;
        useSecurity: boolean;
    }

    • authenticationModule: undefined | string
    • basePath: string
    • canImportByAlias: boolean
    • controllers: {
          actions: {
              fullPath: string;
              method: string;
              name: string;
              parameters: {
                  [name: string]: TsoaRoute.ParameterSchema;
              };
              path: string;
              security: Tsoa.Security[];
              successStatus: string | number;
              uploadFile: boolean;
              uploadFileName: {
                  name: string;
              }[];
              uploadFiles: boolean;
              uploadFilesName: undefined | string;
          }[];
          modulePath: string;
          name: string;
          path: string;
      }[]
    • environment: ProcessEnv
    • esm: undefined | boolean
    • iocModule: undefined | string
    • minimalSwaggerConfig: {
          bodyCoercion: boolean;
          noImplicitAdditionalProperties: "ignore" | "throw-on-extras" | "silently-remove-extras";
      }
      • bodyCoercion: boolean
      • noImplicitAdditionalProperties: "ignore" | "throw-on-extras" | "silently-remove-extras"
    • models: TsoaRoute.Models
    • multerOpts: {
          dest?: string;
          limits: {
              fieldNameSize?: number;
              fieldSize?: number;
              fields?: number;
              fileSize?: number;
              files?: number;
              headerPairs?: number;
              parts?: number;
          };
          preservePath?: boolean;
          storage?: StorageEngine;
          fileFilter?(req, file, callback): void;
      }
      • Optional dest?: string

        The destination directory for uploaded files. If storage is not set and dest is, Multer will create a DiskStorage instance configured to store files at dest with random filenames.

        Ignored if storage is set.

      • limits: {
            fieldNameSize?: number;
            fieldSize?: number;
            fields?: number;
            fileSize?: number;
            files?: number;
            headerPairs?: number;
            parts?: number;
        }

        An object specifying various limits on incoming data. This object is passed to Busboy directly, and the details of properties can be found at https://github.com/mscdex/busboy#busboy-methods.

        • Optional fieldNameSize?: number

          Maximum size of each form field name in bytes. (Default: 100)

        • Optional fieldSize?: number

          Maximum size of each form field value in bytes. (Default: 1048576)

        • Optional fields?: number

          Maximum number of non-file form fields. (Default: Infinity)

        • Optional fileSize?: number

          Maximum size of each file in bytes. (Default: Infinity)

        • Optional files?: number

          Maximum number of file fields. (Default: Infinity)

        • Optional headerPairs?: number

          Maximum number of headers. (Default: 2000)

        • Optional parts?: number

          Maximum number of parts (non-file fields + files). (Default: Infinity)

      • Optional preservePath?: boolean

        Preserve the full path of the original filename rather than the basename. (Default: false)

      • Optional storage?: StorageEngine

        A StorageEngine responsible for processing files uploaded via Multer. Takes precedence over dest.

      • fileFilter?:function
        • Optional function to control which files are uploaded. This is called for every file that is processed.

          Parameters

          • req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

            The Express Request object.

          • file: File

            Object containing information about the processed file.

          • callback: FileFilterCallback

            a function to control which files should be uploaded and which should be skipped.

          Returns void

    • useFileUploads: boolean
    • useSecurity: boolean

Generated using TypeDoc