Skip to content

feat(contract): add opt-in query response validation#12

Merged
2wheeh merged 3 commits into
mainfrom
feat/response-validation
Apr 3, 2026
Merged

feat(contract): add opt-in query response validation#12
2wheeh merged 3 commits into
mainfrom
feat/response-validation

Conversation

@2wheeh
Copy link
Copy Markdown
Owner

@2wheeh 2wheeh commented Apr 3, 2026

Add validateResponses option to createTypedContract. When enabled, validates query results against response schemas using Ajv before returning. Catches schema version mismatches at runtime.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
schemos Ready Ready Preview, Comment Apr 3, 2026 6:06pm

2wheeh and others added 3 commits April 4, 2026 03:04
Add validateResponses option to createTypedContract. When enabled,
validates query results against response schemas using Ajv before
returning. Catches schema version mismatches at runtime.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace duplicated Ajv cache + validator logic with validateMsg
primitive. Removes Ajv direct dependency from contract.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@2wheeh 2wheeh force-pushed the feat/response-validation branch from a49b0ab to 5b31493 Compare April 3, 2026 18:05
@2wheeh 2wheeh merged commit eacc8f4 into main Apr 3, 2026
4 checks passed
@2wheeh 2wheeh deleted the feat/response-validation branch April 3, 2026 18:07
@github-actions github-actions Bot mentioned this pull request Apr 3, 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