-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Add ability to ignore validation on routes to avoid 404 status for undocumented routes #141
Comments
currently, if a route resides beneath the base path, the validator requires it to be documented. if the route does not reside beneath the basepath all checks are ignored. does the route you'd like to ignore reside beneath base path? if so, perhaps we can consider providing an |
@cdimascio Yes please do. We're trying to integrate this into our codebase, but don't have all our endpoints documented yet. Meaning we can't gradually introduce this but must do it all in one go, which we don't have the bandwidth for. |
Yes, that's the issue. The affected routes are children of the base path which I haven't documented yet. As @Aidenir mentioned, it would be nice to incrementally apply validation by documenting existing endpoints.
I was thinking of a flag that would skip over undocumented routes, but the |
Will explore this |
@supercoffee @Aidenir please give |
I have added this library to an existing express project, however, not all the existing endpoints are documented in my OAPI spec. In this scenario, all the existing endpoints which are not documented are flagged by the SecurityValidator as non-existent. Is there a way to allow undocumented routes to bypass this middleware?
My installation
Stack trace
Based on my inspection of the code, the security middleware is installed if there are any security options present in the OAPI spec. It would be helpful if there were an option to bypass the installation of security middleware for undocumented routes.
The text was updated successfully, but these errors were encountered: