Class AbstractRouteGenerator<Config>Abstract
Properties
Protected
Readonly
metadata
Protected
Readonly
options
Methods
Abstract
GenerateCustomRoutes
- GenerateCustomRoutes(): Promise<void>
Returns Promise<void>
Protected
buildContext
- buildContext(): {
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;
} 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"
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
buildModels
- buildModels(): TsoaRoute.Models
Protected
buildParameterSchema
- buildParameterSchema(source): TsoaRoute.ParameterSchema
Protected
buildPropertySchema
- buildPropertySchema(source): TsoaRoute.PropertySchema
Protected
getRelativeImportPath
- getRelativeImportPath(fileLocation): string
Returns string
Protected
pathTransformer
- pathTransformer(path): string
Returns string
Protected
shouldWriteFile
- shouldWriteFile(fileName, content): Promise<boolean>
Parameters
- fileName: string
- content: string
Returns Promise<boolean>
This is the entrypoint for a generator to create a custom set of routes