mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 23:59:26 +03:00
Handle FOSRestBundle QueryParam required QueryParams
This commit is contained in:
parent
12247cb56e
commit
c9c5042186
@ -42,6 +42,7 @@ final class FosRestDescriber implements RouteDescriberInterface
|
||||
$in = $annotation instanceof QueryParam ? 'query' : 'formData';
|
||||
$parameter = $operation->getParameters()->get($annotation->getName(), $in);
|
||||
|
||||
$parameter->setRequired(!$annotation->nullable && $annotation->strict);
|
||||
$parameter->setAllowEmptyValue($annotation->nullable && $annotation->allowBlank);
|
||||
$parameter->setType($annotation->map ? 'array' : 'string');
|
||||
$parameter->setDefault($annotation->getDefault());
|
||||
|
Loading…
x
Reference in New Issue
Block a user