Skip to content

Commit

Permalink
nelmio#502 Hide Requirement when not set
Browse files Browse the repository at this point in the history
  • Loading branch information
dpcat237 committed Jun 12, 2016
1 parent a009e97 commit 725e4d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Extractor/Handler/FosRestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,15 @@ public function handle(ApiDoc $annotation, array $annotations, Route $route, \Re
'description' => $annot->description,
'default' => $annot->default,
));
} else {
} elseif ($annot->requirements !== null) {
$annotation->addFilter($annot->name, array(
'requirement' => $this->handleRequirements($annot->requirements).((property_exists($annot, 'map') ? $annot->map : $annot->array) ? '[]' : ''),
'description' => $annot->description,
));
} else {
$annotation->addFilter($annot->name, array(
'description' => $annot->description,
));
}
}
}
Expand Down

0 comments on commit 725e4d9

Please sign in to comment.