Fixed issue where validation was giving INVALID_TYPE instead of MISSING_IN_REQUEST if path variable is not present in transaction

This commit is contained in:
Vishal Shingala
2021-10-05 13:01:39 +05:30
parent b6c51c1824
commit e6b3bb464d
2 changed files with 10 additions and 1 deletions

View File

@@ -447,6 +447,8 @@ class SchemaPack {
return transactionPathVar.key === pathVar.key;
});
pathVar.value = _.get(mappedPathVar, 'value', pathVar.value);
// set _varMatched flag which represents if variable was found in transaction or not
pathVar._varMatched = !_.isEmpty(mappedPathVar);
});
// resolve $ref in all parameter objects if present