feat: add collectCasRefs — schema-level CAS ref annotation (Phase 1) #288

Merged
xiaomo merged 1 commits from feat/285-cas-ref-annotation into main 2026-05-16 10:43:16 +00:00

1 Commits

Author SHA1 Message Date
xiaoju 93b7947d7c feat: add collectCasRefs — extract CAS refs from schema meta annotations
Replaces manual extractRefs functions with declarative schema-level
casRef annotations. Walks Zod v4 schemas recursively, collecting
string values from fields marked with .meta({ casRef: true }).

Supports: objects, arrays, discriminatedUnion, nullable/optional.

8/8 test cases pass (flat, nested, union, null, mixed).

Refs #285, addresses #286
2026-05-16 10:42:24 +00:00