mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Fixed issue where nested objects present in parameters caused validation mismatches
This commit is contained in:
@@ -2873,6 +2873,13 @@ module.exports = {
|
||||
let reason = '',
|
||||
mismatchObj;
|
||||
|
||||
// exclude mismatch errors for nested objects in parameters (at this point simple objects and array should
|
||||
// be already converted to primitive schema and only nested objects remains as type object/array)
|
||||
if (_.includes(['QUERYPARAM', 'PATHVARIABLE', 'HEADER'], property) &&
|
||||
(schema.type === 'object' || schema.type === 'array')) {
|
||||
return callback(null, []);
|
||||
}
|
||||
|
||||
if (property === 'RESPONSE_BODY' || property === 'BODY') {
|
||||
// we don't have names for the body, but there's only one
|
||||
reason = 'The ' + humanPropName;
|
||||
|
||||
Reference in New Issue
Block a user