GetCalendar/UpdateCalendar: the top-level calendar pair (#12321) - #526
Conversation
BC3 #12321 shipped the show+update-only calendar scope: a top-level BC5
bucketable (distinct from a project) with display metadata and a link
to its underlying schedule. Shape taken from doc/api/sections/
calendars.md at the pinned revision (verified drift-free since
e83b2733); the pinned controller's 422 contract — a field-keyed errors
payload, rejected up front for unknown enum colors — is documented on
the operation. Update body is the nested {calendar: {color}} envelope;
UpdateCalendar is a flagged idempotent PUT. 233 -> 235 operations.
Smithy note: a trailing path label cannot carry the .json suffix in the
same segment, so the URIs follow the established suffix-less-id form.
TS/Ruby/Python pin the exact {calendar: {color}} wire body and surface
the pinned controller's {errors: {color: [...]}} 422 as each SDK's
validation error; 404 covered. paths.json cases for both ops plus an
UpdateCalendar idempotency case ([503, 200] -> 2 requests), dispatch in
all five runners, Ruby's GET-only skip.
Parity 74->75 / 195->197; SPEC ceiling narrative + Appendix E; SECURITY 122 GETs / 47 PUTs; AGENTS totals — the sprint's planned pre-C4 end state (235/122/75/197), matching behavior-model exactly. calendar flips to absorbed-in-sdk with four smithy_refs; README row.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fcebe8cdb8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…y is
Codex caught the mismatch: the shared ValidationError requires a flat
{error} body, but the pinned calendar controller emits {"errors":
{"color": ["is not a valid color"]}}. New FieldValidationError error
shape resolves — via a single FieldKeyedErrors member, the
BookmarkStatus treatment, because a direct map member would unwrap to
the bare map and lose the errors key — to exactly the wire shape:
{errors: {field: [messages]}}. UpdateCalendar's error list swaps to it.
Error-class mapping at runtime is status-driven and unchanged (the
per-SDK 422 tests already pin ValidationError classes against this
payload); this fixes what the OpenAPI contract *describes*.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8fa64da357
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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
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.{"errors": {"color": ["is not a valid color"]}}), same shape as the RecordInvalid path. Documented on the operation and pinned in per-SDK 422 tests.{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)..jsonin the same segment (Literal segments must not contain { or }), so the URIs use the established suffix-less-id form.getCalendarmethod-name override in TS/Kotlin/Swift.Verification
Full
makegreen (exit 0) +make kt-check-generated-driftclean; 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.
CalendarsServicewithgetCalendar(id)andupdateCalendar(id, { calendar: { color } })in TypeScript, Swift, Kotlin, Go, Python, and Ruby./calendars/{calendarId}and expose id, type, name, color, created_at, updated_at, url, app_url, schedule_url.{"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.Written for commit 8fa64da. Summary will update on new commits.