diff --git a/src/rest/scripts/utils/get-body-params.js b/src/rest/scripts/utils/get-body-params.js index 38f55d7ad0..5922045b6d 100644 --- a/src/rest/scripts/utils/get-body-params.js +++ b/src/rest/scripts/utils/get-body-params.js @@ -177,7 +177,7 @@ async function getTransformedParam(param, paramType, props) { // In 3.1 a nullable type is part of the param.type array and // the property param.nullable does not exist. if (param.nullable) paramType.push('null') - paramDecorated.type = paramType.filter(Boolean).join(' or ') + paramDecorated.type = Array.from(new Set(paramType.filter(Boolean))).join(' or ') paramDecorated.name = paramKey if (topLevel) { paramDecorated.in = 'body'