Fixed incorrect transaction path provided in result

This commit is contained in:
Vishal Shingala
2021-02-15 23:25:05 +05:30
parent 405a004a8d
commit 373c3aba5f

View File

@@ -3869,7 +3869,7 @@ module.exports = {
if (options.showMissingInSchemaErrors) {
mismatches.push({
property: mismatchProperty,
transactionJsonPath: transactionPathPrefix + `[${index}]`,
transactionJsonPath: transactionPathPrefix + `.urlencoded[${index}]`,
schemaJsonPath: null,
reasonCode: 'MISSING_IN_SCHEMA',
reason: `The Url Encoded body param "${uParam.key}" was not found in the schema`
@@ -3892,7 +3892,7 @@ module.exports = {
return cb(null, []);
}
this.checkValueAgainstSchema(mismatchProperty,
transactionPathPrefix + `.urlencoded.[${index}].value`,
transactionPathPrefix + `.urlencoded[${index}].value`,
uParam.key,
resolvedParamValue,
pathPrefix + '.properties[' + schemaParam.name + ']',
@@ -3932,7 +3932,7 @@ module.exports = {
if (!_.find(requestBody.urlencoded, (param) => { return param.key === uParam.name; })) {
mismatchObj = {
property: mismatchProperty,
transactionJsonPath: transactionPathPrefix,
transactionJsonPath: transactionPathPrefix + '.urlencoded',
schemaJsonPath: pathPrefix + '.properties[' + uParam.name + ']',
reasonCode: 'MISSING_IN_REQUEST',
reason: `The Url Encoded body param "${uParam.name}" was not found in the transaction`