ldc-arcadia-api/routes/apiv1.php
Jérémy Munsch 62c221f6b6
feat(health): add oracle probe and normalize health checks
Refactor health check DTOs around a common CheckResult contract and remove the\nlegacy HealthChecks aggregate object.\n\nAdd a dedicated /api/v1/health/oracle endpoint with response mapping, OpenAPI\nschema updates, and Bruno request coverage.\n\nAlign feature, unit, integration, architecture and OpenAPI tests with the new\nset-based checks representation and make Oracle health tests deterministic in CI.\n\nUpdate command documentation to the uwil:* command namespace.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-06 14:51:46 +02:00

66 lines
2.7 KiB
PHP

<?php
declare(strict_types=1);
use Application\Arcadia\Config\AppConfig;
use Illuminate\Support\Facades\Route;
use Presentation\Api\V1\Http\Controllers\Brands\BrandShowController;
use Presentation\Api\V1\Http\Controllers\Brands\BrandsIndexController;
use Presentation\Api\V1\Http\Controllers\Employees\EmployeeShowController;
use Presentation\Api\V1\Http\Controllers\Employees\EmployeesIndexController;
use Presentation\Api\V1\Http\Controllers\Health\HealthCheckController;
use Presentation\Api\V1\Http\Controllers\Health\OracleHealthCheckController;
use Presentation\Api\V1\Http\Controllers\IncoCompositions\IncoCompositionShowController;
use Presentation\Api\V1\Http\Controllers\IncoSheets\IncoSheetsIndexController;
use Presentation\Api\V1\Http\Controllers\IncoSheets\IncoSheetsSearchController;
use Presentation\Api\V1\Http\Controllers\IncoSheets\IncoSheetsShowController;
/*
|--------------------------------------------------------------------------
| API V1 Routes
|--------------------------------------------------------------------------
|
| Version 1 of the Arcadia API.
| All routes are prefixed with /api/v1 (configured in bootstrap/app.php).
|
*/
// * ROOT
Route::get('/', fn () => response()->json([
'message' => resolve(AppConfig::class)->name->value . ' v1',
'spec' => route('api.v1.openapi'),
]))->name('root');
// * HEALTH CHECK
Route::get('/health', HealthCheckController::class)->name('health');
Route::get('/health/oracle', OracleHealthCheckController::class)->name('health.oracle');
// * OPENAPI
Route::get('/openapi', function () {
return response()->file(
base_path('documentation/OpenApi/openapi.yaml'),
['Content-Type' => 'application/yaml']
);
})->name('openapi');
Route::middleware('auth.hmac')->group(function (): void {
// * EMPLOYEES
Route::prefix('employees')->group(function (): void {
Route::get('/', EmployeesIndexController::class)->name('employees.index');
Route::get('/{employeeId}', EmployeeShowController::class)->name('employees.show');
});
// * BRANDS
Route::prefix('brands')->group(function (): void {
Route::get('/', BrandsIndexController::class)->name('brands.index');
Route::get('/{brandCode}', BrandShowController::class)->name('brands.show');
});
// * INCO SHEETS
Route::prefix('inco-sheets')->group(function (): void {
Route::get('/', IncoSheetsIndexController::class)->name('inco-sheets.index');
Route::get('/search', IncoSheetsSearchController::class)->name('inco-sheets.search');
Route::get('/{incoId}', IncoSheetsShowController::class)->name('inco-sheets.show');
Route::get('/{incoId}/composition', IncoCompositionShowController::class)->name('inco-sheets.composition');
});
});