fix(spec): ignore empty string for multi-value parameter (#9511)
Refs #9266 Refs #5176 Co-authored-by: Julien Bourges <julien.bourges@actility.com> Co-authored-by: Oliwia Rogala <oliwia.rogala@smartbear.com>
This commit is contained in:
@@ -374,6 +374,9 @@ export function parameterValues(state, pathMethod, isXml) {
|
||||
let paramValues = operationWithMeta(state, ...pathMethod).get("parameters", List())
|
||||
return paramValues.reduce( (hash, p) => {
|
||||
let value = isXml && p.get("in") === "body" ? p.get("value_xml") : p.get("value")
|
||||
if (List.isList(value)) {
|
||||
value = value.filter(v => v !== "")
|
||||
}
|
||||
return hash.set(paramToIdentifier(p, { allowHashes: false }), value)
|
||||
}, fromJS({}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user