use OpenApi\Attributes as OA; class SampleController extends Controller { #[OA\Get( path: '/api/hoge/{id}', summary: 'Get specified hoge data', responses: [ new OA\Response( response: Response::HTTP_OK, description: 'hoge response body', ), ) )] public function get(int $id): JsonRespnose { // 略 } ࣮ྫ # ServiceProvider の登録 php artisan vendor:publish --provider \ "L5Swagger\L5SwaggerServiceProvider" # Swagger UI の 生 成 php artisan l5-swagger:generate -4XBHHFSͷઃఆͱυΩϡϝϯτੜ