koa-swagger-decorator icon indicating copy to clipboard operation
koa-swagger-decorator copied to clipboard

How to use koa-swagger-decorator with Dependency Injection such as InversifyJS?

Open kieuquangloc opened this issue 1 month ago • 0 comments

The problem: to register UserController with SwaggerRouter, we need to call swaggerRouter.applyRoute(UserController);

and swaggerRouter init UserController by itself

But the controller should be call from Container of Inversify const userController = container.get<UserController>(TYPES.UserController);

Do you have any suggestion?

kieuquangloc avatar Jan 10 '25 08:01 kieuquangloc