Closed SwagiWagi closed 7 months ago
Description I want to be able to have middleware add custom parameters to my controller, for example:
const addCustomParamMiddleware = (req: express.Request, res: express.Response, next: nextFuncType) => { req.locals.tsoaCustomParams = { requestId: req.headers["x-request-id"] } next(); } @middlwares(addCustomParamMiddleware) @Get("{screenName}/details") public async details(@Path() screenName: string, @CustomParam("requestId") requestId: string): Promise<any> { //logic } } app.use(addCustomParamMiddleware); registerRoutes(app);
Mistake in repo
Description I want to be able to have middleware add custom parameters to my controller, for example: