From e3ad67307ecbf102d5d2f1f190a3ac68653bf505 Mon Sep 17 00:00:00 2001 From: Mithun Kamath Date: Fri, 26 Mar 2021 20:35:46 +0530 Subject: [PATCH] #182 - Correct swagger route handling --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 07120d28..19a09284 100755 --- a/app.js +++ b/app.js @@ -134,12 +134,12 @@ _.each(routes, (verbs, url) => { }) /* eslint-enable no-param-reassign */ +app.use('/v5/submissions/docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)) app.use('/', apiRouter) app.use(errorMiddleware()) // Serve Swagger Docs after setting host and base path swaggerDocument.host = config.HOST swaggerDocument.basePath = config.API_VERSION -app.use('/v5/submissions/docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)) // Check if the route is not found or HTTP method is not supported app.use('*', (req, res) => {