chore(spec): re-mirror OpenAPI spec to committed monorepo contract (Task-15 PR-3)#2
Merged
Merged
Conversation
…ask-15 PR-3) Sync vendored tests/fixtures/openapi.json to the committed spec merged to the Sendly monorepo main (@764cc09d). The client stays thin (opaque Mapping bodies), so absorb the contract shift as behaviour clarifications + test/doc updates: - Deletes now return 200 with the deleted id (was 204); no_content=True still discards the body and returns None. Delete tests reworked to a 200 id envelope. - Invalid input now raises SendlyValidationError from 422 VALIDATION_ERROR (was 400); map 422 -> SendlyValidationError so `except SendlyValidationError` keeps catching validation failures. Added client + bulk-op 422 tests. - templates.list is cursor-paginated (limit/cursor); dropped the page/pageSize test and docstring. contacts.list was already cursor-based. - Error envelope additive fields (success:false, error.details.errors) leave message/code parsing unaffected. - CHANGELOG.md added; README error table + templates example updated. Gates: ruff check + ruff format --check clean, mypy src (strict) clean, 81 pytest passed (incl. 5 contract). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GqTuJ7noGQrSC6UMwgfiT8
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
Re-mirror the vendored OpenAPI spec to the committed monorepo contract (post-MAIN-08 seam, monorepo main @764cc09d) and absorb the contract shift:
None.VALIDATION_ERROR(was 400) — 422 maps toSendlyValidationError, and 400 still does too, soexcept SendlyValidationErrorcatches either.templates.listis cursor-paginated (limit/cursor);contacts.listwas already cursor-based.success: false,error.details.errors) leavemessage/codeparsing unaffected.NO_PROJECT→VALIDATION_ERRORerror code on contacts bulk ops.Gates: pytest 81/81 (incl. full contract coverage), mypy --strict clean, ruff clean. Vendored spec byte-identical to monorepo
apps/wiki/openapi.json(blob 383f05a2).🤖 Generated with Claude Code
Session: https://claude.ai/code/session_01GqTuJ7noGQrSC6UMwgfiT8