mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-04-02 21:36:14 +03:00
Merge pull request #976 from magnetik/fos-required
[3.0] Handle FOSRestBundle QueryParam required
This commit is contained in:
commit
68a1d0b0ee
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue