Calendar PATCH schema rejects null needed to clear date/dateTime for in-place conversion

Đang mở
#951 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

  • #964 của @tridev-tej — đã đóng, không merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
api, cli

Hướng nghiên cứu

Start by reproducing the gws calendar events patch command with --dry-run, then trace the request-body schema validation that rejects null values. Confirm the behavior for clearing start.date and end.date during date/dateTime conversion, and verify that the PATCH request is accepted without the workaround of using a full update.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

gws calendar events patch rejects JSON null during schema validation, so a PATCH can't clear start.date/end.date when converting an all-day event to a timed one (or dateTime going the other way).

Repro (gws 0.22.5, no credentials needed):

gws calendar events patch \
  --params '{"calendarId":"synthetic-test","eventId":"synthetic-event"}' \
  --json '{"start":{"date":null,"dateTime":"2026-10-10T10:00:00-07:00"},"end":{"date":null,"dateTime":"2026-10-10T11:00:00-07:00"}}' \
  --dry-run
error[validation]: Request body failed schema validation:
- end.date: Expected type 'string', found null
- start.date: Expected type 'string', found null

Without the null, the existing date is kept and the Calendar API rejects the request with Invalid start time.

Expected: null accepted for optional fields in PATCH bodies, since that is how the API clears them.

Workaround: events get, replace start/end, then events update (full PUT).

Ngôn ngữ chính
Rust
Star
32.3k
Fork
2k
Merge trung bình
16 giờ 3 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của googleworkspace/cli

Tất cả issue của googleworkspace/cli

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.