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