refactor: rename casRef to x-cas-ref for JSON Schema compliance (Phase 3) #292
Reference in New Issue
Block a user
Delete Branch "feat/285-phase3-x-cas-ref"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Rename .meta({ casRef: true }) to .meta({ 'x-cas-ref': true }) for JSON Schema extension convention compliance. Add buildDescriptor test.
Why
Phase 3 of RFC #285. JSON Schema custom extensions should use x- prefix. Zod v4 toJSONSchema automatically preserves meta into JSON Schema output, so buildDescriptor needs no code changes — just the naming convention.
Changes
Dependency
⚠️ Should merge after PR #290 (Phase 2), then rebase.
Testing
220 tests pass, 0 fail. All steps in #291 verified.
Fixes #291, Refs #285
Rename .meta({ casRef: true }) to .meta({ 'x-cas-ref': true }) across all schema annotations. Zod v4 toJSONSchema automatically outputs x-cas-ref in the generated JSON Schema, so buildDescriptor preserves the annotation without any code changes. Add buildDescriptor test verifying x-cas-ref appears in descriptor output for annotated fields and is absent for plain fields. 220 tests pass, 0 fail. Fixes #291, Refs #2858a345691edto33f9425848LGTM ✅