GetCalendar/UpdateCalendar: the top-level calendar pair (#12321)
Merged
JE
4mo ago+2615+2615+0123456789012345678901234567890123456789-28-28-01234567890123456789
C8 of the post-v0.11.0 absorption sprint — the last pre-C4 absorption.
BC3 #12321 shipped the intentionally small calendar scope: show + update on /calendars/:id.json (a top-level BC5 bucketable keyed by its own bucket id, distinct from a project).
What
- Spec:
CalendarsService(tagCalendars, default-fallback mapping) withGetCalendar+UpdateCalendar. 233 → 235 operations. Shape derived fromdoc/api/sections/calendars.mdat the pinned revision — verified drift-free sincee83b2733— per the gap's shape-discovery warning: id, type, name, color, created_at, updated_at, url, app_url, schedule_url, all required non-nullable. - 422 contract: inspected the pinned controller rather than guessing — unknown colors are rejected up front with a field-keyed payload (
{"errors": {"color": ["is not a valid color"]}}), same shape as the RecordInvalid path. Documented on the operation and pinned in per-SDK 422 tests. - Update body: nested
{calendar: {color}}envelope; wire body pinned byte-for-byte in TS/Ruby/Python. UpdateCalendaris a flagged idempotent PUT with an idempotency conformance case (Ruby skip).- Smithy gotcha for the record: a trailing label can't carry
.jsonin the same segment (Literal segments must not contain { or }), so the URIs use the established suffix-less-id form. - Wiring: Go wrapper + accessor, TS/Ruby/Python(sync+async);
getCalendarmethod-name override in TS/Kotlin/Swift. - Counts: 235 total / 122 read-only / 75 idempotent / 197 retry-eligible — the sprint's planned pre-C4 end state, matching behavior-model exactly.
Verification
Full make green (exit 0) + make kt-check-generated-drift clean; 11 Calendar conformance passes + Ruby's justified skip. Live-canary fixture for GetCalendar stays a follow-up (needs a stable dock-walk fixture-id path), noted in the registry entry.
Summary by cubic
Adds the top‑level calendars API with GetCalendar and UpdateCalendar across all SDKs, matching BC3 #12321’s show+update scope. UpdateCalendar is an idempotent PUT with 503 retries, and 422 validation is now modeled as the field‑keyed payload.
- New Features
- Added
CalendarsServicewithgetCalendar(id)andupdateCalendar(id, { calendar: { color } })in TypeScript, Swift, Kotlin, Go, Python, and Ruby. - Calendar is top‑level; URIs use
/calendars/{calendarId}and expose id, type, name, color, created_at, updated_at, url, app_url, schedule_url. - 422 for invalid color returns
{"errors":{"color":["is not a valid color"]}}, now modeled asFieldValidationError/FieldKeyedErrors; tests pin the exact wire shape. UpdateCalendarflagged idempotent with an idempotency conformance case;getCalendarmethod-name override added; operation counts: 235 total / 122 read‑only / 75 idempotent / 197 retry‑eligible.
- Added