Skip to content

Commit e3ad673

Browse files
#182 - Correct swagger route handling
1 parent 0992675 commit e3ad673

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ _.each(routes, (verbs, url) => {
134134
})
135135
/* eslint-enable no-param-reassign */
136136

137+
app.use('/v5/submissions/docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument))
137138
app.use('/', apiRouter)
138139
app.use(errorMiddleware())
139140
// Serve Swagger Docs after setting host and base path
140141
swaggerDocument.host = config.HOST
141142
swaggerDocument.basePath = config.API_VERSION
142-
app.use('/v5/submissions/docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument))
143143

144144
// Check if the route is not found or HTTP method is not supported
145145
app.use('*', (req, res) => {

0 commit comments

Comments
 (0)