* * @ApiResource( * collectionOperations={ * "get"={"method"="GET"}, * "custom2"={"path"="/foo", "method"="GET"}, * "custom"={"path"="/foo", "method"="POST"}, * }, * itemOperations={"get"={"method"="GET"}}) * ) */ class Dummy { /** * @var int */ private $id; /** * @var string * * @Assert\NotBlank * @ApiProperty(iri="http://schema.org/name") */ private $name; public function getId(): int { return $this->id; } public function setName(string $name) { $this->name = $name; } public function getName(): string { return $this->name; } public function hasRole(string $role) { } }