diff --git a/app/Http/Requests/ReceiveSwitchRequest.php b/app/Http/Requests/ReceiveSwitchRequest.php index a9242b9..da002df 100644 --- a/app/Http/Requests/ReceiveSwitchRequest.php +++ b/app/Http/Requests/ReceiveSwitchRequest.php @@ -7,7 +7,7 @@ use Illuminate\Foundation\Http\FormRequest; /** * @OA\Schema( * schema="ReceiveSwitchRequest", - * required={"id","branch_id", "floor", "type", "name", "is_online", "status"}, + * required={"branch_id", "floor", "type", "name", "is_online", "status"}, * @OA\Property(property="id", type="integer", example="1"), * @OA\Property(property="branch_id", type="integer", example="1"), * @OA\Property(property="floor", type="integer", example=2), @@ -31,7 +31,7 @@ class ReceiveSwitchRequest extends ApiRequest public function rules(): array { return [ - 'id' => ['required','integer','exists:rooms,id'], + 'id' => ['nullable'], 'branch_id' => ['required','integer','exists:branches,id'], 'floor' => ['required','integer'], 'type' => ['required','in:unset,pc,svr'],