'building:item']), new GetCollection(normalizationContext: ['groups' => 'building:list']), // TODO Security!! new Post(), ], order: ['name' => 'DESC'], paginationEnabled: false, )] class Building { #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] #[Groups(['building:list', 'building:item'])] private ?int $id = null; #[ORM\Column(length: 255, name: 'denominazione')] #[Groups(['building:list', 'building:item'])] private ?string $name = null; public function getId(): ?int { return $this->id; } public function setId(int $id): static { $this->id = $id; return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): static { $this->name = $name; return $this; } }