mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
[FIX] Issue 259
This commit is contained in:
parent
7317c7aa81
commit
018860205c
@ -120,7 +120,7 @@ class JmsMetadataParser implements ParserInterface
|
|||||||
'dataType' => $dataType['normalized'],
|
'dataType' => $dataType['normalized'],
|
||||||
'required' => false,
|
'required' => false,
|
||||||
//TODO: can't think of a good way to specify this one, JMS doesn't have a setting for this
|
//TODO: can't think of a good way to specify this one, JMS doesn't have a setting for this
|
||||||
'description' => $this->getDescription($className, $item),
|
'description' => $this->getDescription($item),
|
||||||
'readonly' => $item->readOnly,
|
'readonly' => $item->readOnly,
|
||||||
'sinceVersion' => $item->sinceVersion,
|
'sinceVersion' => $item->sinceVersion,
|
||||||
'untilVersion' => $item->untilVersion,
|
'untilVersion' => $item->untilVersion,
|
||||||
@ -219,9 +219,9 @@ class JmsMetadataParser implements ParserInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDescription($className, PropertyMetadata $item)
|
protected function getDescription(PropertyMetadata $item)
|
||||||
{
|
{
|
||||||
$ref = new \ReflectionClass($className);
|
$ref = new \ReflectionClass($item->class);
|
||||||
if ($item instanceof VirtualPropertyMetadata) {
|
if ($item instanceof VirtualPropertyMetadata) {
|
||||||
$extracted = $this->commentExtractor->getDocCommentText($ref->getMethod($item->getter));
|
$extracted = $this->commentExtractor->getDocCommentText($ref->getMethod($item->getter));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user