mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
Update for latest FOSRestBundle
This commit is contained in:
parent
c946fbcf4f
commit
e3a8fc6df0
@ -341,7 +341,7 @@ class ApiDocExtractor
|
||||
{
|
||||
foreach ($this->reader->getMethodAnnotations($method) as $annot) {
|
||||
if (is_a($annot, self::FOS_REST_QUERY_PARAM_CLASS)) {
|
||||
if ($annot->strict) {
|
||||
if ($annot->strict && $annot->default === null) {
|
||||
$annotation->addRequirement($annot->name, array(
|
||||
'requirement' => $annot->requirements,
|
||||
'dataType' => '',
|
||||
@ -355,7 +355,7 @@ class ApiDocExtractor
|
||||
}
|
||||
} elseif (is_a($annot, self::FOS_REST_REQUEST_PARAM_CLASS)) {
|
||||
$annotation->addParameter($annot->name, array(
|
||||
'required' => !$annot->nullable,
|
||||
'required' => $annot->strict && $annot->default === null,
|
||||
'dataType' => $annot->requirements,
|
||||
'description' => $annot->description,
|
||||
'readonly' => false
|
||||
|
@ -114,7 +114,7 @@ class TestController
|
||||
|
||||
/**
|
||||
* @ApiDoc()
|
||||
* @RequestParam(name="param1", requirements="string", nullable=false, description="Param1 description.")
|
||||
* @RequestParam(name="param1", requirements="string", description="Param1 description.")
|
||||
*/
|
||||
public function zActionWithRequestParamAction()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user