ldc-arcadia-api/routes/apiv1.php
Jérémy Munsch caa4bb0919
feat(api): restore ping endpoint and add rate limit responses
Restores the /ping endpoint for health checks and adds
429 Too Many Requests response handling to improve API robustness.
2026-08-12 17:26:17 +02:00

23 lines
799 B
PHP

<?php
declare(strict_types=1);
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Route;
use Presentation\Api\V1\Http\Controllers\Employees\EmployeeShowController;
use Presentation\Api\V1\Http\Controllers\Employees\EmployeesIndexController;
Route::get('/', fn () => response()->json([
'message' => Config::string('app.name') . ' v1',
'spec' => route('api.v1.openapi'),
]))->name('root');
Route::get('/openapi', function () {
return response()->file(
base_path('documentation/OpenApi/openapi.yaml'),
['Content-Type' => 'application/yaml']
);
})->name('openapi');
Route::get('/employees', EmployeesIndexController::class)->name('employees.index');
Route::get('/employees/{employeeId}', EmployeeShowController::class)->name('employees.show');