Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fixed api docs around the "spoilers" parameter #546

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Dto/Concerns/HasSpoilersParameter.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/**
* @OA\Parameter(
* name="spoiler",
* name="spoilers",
* in="query",
* required=false,
* description="Any reviews that are tagged as a spoiler. Spoiler reviews are not returned by default. e.g usage: `?spoiler=true`",
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/V4DB/AnimeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use App\Dto\AnimeUserUpdatesLookupCommand;
use App\Dto\AnimeVideosEpisodesLookupCommand;
use App\Dto\AnimeVideosLookupCommand;
use Illuminate\Http\Request;
use OpenApi\Annotations as OA;

class AnimeController extends Controller
{
Expand Down Expand Up @@ -669,7 +669,7 @@ public function userupdates(AnimeUserUpdatesLookupCommand $command)
*
* @OA\Parameter(ref="#/components/parameters/page"),
* @OA\Parameter(ref="#/components/parameters/preliminary"),
* @OA\Parameter(ref="#/components/parameters/spoiler"),
* @OA\Parameter(ref="#/components/parameters/spoilers"),
*
* @OA\Response(
* response="200",
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/V4DB/MangaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use App\Dto\MangaReviewsLookupCommand;
use App\Dto\MangaStatsLookupCommand;
use App\Dto\MangaUserUpdatesLookupCommand;
use Illuminate\Http\Request;
use OpenApi\Annotations as OA;

class MangaController extends Controller
{
Expand Down Expand Up @@ -387,7 +387,7 @@ public function userupdates(MangaUserUpdatesLookupCommand $command)
*
* @OA\Parameter(ref="#/components/parameters/page"),
* @OA\Parameter(ref="#/components/parameters/preliminary"),
* @OA\Parameter(ref="#/components/parameters/spoiler"),
* @OA\Parameter(ref="#/components/parameters/spoilers"),
*
* @OA\Response(
* response="200",
Expand Down
8 changes: 5 additions & 3 deletions app/Http/Controllers/V4DB/ReviewsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@

use App\Dto\QueryAnimeReviewsCommand;
use App\Dto\QueryMangaReviewsCommand;
use OpenApi\Annotations as OA;

class ReviewsController extends Controller
{
/**
* @OA\Get(
* @OA\
* Get(
* path="/reviews/anime",
* operationId="getRecentAnimeReviews",
* tags={"reviews"},
*
* @OA\Parameter(ref="#/components/parameters/page"),
* @OA\Parameter(ref="#/components/parameters/preliminary"),
* @OA\Parameter(ref="#/components/parameters/spoiler"),
* @OA\Parameter(ref="#/components/parameters/spoilers"),
*
*
* @OA\Response(
Expand Down Expand Up @@ -70,7 +72,7 @@ public function anime(QueryAnimeReviewsCommand $command)
*
* @OA\Parameter(ref="#/components/parameters/page"),
* @OA\Parameter(ref="#/components/parameters/preliminary"),
* @OA\Parameter(ref="#/components/parameters/spoiler"),
* @OA\Parameter(ref="#/components/parameters/spoilers"),
*
* @OA\Response(
* response="200",
Expand Down
12 changes: 6 additions & 6 deletions storage/api-docs/api-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@
"$ref": "#/components/parameters/preliminary"
},
{
"$ref": "#/components/parameters/spoiler"
"$ref": "#/components/parameters/spoilers"
}
],
"responses": {
Expand Down Expand Up @@ -1605,7 +1605,7 @@
"$ref": "#/components/parameters/preliminary"
},
{
"$ref": "#/components/parameters/spoiler"
"$ref": "#/components/parameters/spoilers"
}
],
"responses": {
Expand Down Expand Up @@ -2226,7 +2226,7 @@
"$ref": "#/components/parameters/preliminary"
},
{
"$ref": "#/components/parameters/spoiler"
"$ref": "#/components/parameters/spoilers"
}
],
"responses": {
Expand Down Expand Up @@ -2258,7 +2258,7 @@
"$ref": "#/components/parameters/preliminary"
},
{
"$ref": "#/components/parameters/spoiler"
"$ref": "#/components/parameters/spoilers"
}
],
"responses": {
Expand Down Expand Up @@ -9086,8 +9086,8 @@
"type": "boolean"
}
},
"spoiler": {
"name": "spoiler",
"spoilers": {
"name": "spoilers",
"in": "query",
"description": "Any reviews that are tagged as a spoiler. Spoiler reviews are not returned by default. e.g usage: `?spoiler=true`",
"required": false,
Expand Down