mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
parent
03f6142a84
commit
a817081ab2
@ -103,8 +103,14 @@ abstract class AbstractFormatter implements FormatterInterface
|
|||||||
*/
|
*/
|
||||||
protected function getNewName($name, $data, $parentName = null)
|
protected function getNewName($name, $data, $parentName = null)
|
||||||
{
|
{
|
||||||
|
$array = '';
|
||||||
$newName = ($parentName) ? sprintf("%s[%s]", $parentName, $name) : $name;
|
$newName = ($parentName) ? sprintf("%s[%s]", $parentName, $name) : $name;
|
||||||
$array = $data['actualType'] == DataTypes::COLLECTION && $data['subType'] !== null ? '[]' : '';
|
|
||||||
|
if (isset($data['actualType']) && $data['actualType'] == DataTypes::COLLECTION
|
||||||
|
&& isset($data['subType']) && $data['subType'] !== null
|
||||||
|
) {
|
||||||
|
$array = '[]';
|
||||||
|
}
|
||||||
|
|
||||||
return sprintf("%s%s", $newName, $array);
|
return sprintf("%s%s", $newName, $array);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user