-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Having the ability to separate routes based on tags specified in the openapi schema. This would make it easier to implement routes in classes for that specific tag.
I would assume it might end up looking something like this
export type MiscEndpoints = {
getVersion: GetVersion,
getSpec: GetSpec,
}
export type Implementation {
miscRoutes: MiscEndpoints ,
// non tagged endpoint
getInfo: GetInfo,
}I assume this might end up requiring a little more work as to figure out that MiscRoutes implements sub routes, so I'm not sure of what the best way to do that is for this project, but hopefully this is enough information to give you an idea of what I am trying to get at.
Generally in most cases you end up having a file full of functions that implements something like /users endpoint, and you would return a router implementing those routes, but would be nice to be able to implement these routes from a class such as in my case.
Right now it's not very easy to implement from a class, cause I generally have to make another structure and target specific routes for those specific routes such as /users, and /version and /spec are misc routes.
Would like to discuss more on this topic, if you have any ideas?