From 7e74f5b636c15546a8477c00e409a28a3d5f5f1c Mon Sep 17 00:00:00 2001 From: Anne Jan Brouwer Date: Sat, 25 Jun 2022 00:47:17 +0200 Subject: [PATCH] Magic (#119) * Swagger up * Publish swagger * API redirect and cleanup * API double prefix * Revert the stupid * v2 * Testing v2 * More v2 * Now with correct v2 --- app/Http/Controllers/MchController.php | 12 ++++++------ routes/web.php | 2 -- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/MchController.php b/app/Http/Controllers/MchController.php index db0aee3..9742505 100644 --- a/app/Http/Controllers/MchController.php +++ b/app/Http/Controllers/MchController.php @@ -19,7 +19,7 @@ class MchController extends Controller * List the available devices. * * @OA\Get( - * path="/mch2022/devices", + * path="/v2/devices", * tags={"MCH2022"}, * @OA\Response(response="default",ref="#/components/responses/undocumented") * ) @@ -47,7 +47,7 @@ public function devices(): JsonResponse * Get the types of apps a device supports. * * @OA\Get( - * path="/{device}/types", + * path="/v2/{device}/types", * @OA\Parameter( * name="device", * in="path", @@ -72,7 +72,7 @@ public function types(string $device): JsonResponse * Get the types of apps a device supports. * * @OA\Get( - * path="/{device}/{type}/categories", + * path="/v2/{device}/{type}/categories", * @OA\Parameter( * name="device", * in="path", @@ -121,7 +121,7 @@ public function categories(string $device, string $type): JsonResponse * Get the apps from a device / type / category * * @OA\Get( - * path="/{device}/{type}/{category}", + * path="/v2/{device}/{type}/{category}", * @OA\Parameter( * name="device", * in="path", @@ -174,7 +174,7 @@ public function apps(string $device, string $type, string $category): JsonRespon * Get the apps from a device / type / category * * @OA\Get( - * path="/{device}/{type}/{category}/{app}", + * path="/v2/{device}/{type}/{category}/{app}", * @OA\Parameter( * name="device", * in="path", @@ -256,7 +256,7 @@ public function app(string $device, string $type, string $category, string $app) * Get app file content * * @OA\Get( - * path="/{device}/{type}/{category}/{app}/{file}", + * path="/v2/{device}/{type}/{category}/{app}/{file}", * @OA\Parameter( * name="device", * in="path", diff --git a/routes/web.php b/routes/web.php index 956fe52..97b2c63 100644 --- a/routes/web.php +++ b/routes/web.php @@ -17,8 +17,6 @@ Route::get('badge/{badge}', 'PublicController@badge')->name('badge'); Route::any('search', 'ProjectsController@index')->name('projects.search'); -Route::get('api', 'PublicController@api'); - Auth::routes(); Route::middleware(['auth'])->group(function () {