Skip to content

fix(sat): add missing requestBody to template/page/smtp update endpoints#38

Open
dmchaledev wants to merge 1 commit into
mainfrom
claude/elegant-edison-7ewvvj
Open

fix(sat): add missing requestBody to template/page/smtp update endpoints#38
dmchaledev wants to merge 1 commit into
mainfrom
claude/elegant-edison-7ewvvj

Conversation

@dmchaledev

Copy link
Copy Markdown
Contributor

Summary

  • PUT /templates/{id} (updateTemplate), PUT /pages/{id} (updateSendingProfile's sibling updatePage), and PUT /smtp/{id} (updateSendingProfile) in sat/openapi.yaml documented no request body at all, even though each resource's POST (create) counterpart already references a schema (Template, Page, SMTP respectively).
  • This is a real gap for anyone generating a client/SDK or an MCP tool definition from this spec: there was no way to know what fields to send when updating a template, landing page, or SMTP sending profile.
  • Fix: add requestBody to each of the three PUT operations, referencing the same schema as its POST sibling — the natural, already-established shape for that resource.

How I found it

A quick audit of sat/openapi.yaml showed 8 of 19 POST/PUT/PATCH operations had no requestBody at all. Most of those (approve/reject/submit-review actions, webhook replay, and POST /users/) may genuinely take no body or need a schema that doesn't exist yet in components/schemas (there's no User schema), so guessing at those would risk documenting something incorrect. The three fixed here were unambiguous: identical resource, existing schema, obvious parity with the POST operation.

Test plan

  • spectral lint sat/openapi.yaml --ruleset .spectral.yaml --fail-severity error passes with the same pre-existing warnings as before (0 errors, 8 warnings — all path-keys-no-trailing-slash, unrelated to this change)
  • Diff reviewed — purely additive, no existing content changed

Follow-up (not in this PR)

Filing a separate issue to track the remaining endpoints missing requestBody (POST /users/, POST /campaigns/{id}/approve|reject|submit-review, POST /webhooks/{id}/deliveries/{delivery_id}/replay), since those need input from someone with knowledge of the actual SAT API request shapes rather than a mechanical fix.


Generated by Claude Code

updateTemplate (PUT /templates/{id}), updatePage (PUT /pages/{id}), and
updateSendingProfile (PUT /smtp/{id}) documented no request body at all,
even though their sibling create endpoints (POST) reference the Template,
Page, and SMTP schemas respectively. Consumers generating clients or SDKs
from this spec had no way to know what to send on update.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018LHGqR9PHAi8rdYPrYkPVf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants