Skip to content

Commit

Permalink
Merge branch 'release/1.2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishal Shingala committed Jul 14, 2020
2 parents 0a38077 + a946b2e commit 9f459cd
Show file tree
Hide file tree
Showing 8 changed files with 544 additions and 294 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# OpenAPI-Postman Changelog
#### v1.2.3 (July 14, 2020)
* Added support for parameter serialisation in conversion and deserialisation in validation.
* Skipped validation for headers/query-params added by security scheme.
* Fixed incorrect Url and collection variable when path level server is present.
* Fixed issue where empty description property caused mismatch.
* Fixed issue where mismatch was happening even when correct path variable is present.
* Fixed dataPath handling for root property when dataPath is empty string.
* Fixed collection variable ignoring when pattern property is present.
* Added support for collection variables for local servers in suggested request for validation.
* Fixed TypeError happening when empty parameter is provided.
* Fixed invalid transaction json path for headers.

#### v1.2.2 (June 29, 2020)
* Added support for collection request as suggested value for missing endpoints.
* Use forked version of oas-resolver to make folder imports work in browser.
Expand Down
7 changes: 4 additions & 3 deletions lib/ajvValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ function validateSchema (schema, valueToUse, options = {}) {
}

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

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

// Ignore unresolved variables from mismatch if option is set
else if (options.ignoreUnresolvedVariables && isPmVariable(_.get(valueToUse, dataPath))) {
else if (options.ignoreUnresolvedVariables &&
isPmVariable(dataPath === '' ? valueToUse : _.get(valueToUse, dataPath))) {
return false;
}
return true;
Expand Down
Loading

0 comments on commit 9f459cd

Please sign in to comment.