fix(xerrors): rename MarshalJSON field platformCode → platform_code #3

Merged
Rene Nochebuena merged 1 commits from fix/platform-code-json-tag into main 2026-05-21 19:30:11 -06:00

Summary

  • Corrects MarshalJSON JSON tag from "platformCode" to "platform_code" to match
    the OpenAPI spec snake_case convention for error response fields
  • Updates all test assertions to expect "platform_code"
  • Adds PR.md to .gitignore

Test plan

  • go test ./... passes
  • JSON output of *Err contains "platform_code", not "platformCode"
  • "platform_code" is omitted when empty (omitempty still applies)
## Summary - Corrects `MarshalJSON` JSON tag from `"platformCode"` to `"platform_code"` to match the OpenAPI spec snake_case convention for error response fields - Updates all test assertions to expect `"platform_code"` - Adds `PR.md` to `.gitignore` ## Test plan - [x] `go test ./...` passes - [x] JSON output of `*Err` contains `"platform_code"`, not `"platformCode"` - [x] `"platform_code"` is omitted when empty (omitempty still applies)
Rene Nochebuena added 1 commit 2026-05-21 19:30:01 -06:00
JSON tag on the anonymous struct inside MarshalJSON corrected from
`json:"platformCode,omitempty"` to `json:"platform_code,omitempty"` to
match the OpenAPI spec snake_case convention. All error responses that
serialize *Err directly now emit "platform_code" instead of "platformCode".
PR.md added to .gitignore.
Rene Nochebuena merged commit 9ce3ac8174 into main 2026-05-21 19:30:11 -06:00
Rene Nochebuena deleted branch fix/platform-code-json-tag 2026-05-21 19:30:12 -06:00
Sign in to join this conversation.