mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
Fix nullable array variables
This commit is contained in:
parent
f16ac2e785
commit
2a3b2df56a
@ -28,7 +28,7 @@ class ArrayPropertyDescriber implements PropertyDescriberInterface, ModelRegistr
|
||||
$this->propertyDescribers = $propertyDescribers;
|
||||
}
|
||||
|
||||
public function describe(Type $type, Schema $property, array $groups)
|
||||
public function describe(Type $type, Schema $property, array $groups = null)
|
||||
{
|
||||
$type = $type->getCollectionValueType();
|
||||
if (null === $type) {
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\PropertyInfo\Type;
|
||||
|
||||
class BooleanPropertyDescriber implements PropertyDescriberInterface
|
||||
{
|
||||
public function describe(Type $type, Schema $property, array $groups)
|
||||
public function describe(Type $type, Schema $property, array $groups = null)
|
||||
{
|
||||
$property->setType('boolean');
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\PropertyInfo\Type;
|
||||
|
||||
class DateTimePropertyDescriber implements PropertyDescriberInterface
|
||||
{
|
||||
public function describe(Type $type, Schema $property, array $groups)
|
||||
public function describe(Type $type, Schema $property, array $groups = null)
|
||||
{
|
||||
$property->setType('string');
|
||||
$property->setFormat('date-time');
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\PropertyInfo\Type;
|
||||
|
||||
class FloatPropertyDescriber implements PropertyDescriberInterface
|
||||
{
|
||||
public function describe(Type $type, Schema $property, array $groups)
|
||||
public function describe(Type $type, Schema $property, array $groups = null)
|
||||
{
|
||||
$property->setType('number');
|
||||
$property->setFormat('float');
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\PropertyInfo\Type;
|
||||
|
||||
class IntegerPropertyDescriber implements PropertyDescriberInterface
|
||||
{
|
||||
public function describe(Type $type, Schema $property, array $groups)
|
||||
public function describe(Type $type, Schema $property, array $groups = null)
|
||||
{
|
||||
$property->setType('integer');
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ class ObjectPropertyDescriber implements PropertyDescriberInterface, ModelRegist
|
||||
{
|
||||
use ModelRegistryAwareTrait;
|
||||
|
||||
public function describe(Type $type, Schema $property, array $groups)
|
||||
public function describe(Type $type, Schema $property, array $groups = null)
|
||||
{
|
||||
$type = new Type($type->getBuiltinType(), false, $type->getClassName(), $type->isCollection(), $type->getCollectionKeyType(), $type->getCollectionValueType()); // ignore nullable field
|
||||
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\PropertyInfo\Type;
|
||||
|
||||
interface PropertyDescriberInterface
|
||||
{
|
||||
public function describe(Type $type, Schema $property, array $groups);
|
||||
public function describe(Type $type, Schema $property, array $groups = null);
|
||||
|
||||
public function supports(Type $type): bool;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\PropertyInfo\Type;
|
||||
|
||||
class StringPropertyDescriber implements PropertyDescriberInterface
|
||||
{
|
||||
public function describe(Type $type, Schema $property, array $groups)
|
||||
public function describe(Type $type, Schema $property, array $groups = null)
|
||||
{
|
||||
$property->setType('string');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user