生态系统
注意 — 为了避免臃肿和混乱,生态系统部分已在 Zod 4 发布后被彻底清除。如果你已更新库以兼容 Zod 4,请提交 PR 将其重新添加。对于兼容 Zod 3 的库,请参阅 v3.zod.dev。
¥— To avoid bloat and confusion, the Ecosystem section has been wiped clean with the release of Zod 4. If you've updated your library to work with Zod 4, please submit a PR to add it back in. For libraries that work with Zod 3, refer to v3.zod.dev.
越来越多的工具基于 Zod 构建或原生支持 Zod!如果你在 Zod 上构建了工具或库,请告诉我 在 Twitter 上 或 发起讨论。我会在下面添加它并在推特上发布。
¥There are a growing number of tools that are built atop or support Zod natively! If you've built a tool or library on top of Zod, let me know on Twitter or start a Discussion. I'll add it below and tweet it out.
资源
¥Resources
-
修复 TypeScript 的盲点:运行时类型检查 由 @jherr 开发
¥Fixing TypeScript's Blindspot: Runtime Typechecking by @jherr
API 库
¥API Libraries
Name | Stars | Description |
---|---|---|
tRPC | ⭐️ ERR | Build end-to-end typesafe APIs without GraphQL. |
GQLoom | ⭐️ ERR | Weave GraphQL schema and resolvers using Zod. |
oRPC | ⭐️ ERR | Typesafe APIs Made Simple |
Express Zod API | ⭐️ ERR | Build Express-based API with I/O validation and middlewares, OpenAPI docs and type-safe client. |
Zod Sockets | ⭐️ ERR | Socket.IO solution with I/O validation, an AsyncAPI generator, and a type-safe events map. |
Zod JSON-RPC | ⭐️ ERR | Type-safe JSON-RPC 2.0 client/server library using Zod. |
表单集成
¥Form Integrations
Name | Stars | Description |
---|---|---|
regle | ⭐️ ERR | Headless form validation library for Vue.js. |
conform | ⭐️ ERR | A type-safe form validation library utilizing web fundamentals to progressively enhance HTML Forms with full support for server frameworks like Remix and Next.js. |
Superforms | ⭐️ ERR | Making SvelteKit forms a pleasure to use! |
zod-validation-error | ⭐️ ERR | Generate user-friendly error messages from ZodError instances. |
svelte-jsonschema-form | ⭐️ ERR | Svelte 5 library for creating forms based on JSON schema. |
Zod 到 X
¥Zod to X
Name | Stars | Description |
---|---|---|
zod-openapi | ⭐️ ERR | Use Zod Schemas to create OpenAPI v3.x documentation |
fastify-zod-openapi | ⭐️ ERR | Fastify type provider, validation, serialization and @fastify/swagger support for Zod schemas |
zod2md | ⭐️ ERR | Generate Markdown docs from Zod schemas |
X 到 Zod
¥X to Zod
Name | Stars | Description |
---|---|---|
orval | ⭐️ ERR | Generate Zod schemas from OpenAPI schemas |
kubb | ⭐️ ERR | The ultimate toolkit for working with APIs. |
模拟库
¥Mocking Libraries
Name | Stars | Description |
---|---|---|
zod-schema-faker | ⭐️ ERR | Generate mock data from zod schemas. Powered by @faker-js/faker and randexp.js. |
zocker | ⭐️ ERR | Generates valid, semantically meaningful data for your Zod schemas. |
由 Zod 提供支持
¥Powered by Zod
Name | Stars | Description |
---|---|---|
zod-config | ⭐️ ERR | Load configurations across multiple sources with flexible adapters, ensuring type safety with Zod. |
Composable Functions | ⭐️ ERR | Types and functions to make composition easy and safe. |
zod-xlsx | ⭐️ ERR | A xlsx based resource validator using Zod schemas for data imports and more |
Zod 实用程序
¥Zod Utilities
Name | Stars | Description |
---|