mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 23:59:26 +03:00
Merge pull request #1617 from svetlyi/master
Exception message fix for array properties
This commit is contained in:
commit
2b006dab84
@ -32,7 +32,7 @@ class ArrayPropertyDescriber implements PropertyDescriberInterface, ModelRegistr
|
|||||||
{
|
{
|
||||||
$type = $type->getCollectionValueType();
|
$type = $type->getCollectionValueType();
|
||||||
if (null === $type) {
|
if (null === $type) {
|
||||||
throw new \LogicException(sprintf('Property "%s:%s" is an array, but its items type isn\'t specified. You can specify that by using the type `string[]` for instance or `@SWG\Property(type="array", @SWG\Items(type="string"))`.', $class, $propertyName));
|
throw new \LogicException(sprintf('Property "%s" is an array, but its items type isn\'t specified. You can specify that by using the type `string[]` for instance or `@SWG\Property(type="array", @SWG\Items(type="string"))`.', $property->getTitle()));
|
||||||
}
|
}
|
||||||
|
|
||||||
$property->setType('array');
|
$property->setType('array');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user