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

Abierto
#951 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

  • #964 de @tridev-tej — cerrado sin fusionar

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust
Área
api, cli

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Rust
Estrellas
32.3k
Forks
2k
Merge medio
16 h 3 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de googleworkspace/cli

Todos los issues de googleworkspace/cli

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.