mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
#502 Hide Requirement when not set
This commit is contained in:
parent
a009e97382
commit
725e4d9dda
@ -56,11 +56,15 @@ class FosRestHandler implements HandlerInterface
|
|||||||
'description' => $annot->description,
|
'description' => $annot->description,
|
||||||
'default' => $annot->default,
|
'default' => $annot->default,
|
||||||
));
|
));
|
||||||
} else {
|
} elseif ($annot->requirements !== null) {
|
||||||
$annotation->addFilter($annot->name, array(
|
$annotation->addFilter($annot->name, array(
|
||||||
'requirement' => $this->handleRequirements($annot->requirements).((property_exists($annot, 'map') ? $annot->map : $annot->array) ? '[]' : ''),
|
'requirement' => $this->handleRequirements($annot->requirements).((property_exists($annot, 'map') ? $annot->map : $annot->array) ? '[]' : ''),
|
||||||
'description' => $annot->description,
|
'description' => $annot->description,
|
||||||
));
|
));
|
||||||
|
} else {
|
||||||
|
$annotation->addFilter($annot->name, array(
|
||||||
|
'description' => $annot->description,
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user