feat: do not register anonymous entities

This commit is contained in:
Maël Gangloff
2024-12-27 15:29:16 +01:00
parent 3ea6e3e929
commit a535d8c2a4
3 changed files with 13 additions and 5 deletions

View File

@@ -4,7 +4,6 @@ namespace App\Entity;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use App\Repository\NameserverRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
@@ -15,6 +14,7 @@ use Symfony\Component\Serializer\Attribute\SerializedName;
#[ORM\Entity(repositoryClass: NameserverRepository::class)]
#[ApiResource(
operations: [
/*
new GetCollection(
uriTemplate: '/nameservers',
normalizationContext: [
@@ -23,6 +23,7 @@ use Symfony\Component\Serializer\Attribute\SerializedName;
],
]
),
*/
new Get(
uriTemplate: '/nameservers/{ldhName}',
normalizationContext: [