feat(api): add tld filters

This commit is contained in:
Maël Gangloff
2024-07-24 20:00:26 +02:00
parent 89e967cadf
commit e347f88fd7
3 changed files with 4 additions and 2 deletions

View File

@@ -2,6 +2,8 @@
namespace App\Entity;
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Metadata\ApiFilter;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
@@ -27,6 +29,7 @@ use Symfony\Component\Serializer\Attribute\Groups;
)
]
)]
#[ApiFilter(SearchFilter::class)]
#[ORM\Entity(repositoryClass: TldRepository::class)]
class Tld
{
@@ -65,6 +68,7 @@ class Tld
private ?bool $specification13 = null;
#[ORM\Column(length: 10, nullable: true, enumType: TldType::class)]
#[Groups(["tld:item"])]
private ?TldType $type = null;
public function __construct()