Skip to content

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

Open
medolino wants to merge 1 commit intocdimascio:masterfrom
medolino:master
Open

Support for ignoring validation based on specific method and path combinations#991
medolino wants to merge 1 commit intocdimascio:masterfrom
medolino:master

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