feat: SearchManga endpoint + tests

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2025-02-10 21:33:34 +01:00
parent 6667cc224b
commit ae0eac3197
25 changed files with 1022 additions and 10 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace App\Domain\Manga\Infrastructure\ApiPlatform\Resource;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use App\Domain\Manga\Infrastructure\ApiPlatform\Dto\MangaSearchCollection;
use App\Domain\Manga\Infrastructure\ApiPlatform\State\Provider\SearchMangaStateProvider;
#[ApiResource(
shortName: 'MangaSearch',
operations: [
new Get(
uriTemplate: '/mangas-search',
openapiContext: [
'parameters' => [
[
'name' => 'title',
'in' => 'query',
'required' => true,
'schema' => [
'type' => 'string'
],
'description' => 'The title to search for'
]
]
],
output: MangaSearchCollection::class,
provider: SearchMangaStateProvider::class
)
]
)]
class MangaSearchResource
{
}