express-openapi-validator
Advanced tools
Comparing version 0.21.1 to 0.21.2
@@ -82,3 +82,4 @@ "use strict"; | ||
const pathIdx = startPathIdx + startSearchIdx; | ||
return u.substring(pathIdx); | ||
const path = u.substring(pathIdx); | ||
return path[path.length - 1] === '/' ? path : path + '/'; | ||
} | ||
@@ -85,0 +86,0 @@ } |
@@ -34,3 +34,4 @@ "use strict"; | ||
const apiDoc = ctx.getApiDoc(); | ||
for (const bp of basePaths) { | ||
for (const bpa of basePaths) { | ||
const bp = bpa.replace(/\/$/, ''); | ||
for (const [path, methods] of Object.entries(apiDoc.paths)) { | ||
@@ -45,2 +46,3 @@ for (const [method, schema] of Object.entries(methods)) { | ||
const openApiRoute = `${bp}${path}`; | ||
console.log('----', openApiRoute); | ||
const expressRoute = `${openApiRoute}` | ||
@@ -50,2 +52,3 @@ .split('/') | ||
.join('/'); | ||
console.log('----', openApiRoute, expressRoute); | ||
routes.push({ | ||
@@ -52,0 +55,0 @@ expressRoute, |
{ | ||
"name": "express-openapi-validator", | ||
"version": "0.21.1", | ||
"version": "0.21.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38539
791
6
22