routing-controllers
routing-controllers copied to clipboard
Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage in Express / Koa using TypeScript and Routing Controllers Framework.
### Description The usage of UUID instead of id in routes like: `http://0.0.0.0:3000/api/products/04879b32-c329-48d7-a652-818794b684f1` Is trying to build JSON object while returning a raw parameter(uuid) provided. References to similar problems: -...
### Description npm security audit suggesting moderate vulnerability ```ts [moderate] Hostname spoofing via backslashes in URL - dependencies (optional): routing-controllers>koa-router>urijs ``` ### Expected behavior Solid & Secure library ### Actual...
Hey guys! I saw a similar question already, but not exactly. Also I haven't found satisfying answers there as well. The case: In my current project I use `Joi` to...
## My case Request `GET /?sortBy=name` with codes blow: ```typescript import { IsString, IsOptional } from 'class-validator'; import { JsonController, Get, QueryParams } from 'routing-controllers'; class BaseModel { @IsString() name:...
Is there a way to create an instance of a controller per request? This would allow providing context about the request to all the methods of the controller (ie: `currentUser`,...
### Description Since koa and express were added to `optionalDependencies` in [this commit](https://github.com/typestack/routing-controllers/commit/37b2a34bef2caf0cfeb1afa7ba7288be2b98f9ec), adding routing-controllers as a dependency now installs both koa and express as runtime dependencies. This unnecessarily bloats...
### Description The authorization checker is executed after the middlewares (beforeMiddlewares). **Minimal code-snippet showcasing the problem** ```ts import 'reflect-metadata'; import { /*createExpressServer,*/ createKoaServer, JsonController, Authorized, Get, Action, UseBefore } from...
I was writing a PR and I noticed that the repository has both t he `yarn.lock` and `package-lock.json` file. Is there a reason for that? I'm not 100% sure but...
### Description **koa-router**, **koa-multer** and **kcors** are not the recommended packages anymore. They should be changed to **@koa/router**, **@koa/multer** and **@koa/cors** respectively. Note that koa-router actually seems to be a...
I'm trying to change the default message for `@Authorized()` but I can't figure it out where to do so, how can I change it?