Merge pull request #1735 from maxperrimond/fos-query-param-map

Fix Fos rest query param with map
This commit is contained in:
Guilhem Niot 2020-11-03 10:10:02 +01:00 committed by GitHub
commit dd8d3c00b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,10 @@ final class FosRestDescriber implements RouteDescriberInterface
$parameter->description = $annotation->description;
}
if ($annotation->map) {
$parameter->explode = true;
}
$schema = Util::getChild($parameter, OA\Schema::class);
$this->describeCommonSchemaFromAnnotation($schema, $annotation);
} else {
@ -153,7 +157,6 @@ final class FosRestDescriber implements RouteDescriberInterface
if ($annotation->map) {
$schema->type = 'array';
$schema->collectionFormat = 'multi';
$schema->items = Util::getChild($schema, OA\Items::class);
}