mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
parent
03f6142a84
commit
a817081ab2
@ -103,8 +103,14 @@ abstract class AbstractFormatter implements FormatterInterface
|
||||
*/
|
||||
protected function getNewName($name, $data, $parentName = null)
|
||||
{
|
||||
$array = '';
|
||||
$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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user