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

Aperta
#951 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #964 di @tridev-tej — chiusa senza merge

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
api, cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).

Lingua principale
Rust
Stelle
32.3k
Fork
2k
Merge medio
16h 3m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di googleworkspace/cli

Tutte le issue di googleworkspace/cli

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.