fix(sat): add missing requestBody to template/page/smtp update endpoints#38
Open
dmchaledev wants to merge 1 commit into
Open
fix(sat): add missing requestBody to template/page/smtp update endpoints#38dmchaledev wants to merge 1 commit into
dmchaledev wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PUT /templates/{id}(updateTemplate),PUT /pages/{id}(updateSendingProfile's siblingupdatePage), andPUT /smtp/{id}(updateSendingProfile) insat/openapi.yamldocumented no request body at all, even though each resource'sPOST(create) counterpart already references a schema (Template,Page,SMTPrespectively).requestBodyto each of the threePUToperations, referencing the same schema as itsPOSTsibling — the natural, already-established shape for that resource.How I found it
A quick audit of
sat/openapi.yamlshowed 8 of 19POST/PUT/PATCHoperations had norequestBodyat all. Most of those (approve/reject/submit-review actions, webhook replay, andPOST /users/) may genuinely take no body or need a schema that doesn't exist yet incomponents/schemas(there's noUserschema), so guessing at those would risk documenting something incorrect. The three fixed here were unambiguous: identical resource, existing schema, obvious parity with thePOSToperation.Test plan
spectral lint sat/openapi.yaml --ruleset .spectral.yaml --fail-severity errorpasses with the same pre-existing warnings as before (0 errors, 8 warnings — allpath-keys-no-trailing-slash, unrelated to this change)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