diff --git a/web/app/Http/Controllers/Api/HealthController.php b/web/app/Http/Controllers/Api/HealthController.php index 2fd96a8..e7bf9a5 100644 --- a/web/app/Http/Controllers/Api/HealthController.php +++ b/web/app/Http/Controllers/Api/HealthController.php @@ -9,7 +9,7 @@ class HealthController extends ApiController { /** * @OA\Get( - * path="/profiles", + * path="/api/health", * @OA\Response( * response=200, * description="Successful operation", diff --git a/web/app/Http/Controllers/ApiController.php b/web/app/Http/Controllers/ApiController.php index 7108b55..12b7c9f 100644 --- a/web/app/Http/Controllers/ApiController.php +++ b/web/app/Http/Controllers/ApiController.php @@ -8,16 +8,12 @@ use Illuminate\Routing\Controller as BaseController; /** * @OA\Info( - * title="My First API Documentation", + * title="PhyrePanel - API Documentation", * version="0.1", * @OA\Contact( - * email="info@yeagger.com" + * email="info@phyrepanel.com" * ), - * ), - * @OA\Server( - * description="Learning env", - * url="https://foo.localhost:8000/api/" - * ), + * ) */ class ApiController extends BaseController { diff --git a/web/config/l5-swagger.php b/web/config/l5-swagger.php index fce7ba1..1449795 100644 --- a/web/config/l5-swagger.php +++ b/web/config/l5-swagger.php @@ -5,7 +5,7 @@ return [ 'documentations' => [ 'default' => [ 'api' => [ - 'title' => 'L5 Swagger UI', + 'title' => 'PhyrePanel API Documentation', ], 'routes' => [ diff --git a/web/db-migrate.sh b/web/db-migrate.sh index 84df7be..a7a8310 100644 --- a/web/db-migrate.sh +++ b/web/db-migrate.sh @@ -1,5 +1,7 @@ PHYRE_PHP=/usr/local/phyre/php/bin/php -rm -rf composer.lock -$PHYRE_PHP composer.phar i +#rm -rf composer.lock +#$PHYRE_PHP composer.phar i $PHYRE_PHP artisan migrate + +$PHYRE_PHP artisan l5-swagger:generate diff --git a/web/routes/api.php b/web/routes/api.php index a19543c..1e352bc 100644 --- a/web/routes/api.php +++ b/web/routes/api.php @@ -14,7 +14,7 @@ use Illuminate\Support\Facades\Route; | */ -Route::get('health', 'HealthController@index'); +Route::get('health', [\App\Http\Controllers\Api\HealthController::class, 'index']); Route::middleware('auth:sanctum')->get('/user', function (Request $request) { return $request->user(); diff --git a/web/storage/api-docs/api-docs.json b/web/storage/api-docs/api-docs.json index aaf4648..6ee8828 100644 --- a/web/storage/api-docs/api-docs.json +++ b/web/storage/api-docs/api-docs.json @@ -1,22 +1,16 @@ { "openapi": "3.0.0", "info": { - "title": "My First API Documentation", + "title": "PhyrePanel - API Documentation", "contact": { - "email": "info@yeagger.com" + "email": "info@phyrepanel.com" }, "version": "0.1" }, - "servers": [ - { - "url": "https://foo.localhost:8000/api/", - "description": "Learning env" - } - ], "paths": { - "/profiles": { + "/health": { "get": { - "operationId": "be3ca7ec61f2f3384156bcc20722e979", + "operationId": "14039960f5c35aafcd0adcc381fc5f34", "responses": { "200": { "description": "Successful operation"