Skip to content

fix: Postel-tolerant *DisplayConfig in zodgen - #62

Merged
caballeto merged 1 commit into
mainfrom
fix/display-config-passthrough
Jul 27, 2026
Merged

fix: Postel-tolerant *DisplayConfig in zodgen#62
caballeto merged 1 commit into
mainfrom
fix/display-config-passthrough

Conversation

@caballeto

Copy link
Copy Markdown
Member

Summary

  • Extend the shared zodgen response-shape classifier so *DisplayConfig is .passthrough() like *Dto / *Response
  • Regenerate api-zod.generated.ts (no hand-authored phone field lists)
  • Add a regression test that additive SMS/phone keys parse

Why

Pinned CLI 1.5.0 rejects GET /api/v1/alert-channels when the API emits additive displayConfig keys (phoneNumber, …), breaking Docs Exec Validation. Parent DTOs were already Postel-tolerant; nested AlertChannelDisplayConfig was not.

Test plan

  • npm test -- --run test/lib/display-config-passthrough.test.ts
  • npm test / npm run typecheck / npm run lint (run locally before push)
  • After merge: cut MINOR release + mono make docs-refresh-pins (API @JsonInclude(NON_NULL) unblocks docs against 1.5.0 without this pin)

Made with Cursor

Nested AlertChannelDisplayConfig stayed .strict() after response DTOs
were relaxed, so additive SMS/phone keys from the API broke list/create.
Classify *DisplayConfig as a response shape in the codegen relaxer and
regenerate — no hand-authored field lists.

Co-authored-by: Cursor <cursoragent@cursor.com>
@caballeto
caballeto merged commit cf21e37 into main Jul 27, 2026
3 checks passed
@caballeto
caballeto deleted the fix/display-config-passthrough branch July 27, 2026 12:35
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