Open terencechow opened 6 years ago
This library is used in swagger-restify-mw but I am unable to have route specific middleware with restify as a result.
swagger-restify-mw
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'.
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?
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
Is there a way to add route specific middleware for restify that is compatible with swagger node runner?