From 6f3ac8827398954ea9043dd8667a23b719806eb9 Mon Sep 17 00:00:00 2001 From: Carmine DiMascio Date: Wed, 27 Nov 2019 16:53:55 -0500 Subject: [PATCH] update README --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 149601d9..3ae71ee3 100644 --- a/README.md +++ b/README.md @@ -313,6 +313,7 @@ new OpenApiValidator(options).install({ apiSpec: './openapi.yaml', validateRequests: true, validateResponses: true, + ignorePaths: /.*\/pets$/ unknownFormats: ['phone-number', 'uuid'], multerOpts: { ... }, securityHandlers: { @@ -389,6 +390,16 @@ Determines whether the validator should validate responses. Also accepts respons } ``` +### ▪️ ignorePaths (optional) + +Defines a regular expression that determines whether a path(s) should be ignored. Any path which matches the regular expression will not be validated. + +The following ignores any path that ends in `/pets` + +``` +ignorePaths: /.*\/pets$/ +``` + ### ▪️ unknownFormats (optional)