feat: GetChapters endpoint + tests
This commit is contained in:
parent
2f615a4936
commit
6667cc224b
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\Manga\Infrastructure\ApiPlatform\Resource;
|
||||
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\Get;
|
||||
use App\Domain\Manga\Infrastructure\ApiPlatform\Dto\ChapterCollection;
|
||||
use App\Domain\Manga\Infrastructure\ApiPlatform\State\Provider\GetMangaChaptersStateProvider;
|
||||
|
||||
#[ApiResource(
|
||||
shortName: 'MangaChapters',
|
||||
operations: [
|
||||
new Get(
|
||||
uriTemplate: '/mangas/{id}/chapters',
|
||||
provider: GetMangaChaptersStateProvider::class,
|
||||
output: ChapterCollection::class
|
||||
)
|
||||
]
|
||||
)]
|
||||
class MangaChaptersResource
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user