get all possible GET, POST ... routes?
Is it possible to list all of the POST, GET ... routes?
You mean like an endpoint that you'd go to that would return a list of all the routes as plain-text?
Thanks for the quick response!
I would like to override all of my posts, here how I'm overriding one:
server.post('/path', function(req, res, next) {
res.json(success);
});
Is is possible to override all POST? Is it possible to get the 'path' of all registered POST requests?
(I just don't want to manually type all of my POST path-es)
Ah, I see what you mean. You want to be able to dynamically add your own middleware based on the endpoints that are in the Swagger definition.
Swagger Server doesn't currently expose that information to you. Although, I like the idea of exposing it, so I'm totally going to add that to the to-do list. But, in the meantime, you can use Swagger Parser (which Swagger Server uses internally) yourself to get that info, and then add your middleware accordingly.
Exactly, thanks for adding this to the TODO list.