This commit is contained in:
Bozhidar Slaveykov 2024-04-03 12:14:18 +03:00
parent 72b7625c0a
commit c3a7a7b1a2
6 changed files with 14 additions and 22 deletions

View file

@ -9,7 +9,7 @@ class HealthController extends ApiController
{
/**
* @OA\Get(
* path="/profiles",
* path="/api/health",
* @OA\Response(
* response=200,
* description="Successful operation",

View file

@ -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
{

View file

@ -5,7 +5,7 @@ return [
'documentations' => [
'default' => [
'api' => [
'title' => 'L5 Swagger UI',
'title' => 'PhyrePanel API Documentation',
],
'routes' => [

View file

@ -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

View file

@ -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();

View file

@ -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"