Я использую Api Platform v3 и symfony v5. И у меня есть вопрос о странном поведении «Пример значения». Например, простой класс сущностей с пользовательской операцией «with_description»:
<?php
declare(strict_types=1);
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ApiResource(
* collectionOperations={
* "get",
* "post",
* "with_description" = {
* "method" = "POST",
* "path" = "/categories/with-description",
* "controller" = WithDescriptionController::class,
* "normalization_context" = {"groups" = {"category:with_description:read"}},
* "denormalization_context" = {"groups" = {"category:with_description:write"}}
* }
* },
* normalizationContext={"groups" = {"category:read"}},
* denormalizationContext={"groups" = {"category:write"}}
* )
* @ORM\Entity(repositoryClass="App\Repository\CategoryRepository")
*/
class Category
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
* @Groups({"category:read", "category:write", "category:with_description:read", "category:with_description:write"})
*/
private $title;
/**
* @ORM\Column(type="text", nullable=true)
* @Groups({"category:with_description:read", "category:with_description:write"})
*/
private $description;
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
/**
* @return string|null
*/
public function getDescription(): ?string
{
return $this->description;
}
/**
* @param string|null $description
* @return Category
*/
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
}
Простой код создает следующий интерфейс: 
Почему свойство «description» таково не отображается? Что я делаю не так?
Над свойством "description" находится @Groups ({"category: with_description: read", "category: with_description: write"}) со значениями из de | noramalization_groups. Почему отображается только свойство title, в чем причина?