mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Added handling to report missing in collection mismatch only for required properties
This commit is contained in:
@@ -3831,6 +3831,10 @@ module.exports = {
|
||||
_.has(encodingValue, 'explode') && (resolvedProp.explode = encodingValue.explode);
|
||||
}
|
||||
|
||||
if (_.includes(_.get(urlencodedBodySchema, 'required'), propName)) {
|
||||
resolvedProp.required = true;
|
||||
}
|
||||
|
||||
pSerialisationInfo = this.getParamSerialisationInfo(resolvedProp, PARAMETER_SOURCE.REQUEST,
|
||||
components, schemaCache);
|
||||
isPropSeparable = _.includes(['form', 'deepObject'], pSerialisationInfo.style);
|
||||
@@ -3929,7 +3933,8 @@ module.exports = {
|
||||
});
|
||||
|
||||
_.each(resolvedSchemaParams, (uParam) => {
|
||||
if (!_.find(requestBody.urlencoded, (param) => { return param.key === uParam.name; })) {
|
||||
// report mismatches only for reuired properties
|
||||
if (!_.find(requestBody.urlencoded, (param) => { return param.key === uParam.name; }) && uParam.required) {
|
||||
mismatchObj = {
|
||||
property: mismatchProperty,
|
||||
transactionJsonPath: transactionPathPrefix + '.urlencoded',
|
||||
|
||||
Reference in New Issue
Block a user