feat: SearchManga endpoint + tests
This commit is contained in:
parent
6667cc224b
commit
ae0eac3197
@@ -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
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user