Skip to content

Commit 9f459cd

Browse files
author
Vishal Shingala
committed
Merge branch 'release/1.2.3'
2 parents 0a38077 + a946b2e commit 9f459cd

File tree

8 files changed

+544
-294
lines changed

8 files changed

+544
-294
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
# OpenAPI-Postman Changelog
2+
#### v1.2.3 (July 14, 2020)
3+
* Added support for parameter serialisation in conversion and deserialisation in validation.
4+
* Skipped validation for headers/query-params added by security scheme.
5+
* Fixed incorrect Url and collection variable when path level server is present.
6+
* Fixed issue where empty description property caused mismatch.
7+
* Fixed issue where mismatch was happening even when correct path variable is present.
8+
* Fixed dataPath handling for root property when dataPath is empty string.
9+
* Fixed collection variable ignoring when pattern property is present.
10+
* Added support for collection variables for local servers in suggested request for validation.
11+
* Fixed TypeError happening when empty parameter is provided.
12+
* Fixed invalid transaction json path for headers.
13+
214
#### v1.2.2 (June 29, 2020)
315
* Added support for collection request as suggested value for missing endpoints.
416
* Use forked version of oas-resolver to make folder imports work in browser.

lib/ajvValidation.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ function validateSchema (schema, valueToUse, options = {}) {
6161
}
6262

6363
// for invalid `propertyNames` two error are thrown by Ajv, which include error with `pattern` keyword
64-
if (validationError.keyword === 'pattern') {
65-
return !_.has(validationError, 'propertyName');
64+
if (validationError.keyword === 'pattern' && _.has(validationError, 'propertyName')) {
65+
return false;
6666
}
6767

6868
// As OAS only supports some of Json Schema keywords, and Ajv is supporting all keywords from Draft 7
@@ -72,7 +72,8 @@ function validateSchema (schema, valueToUse, options = {}) {
7272
}
7373

7474
// Ignore unresolved variables from mismatch if option is set
75-
else if (options.ignoreUnresolvedVariables && isPmVariable(_.get(valueToUse, dataPath))) {
75+
else if (options.ignoreUnresolvedVariables &&
76+
isPmVariable(dataPath === '' ? valueToUse : _.get(valueToUse, dataPath))) {
7677
return false;
7778
}
7879
return true;

0 commit comments

Comments
 (0)