Skip to content

Commit

Permalink
Magic (#119)
Browse files Browse the repository at this point in the history
* Swagger up

* Publish swagger

* API redirect and cleanup

* API double prefix

* Revert the stupid

* v2

* Testing v2

* More v2

* Now with correct v2
  • Loading branch information
annejan authored Jun 24, 2022
1 parent 6b464f0 commit 7e74f5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 6 additions & 6 deletions app/Http/Controllers/MchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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")
* )
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit 7e74f5b

Please sign in to comment.