Skip to content

feat: extract zod and validator schemas#3671

Merged
mrlubos merged 1 commit into
mainfrom
feat/zod-data-split
Apr 2, 2026
Merged

feat: extract zod and validator schemas#3671
mrlubos merged 1 commit into
mainfrom
feat/zod-data-split

Conversation

@mrlubos

@mrlubos mrlubos commented Apr 2, 2026

Copy link
Copy Markdown
Member

Closes #3641

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@changeset-bot

changeset-bot Bot commented Apr 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 96f60ad

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hey-api/openapi-ts Minor
@hey-api/shared Minor
@hey-api/openapi-python Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Apr 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
hey-api-docs Ready Ready Preview, Comment Apr 2, 2026 0:57am

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Apr 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

@hey-api/codegen-core

npm i https://pkg.pr.new/@hey-api/codegen-core@3671

@hey-api/json-schema-ref-parser

npm i https://pkg.pr.new/@hey-api/json-schema-ref-parser@3671

@hey-api/nuxt

npm i https://pkg.pr.new/@hey-api/nuxt@3671

@hey-api/openapi-ts

npm i https://pkg.pr.new/@hey-api/openapi-ts@3671

@hey-api/shared

npm i https://pkg.pr.new/@hey-api/shared@3671

@hey-api/spec-types

npm i https://pkg.pr.new/@hey-api/spec-types@3671

@hey-api/types

npm i https://pkg.pr.new/@hey-api/types@3671

@hey-api/vite-plugin

npm i https://pkg.pr.new/@hey-api/vite-plugin@3671

commit: 96f60ad

@codecov

codecov Bot commented Apr 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 1.24378% with 397 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.38%. Comparing base (46b7d3a) to head (96f60ad).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
packages/openapi-ts/src/plugins/valibot/v1/api.ts 0.00% 56 Missing and 12 partials ⚠️
packages/openapi-ts/src/plugins/zod/mini/api.ts 0.00% 55 Missing and 12 partials ⚠️
packages/openapi-ts/src/plugins/zod/v3/api.ts 0.00% 54 Missing and 12 partials ⚠️
packages/openapi-ts/src/plugins/zod/v4/api.ts 0.00% 54 Missing and 12 partials ⚠️
packages/openapi-ts/src/plugins/zod/config.ts 0.00% 25 Missing ⚠️
packages/openapi-ts/src/plugins/zod/api.ts 0.00% 19 Missing and 3 partials ⚠️
packages/openapi-ts/src/plugins/valibot/config.ts 0.00% 10 Missing ⚠️
...openapi-ts/src/plugins/valibot/shared/operation.ts 0.00% 4 Missing and 4 partials ⚠️
...ges/openapi-ts/src/plugins/zod/shared/operation.ts 0.00% 4 Missing and 4 partials ⚠️
packages/openapi-ts/src/plugins/valibot/api.ts 0.00% 5 Missing and 2 partials ⚠️
... and 22 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3671      +/-   ##
==========================================
- Coverage   38.98%   38.38%   -0.61%     
==========================================
  Files         518      520       +2     
  Lines       18968    19228     +260     
  Branches     5606     5689      +83     
==========================================
- Hits         7395     7380      -15     
- Misses       9367     9587     +220     
- Partials     2206     2261      +55     
Flag Coverage Δ
unittests 38.38% <1.24%> (-0.61%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mrlubos mrlubos marked this pull request as ready for review April 2, 2026 10:25
@pullfrog

pullfrog Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Reviewed 156 changed files across the zod/valibot schema extraction PR. Submitted 4 inline comments covering a JSDoc inaccuracy in validator.ts, verbose inline validators for no-input operations, untyped createRequestSchema guard in oRPC, and duplicated valueToObject resolution in config.ts. No blocking issues found — the core architecture is sound.

Task list (2/9 completed)
  • Read the diff TOC and identify high-risk areas of change
  • Review changesets and understand the feature scope
  • Review core implementation changes (shared, types)
  • Review zod plugin changes
  • Review valibot plugin changes
  • Review orpc and other plugin changes (SDK, typescript, query, etc.)
  • Review pydantic plugin changes
  • Spot-check snapshot changes for correctness
  • Submit review

Pullfrog  | View workflow run | Triggered by Pullfrog𝕏

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. feature 🚀 Feature request. labels Apr 2, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well-structured extraction of zod and valibot schemas from merged "Data" objects into separate per-layer schemas (body, path, query, headers). The architecture is sound — buildOperationSchema + per-layer processor.process() + compositeNode reassembly is a clean decomposition. Two items worth discussing before merge: the inline never-composite for no-input operations in the SDK, and the @default JSDoc inaccuracy.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run𝕏

Comment thread packages/shared/src/plugins/validator.ts Outdated
Comment thread packages/openapi-ts/src/plugins/zod/v4/api.ts
Comment thread packages/openapi-ts/src/plugins/orpc/contracts/node.ts
Comment thread packages/openapi-ts/src/plugins/zod/config.ts
@mrlubos mrlubos merged commit b9dc785 into main Apr 2, 2026
10 of 12 checks passed
@mrlubos mrlubos deleted the feat/zod-data-split branch April 2, 2026 13:01
@hey-api hey-api Bot mentioned this pull request Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 🚀 Feature request. size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incompatible Zod schema shape for oRPC when using orpc + zod plugins

1 participant