Sitelet https://github.com/googleworkspace/cli/issues/951
Skip to content

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

Open

Description

@robmcd527

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

Activity

  1. added a commit that references this issue on Oct 14, 2026
    8e8ae69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions