mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
normalization for docgen:read: add groups and so on (wip)
This commit is contained in:
@@ -33,7 +33,7 @@ class Scope
|
||||
* @ORM\Id
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
* @Groups({"read"})
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private $id;
|
||||
|
||||
@@ -43,7 +43,7 @@ class Scope
|
||||
* @var array
|
||||
*
|
||||
* @ORM\Column(type="json")
|
||||
* @Groups({"read"})
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private $name = [];
|
||||
|
||||
|
@@ -45,6 +45,6 @@ class UserNormalizer implements NormalizerAwareInterface, NormalizerInterface
|
||||
|
||||
public function supportsNormalization($data, ?string $format = null): bool
|
||||
{
|
||||
return 'json' === $format && $data instanceof User;
|
||||
return $data instanceof User && ('json' === $format || 'docgen' === $format);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user