mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 23:59:26 +03:00
adjust to feedback
This commit is contained in:
parent
66872da552
commit
72c8c80d9c
@ -52,7 +52,9 @@ class PhpdocPropertyAnnotationReader
|
||||
if (!$title = $docBlock->getSummary()) {
|
||||
/** @var Var_ $var */
|
||||
foreach ($docBlock->getTagsByName('var') as $var) {
|
||||
if (!$description = $var->getDescription()) continue;
|
||||
if (!$description = $var->getDescription()) {
|
||||
continue;
|
||||
}
|
||||
$title = $description->render();
|
||||
if ($title) break;
|
||||
}
|
||||
@ -63,14 +65,5 @@ class PhpdocPropertyAnnotationReader
|
||||
if ($property->getDescription() === null && $docBlock->getDescription() && $docBlock->getDescription()->render()) {
|
||||
$property->setDescription($docBlock->getDescription()->render());
|
||||
}
|
||||
if ($property->getType() === null) {
|
||||
/** @var Var_ $var */
|
||||
foreach ($docBlock->getTagsByName('var') as $var) {
|
||||
if ($var->getType()) {
|
||||
$property->setType($var->getType());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -151,7 +151,8 @@ serialization groups when using the Symfony serializer.
|
||||
### If you're using the JMS Serializer
|
||||
|
||||
The metadata of the JMS serializer are used by default to describe your
|
||||
models. Additional information is extracted from the PHP doc block comment.
|
||||
models. Additional information is extracted from the PHP doc block comment,
|
||||
but the property types must be specified in the JMS annotations.
|
||||
|
||||
In case you prefer using the [Symfony PropertyInfo component](https://symfony.com/doc/current/components/property_info.html) (you
|
||||
won't be able to use JMS serialization groups), you can disable JMS serializer
|
||||
|
Loading…
x
Reference in New Issue
Block a user