Ask for JSON on the deletes HEY already answers in JSON
Extenzions.Delete, CalendarEvents.Delete and CalendarEvents.DeleteOccurrence went through the form client: no .json on the path, Accept: */*, and success read off the 302 the web form gets. Haystack has answered all three with a JSON branch (head :no_content) since 690048ed92, which the pinned route snapshot (2026-08-21) already carries — so the SDK was impersonating a browser for nothing.
Change
- Model the three as Smithy operations —
DeleteExtenzion,DeleteCalendarEvent,DeleteCalendarEventOccurrence— and call the generated client, which puts.jsonon the path and asks forapplication/json. Wrappers keep their signatures, so hey-cli needs no change. - The occurrence scope rides in the query as a boolean
apply_to_future(haystack casts it withActiveRecord::Type::Boolean); both scopes are sent explicitly rather than leaving the narrower one to the server's default. openapi.json, the generated client,url-routes.json,route-coverage.jsonandbehavior-model.jsonregenerated; the two calendar routes leaveexcluded-routes.json. The extenzion route was never listed there — the reverse drift filter skips/accounts/.
Not in this PR
The rest of the card's inventory has no JSON representation in haystack yet (workflows, stages, stagings, snippets, clips, collection create/collecting, publications, bulk-reply undo's success branch, time-track categories, HEY World posts): they answer only a redirect or a Turbo Stream, so the SDK can't ask for JSON there until the API grows one. That list is on the card as an [API] follow-up. CalendarEvents.Create/Update/UpdateOccurrence and Extenzions.Create/Update already post to .json paths and decode JSON — form-encoded bodies, but not browser impersonation — and are left alone here.
Tests
- Unit tests for the three deletes assert the
.jsonpath,Accept: application/json, and a 204 answer; the occurrence test covers both scopes'apply_to_futurevalue. - Conformance cases at the HEY layer pin the same wire shape (
calendar-events.json, newextenzions.json). make checkgreen (176 conformance cases).
Basecamp: [SDK] There art multiple SDK methods that request HTML instead of JSON
Summary by cubic
These three deletes now ask for the JSON branch HEY already serves (204 No Content) instead of impersonating a web browser through the form client.
Extenzions.Delete,CalendarEvents.Delete, andCalendarEvents.DeleteOccurrencenow go through the generated client, hitting.jsonpaths withAccept: application/jsonand reading success from the 204.- The occurrence scope is sent as an explicit
apply_to_futureboolean query param; both scopes are stated so the server default isn't relied on. - Public method signatures are unchanged, so
hey-clineeds no update. - Generated artifacts (
openapi.json, Go client, route/behavior files) are regenerated; unit and conformance tests cover the new wire format.