Fixed issue where invalid deserialisation was happening for param style matrix

This commit is contained in:
Vishal Shingala
2020-07-20 16:02:28 +05:30
parent 4eb820014d
commit 4ee4e36c5b
2 changed files with 103 additions and 2 deletions

View File

@@ -2410,8 +2410,8 @@ module.exports = {
// decide explodable params, starting value and separators between key-value and properties for serialisation
switch (style) {
case 'matrix':
isExplodable = true;
startValue = ';' + (paramSchema.type === 'object' ? '' : (paramName + _.isEmpty(paramValue) ? '' : '='));
isExplodable = paramSchema.type === 'object' || explode;
startValue = ';' + ((paramSchema.type === 'object' && explode) ? '' : (paramName + '='));
propSeparator = explode ? ';' : ',';
keyValueSeparator = explode ? '=' : ',';
break;