swagger-node-runner
swagger-node-runner copied to clipboard
route specific middleware for restify
This library is used in swagger-restify-mw but I am unable to have route specific middleware with restify as a result.
Restify requires route specific middleware in the following signature:
server.get('/someroute', [ middleware1, middleware2, someHandler])
However when I export an array for a route I get the error found in line 92 of swagger_router.js
Specifically it looks for a controller that is of type function typeof controllerFunction === 'function'.
Hence I can't do
export const myHandler = [ authenticationMiddleware, routeHandler]
Is there a way to add route specific middleware for restify that is compatible with swagger node runner?