Fixed validation issue where incorrect mismatches were reported for path variables

This commit is contained in:
Vishal Shingala
2021-01-07 11:49:18 +05:30
parent 4ba72c7437
commit a6f84df31b

View File

@@ -3016,8 +3016,7 @@ module.exports = {
var mismatchProperty = 'PATHVARIABLE',
// all path variables defined in this path. acc. to the spec, all path params are required
schemaPathVariables,
pmPathVariables,
schemaPathVar;
pmPathVariables;
if (options.validationPropertiesToIgnore.includes(mismatchProperty)) {
return callback(null, []);
@@ -3035,7 +3034,7 @@ module.exports = {
resolvedParamValue,
index = _.findIndex(determinedPathVariables, pathVar);
schemaPathVar = _.find(schemaPathVariables, (param) => {
const schemaPathVar = _.find(schemaPathVariables, (param) => {
return param.name === pathVar.key;
});