mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
Missing handling for DataTypes::COLLECTION in parameters (input)
This commit is contained in:
parent
38f0bec705
commit
b289a6e846
@ -391,6 +391,22 @@ class SwaggerFormatter implements FormatterInterface
|
|||||||
$models
|
$models
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DataTypes::COLLECTION:
|
||||||
|
$type = 'array';
|
||||||
|
if ($prop['subType'] === DataTypes::MODEL) {
|
||||||
|
$ref = $this->registerModel(
|
||||||
|
$prop['subType'],
|
||||||
|
isset($prop['children']) ? $prop['children'] : null,
|
||||||
|
$prop['description'] ?: $prop['dataType'],
|
||||||
|
$models
|
||||||
|
);
|
||||||
|
} elseif (isset($this->typeMap[$prop['subType']])) {
|
||||||
|
$items = $this->typeMap[$prop['subType']];
|
||||||
|
} else {
|
||||||
|
$items = 'string';
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user