* * @ApiResource( * collectionOperations={"get"={"method"="GET"}}, * itemOperations={"get"={"method"="GET"}}) * ) */ class Dummy { /** * @var int */ private $id; /** * @var string * * @Assert\NotBlank * @ApiProperty(iri="http://schema.org/name") */ private $name; /** * @var array */ private $foo; 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) { } public function setFoo(array $foo = null) { } }