express-openapi-validator icon indicating copy to clipboard operation
express-openapi-validator copied to clipboard

Support for ignoring validation based on specific method and path combinations

Open medolino opened this issue 1 year ago • 0 comments

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!

medolino avatar Sep 26 '24 12:09 medolino