Class AbstractRouteGenerator<Config>Abstract

Type Parameters

Hierarchy (view full)

Constructors

Properties

metadata: Tsoa.Metadata
options: Config

Methods

  • This is the entrypoint for a generator to create a custom set of routes

    Returns Promise<void>

  • 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;
            fileFilter?: ((req, file, callback) => void);
            limits: {
                fieldNameSize?: number;
                fieldSize?: number;
                fields?: number;
                fileSize?: number;
                files?: number;
                headerPairs?: number;
                parts?: number;
            };
            preservePath?: boolean;
            storage?: StorageEngine;
        };
        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;
          fileFilter?: ((req, file, callback) => void);
          limits: {
              fieldNameSize?: number;
              fieldSize?: number;
              fields?: number;
              fileSize?: number;
              files?: number;
              headerPairs?: number;
              parts?: number;
          };
          preservePath?: boolean;
          storage?: StorageEngine;
      }
      • Optional dest?: string
      • Optional fileFilter?: ((req, file, callback) => void)
          • (req, file, callback): void
          • Parameters

            • req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
            • file: File
            • callback: FileFilterCallback

            Returns void

      • limits: {
            fieldNameSize?: number;
            fieldSize?: number;
            fields?: number;
            fileSize?: number;
            files?: number;
            headerPairs?: number;
            parts?: number;
        }
        • Optional fieldNameSize?: number
        • Optional fieldSize?: number
        • Optional fields?: number
        • Optional fileSize?: number
        • Optional files?: number
        • Optional headerPairs?: number
        • Optional parts?: number
      • Optional preservePath?: boolean
      • Optional storage?: StorageEngine
    • useFileUploads: boolean
    • useSecurity: boolean
  • Parameters

    • fileLocation: string

    Returns string

  • Parameters

    • path: string

    Returns string

  • Parameters

    • fileName: string
    • content: string

    Returns Promise<boolean>

Generated using TypeDoc