You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This npm package is a perfect starting point for the Open API generation on Koa projects. But it's very specific, you are forcing people to use the controller as a class and to use your swagger router as an entry point.
What happens if I just want to user the Koa Router like this:
importRouterfrom'koa-router';import{Context,Next}from'koa';constpublicUserRouter=newRouter({});publicUserRouter.get('/users',(ctx: Context,next: Next)=>{console.log('logic to get the users');ctx.body={};returnnext();});
It would be great if we could annotate that definition in some way. Moreover, I think this package does not detect headers and query parameters automatically from the code. Also, you don't give the user the possibility to name the types, you are given names using the class name, and the method name, which IMHO is awful. What if the user wants to reuse the type for other endpoint inputs/outputs?
Maybe you should find a more generic approach like swagger-autogen, the only drawback is that swagger-autogen does not support zod as input types. That is why I was looking for other alternatives without luck until now.
I congrats you for you efforts, but i know it could be better. Thank you in advance.
The text was updated successfully, but these errors were encountered:
This npm package is a perfect starting point for the Open API generation on Koa projects. But it's very specific, you are forcing people to use the controller as a class and to use your swagger router as an entry point.
What happens if I just want to user the Koa Router like this:
It would be great if we could annotate that definition in some way. Moreover, I think this package does not detect headers and query parameters automatically from the code. Also, you don't give the user the possibility to name the types, you are given names using the class name, and the method name, which IMHO is awful. What if the user wants to reuse the type for other endpoint inputs/outputs?
Maybe you should find a more generic approach like swagger-autogen, the only drawback is that swagger-autogen does not support zod as input types. That is why I was looking for other alternatives without luck until now.
I congrats you for you efforts, but i know it could be better. Thank you in advance.
The text was updated successfully, but these errors were encountered: