Skip to content

test(api): decode recorded FAPI responses through the SDK serializers - #1149

Closed
mikepitre wants to merge 1 commit into
mainfrom
test/recorded-fapi-decoding
Closed

mikepitre wants to merge 1 commit into
mainfrom
test/recorded-fapi-decoding

Conversation

@mikepitre

Copy link
Copy Markdown
Collaborator

Why

Four recent fixes (#1027, #1055, #1059, #1064) were for FAPI responses the SDK serializers could not decode. Each fix added its own unit test. This adds one place to keep such response shapes, so the next one is a JSON file and not a new test.

What changed

  • RecordedResponseDecodingTest decodes every file under source/api/src/test/resources/fapi/<type>/ with ClerkApi.json and the serializer registered for that directory. It lists every file that fails. A directory with no registered serializer also fails.
  • Four fixtures, one per past bug: an RFC 3339 created_at, an enterprise connection without a logo, an unknown invitation status, and null role descriptions.

Scope

Verification

  • :source:api:testDebugUnitTest --tests RecordedResponseDecodingTest on this branch: 1 test, 0 failures.
  • The same test on 49d297c4^, before all four fixes: it fails and names each fixture with the decode error its fix addressed.

🤖 Generated with Claude Code

Recorded responses live under source/api/src/test/resources/fapi, one
directory per response type. The test decodes every file with
ClerkApi.json and the registered serializer and lists each file that no
longer decodes. The first fixtures are the shapes that broke decoding
before: null role and permission descriptions, an enterprise
connection without a logo, an RFC 3339 created_at, and an unrecognized
invitation status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mikepitre

Copy link
Copy Markdown
Collaborator Author

Closing. Hand-written fixtures only guard the four shapes that already broke; they would stay green when FAPI drifts.

@mikepitre mikepitre closed this Oct 16, 2026
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.

1 participant