Use bracket resolution for application/json

This commit is contained in:
Vishal Shingala
2020-04-15 14:57:04 +05:30
parent 8bd37ae4eb
commit f2a56b4da7

View File

@@ -2451,7 +2451,7 @@ module.exports = {
mismatches.push({
property: mismatchProperty,
transactionJsonPath: transactionPathPrefix,
schemaJsonPath: schemaPathPrefix + '.requestBody.content.application.json.schema',
schemaJsonPath: schemaPathPrefix + '.requestBody.content[application/json].schema',
reasonCode: 'INVALID_BODY',
reason: 'The request body didn\'t match the specified schema'
});
@@ -2462,7 +2462,7 @@ module.exports = {
// mismatches.push({
// property: 'BODY',
// transactionJsonPath: transactionPathPrefix + error.dataPath,
// schemaJsonPath: schemaPathPrefix + '.requestBody.content.application.json.schema.' + error.schemaPath,
// schemaJsonPath: schemaPathPrefix + '.requestBody.content[application/json].schema.' + error.schemaPath,
// reasonCode: error.keyword.toUpperCase(),
// reason: error.message
// });