-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
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
Install validator on an Express Router #144
Comments
The library must utilize express' that being said, i plan to introduce a feature that enables you to provide a regex that can be used to ignore routes. this should make it possible to still benefit from app params, yet also enable for devs (like yourself) to introduce the validator into a large project, where it's difficult to provide doc for all endpoints upfront. please offer feedback on this and anything else related to this project. all in all, i want to ensure this provides a great experience for devs. |
This issue is related to Add ability to ignore validation on routes to avoid 404 status for undocumented routes (issue #141 and PR #157) The assumption here is that by providing a mechanism to ignore validation on paths, we can make it possible to gradually introduce express-openapi-validator into a large codebase. |
Closing this out as I believe #157 provides what is needed. |
We currently have a very large codebase and not everything is documented in our spec doc. So my idea was to introduce this into Routers instead, so we could introduce it on an endpoint basis gradually instead. But unless I install this on the actual app it doesn't appear to do anything what so ever. I've tried going through the code to find any reason for this, but as I'm somewhat new to express I can't find anything in particular that would prevent it from being installed on a router that is later installed on the app itself.
Other libraries allow you to just get the actual middleware function so you can add this yourself to the method handler, but this doesn't appear to be possible with this library either. Any reason for this?
The text was updated successfully, but these errors were encountered: