We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When express routes are used like this:
// authorization routines app.use('/auth', require("./routes/auth")); // user profile routines app.use('/user', require("./routes/user"));
The validator fails to find the correct path since it uses req.route.path which returns only the the final path.
req.route.path
E.g. /auth/login request will have /login as req.route.path .
/auth/login
/login
The solution is either use req.baseUrl together with req.route.path or to give an options to pass the baseUrl to validation methods.
req.baseUrl
The text was updated successfully, but these errors were encountered:
Can confirm.
Changing
express-oas-validator/utils/index.js
Line 35 in 10e392a
req.baseUrl + req.route.path
Sorry, something went wrong.
thanks for that info!! We will upload a release today 🚀
Successfully merging a pull request may close this issue.
When express routes are used like this:
The validator fails to find the correct path since it uses
req.route.path
which returns only the the final path.E.g.
/auth/login
request will have/login
asreq.route.path
.The solution is either use
req.baseUrl
together withreq.route.path
or to give an options to pass the baseUrl to validation methods.The text was updated successfully, but these errors were encountered: