Skip to content

Commit

Permalink
Merge pull request #24 from VKCOM/di/add-swagger-docs-route/QA-15376
Browse files Browse the repository at this point in the history
add custom route and exclude it from auth
  • Loading branch information
irdkwmnsb authored Nov 25, 2024
2 parents b747a5a + 3137169 commit f7031fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/units/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ export default (async function(options) {
, subdev: subdev
})
req.options = reqOptions
if (req.path === '/api/v1/scheme') {
next()
return
}
accessTokenAuth(req)
.then(() => {
next()
Expand All @@ -147,6 +151,7 @@ export default (async function(options) {
, exposeApiDocs: true
, apiDoc: path.resolve(import.meta.dirname, 'swagger', 'api_v1.yaml')
, paths: path.resolve(import.meta.dirname, 'paths')
, docsPath: '/scheme'
}
expressInitialize(config)

Expand Down

0 comments on commit f7031fe

Please sign in to comment.