Skip to content
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

Support for ignoring validation based on specific method and path combinations #991

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

medolino
Copy link
Contributor

Hi everyone,
I had a situation where I needed to ignore validation for certain combinations of method and path in my API, but currently, the ignorePaths function only accepts path as an argument. To address this, I’ve implemented support for passing method as a second argument to ignorePaths.

Example:

{
   ignorePaths: (path, method) => path.endsWith('/demo') && method === 'POST'
}

Please take a look and let me know if you find this approach useful or have suggestions for improvement.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant