mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Mismatch reason copy updates
This commit is contained in:
@@ -1798,7 +1798,7 @@ module.exports = {
|
||||
}
|
||||
else if (txnParamName) {
|
||||
// for query params, req/res headers, path vars, we have a name. Praise the lord.
|
||||
reason = `The "${txnParamName}" ${humanPropName}`;
|
||||
reason = `The ${humanPropName} "${txnParamName}"`;
|
||||
}
|
||||
else {
|
||||
// for query params, req/res headers, path vars, we might not ALWAYS have a name.
|
||||
@@ -1814,6 +1814,9 @@ module.exports = {
|
||||
else if (Array.isArray(valueToUse)) {
|
||||
reason += 'an array instead';
|
||||
}
|
||||
else if (typeof valueToUse === 'object') {
|
||||
reason += 'an object instead';
|
||||
}
|
||||
else {
|
||||
reason += `a ${typeof valueToUse} instead`;
|
||||
}
|
||||
@@ -1956,7 +1959,7 @@ module.exports = {
|
||||
transactionJsonPath: null,
|
||||
schemaJsonPath: pathVar.pathPrefix,
|
||||
reasonCode: 'MISSING_IN_REQUEST',
|
||||
reason: `The required path variable ${pathVar.name} was not found in the transaction`
|
||||
reason: `The required path variable "${pathVar.name}" was not found in the transaction`
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -2039,7 +2042,7 @@ module.exports = {
|
||||
transactionJsonPath: null,
|
||||
schemaJsonPath: qp.pathPrefix + '[?(@.name==\'' + qp.name + '\')]',
|
||||
reasonCode: 'MISSING_IN_REQUEST',
|
||||
reason: `The required query parameter ${qp.name} was not found in the transaction`
|
||||
reason: `The required query parameter "${qp.name}" was not found in the transaction`
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -2099,7 +2102,7 @@ module.exports = {
|
||||
transactionJsonPath: null,
|
||||
schemaJsonPath: header.pathPrefix + '[?(@.name==\'' + header.name + '\')]',
|
||||
reasonCode: 'MISSING_IN_REQUEST',
|
||||
reason: `The required header ${header.name} was not found in the transaction`
|
||||
reason: `The required header "${header.name}" was not found in the transaction`
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -2172,7 +2175,7 @@ module.exports = {
|
||||
transactionJsonPath: null,
|
||||
schemaJsonPath: schemaPathPrefix + '.headers[\'' + header.name + '\']',
|
||||
reasonCode: 'MISSING_IN_REQUEST',
|
||||
reason: `The required header ${header.name} was not found in the transaction`
|
||||
reason: `The required response header "${header.name}" was not found in the transaction`
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user