express-openapi-validator
express-openapi-validator copied to clipboard
Support for ignoring validation based on specific method and path combinations
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!