swagger 文件調整 20250522

This commit is contained in:
allen.yan 2025-05-22 15:35:02 +08:00
parent 9b8499f655
commit b7610b2738
3 changed files with 7 additions and 5 deletions

View File

@ -128,7 +128,7 @@ class RoomControlController extends Controller
* @OA\Post(
* path="/api/room/heartbeat",
* summary="包廂心跳封包指令",
* description="",
* description="記錄設備連線狀況",
* operationId="heartbeatRoomCommand",
* tags={"Room Control"},
* security={{"Authorization":{}}},

View File

@ -7,9 +7,9 @@ use Illuminate\Foundation\Http\FormRequest;
/**
* @OA\Schema(
* schema="ReceiveRoomRegisterRequest",
* required={"branch_id", "room_name", "email" ,"password"},
* @OA\Property(property="branch_id", type="integer", example="1"),
* @OA\Property(property="room_name", type="string", example="102"),
* required={"branch_name", "room_name", "email" ,"password"},
* @OA\Property(property="branch_name", type="string", example="測試"),
* @OA\Property(property="room_name", type="string", example="PC101"),
* @OA\Property(property="room_ip", type="string", example="192.168.1.1"),
* @OA\Property(property="email", type="string", example="XX@gmail.com"),
* @OA\Property(property="password", type="string", example="XXX"),

View File

@ -7,7 +7,8 @@ use Illuminate\Foundation\Http\FormRequest;
/**
* @OA\Schema(
* schema="ReceiveRoomStatusDataRequest",
* required={"hostname", "ip", "status"},
* required={"branch_name","hostname", "ip", "status"},
* @OA\Property(property="branch_name", type="string", example="測試"),
* @OA\Property(property="hostname", type="string", example="PC101"),
* @OA\Property(property="ip", type="string", example="192.168.XX.XX"),
* @OA\Property(property="cpu", type="numeric", example="0.00"),
@ -25,6 +26,7 @@ class ReceiveRoomStatusDataRequest extends ApiRequest
public function rules(): array
{
return [
'branch_name' =>'required|string|exists:branches,name',
'hostname' => 'required|string',
'ip' => 'required|string',
'cpu' => 'nullable|numeric',