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

@@ -13,7 +13,51 @@ use App\Domain\Manga\Infrastructure\ApiPlatform\State\Provider\GetMangaChaptersS
new Get(
uriTemplate: '/mangas/{id}/chapters',
provider: GetMangaChaptersStateProvider::class,
output: ChapterCollection::class
output: ChapterCollection::class,
openapiContext: [
'parameters' => [
[
'name' => 'id',
'in' => 'path',
'required' => true,
'schema' => [
'type' => 'string'
],
'description' => 'The manga identifier'
],
[
'name' => 'page',
'in' => 'query',
'required' => false,
'schema' => [
'type' => 'integer',
'default' => 1
],
'description' => 'The page number'
],
[
'name' => 'limit',
'in' => 'query',
'required' => false,
'schema' => [
'type' => 'integer',
'default' => 20
],
'description' => 'Number of items per page'
],
[
'name' => 'sortOrder',
'in' => 'query',
'required' => false,
'schema' => [
'type' => 'string',
'enum' => ['asc', 'desc'],
'default' => 'desc'
],
'description' => 'Sort order for chapters'
]
]
]
)
]
)]