Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ npm install zod-from-json-schema

## Zod 3 vs 4

- If you need Zod 4, use the latest version of this package.
- If you need Zod 3, use the latest version that's less than 0.4.0 (at the of writing that's 0.0.5). It supports a smaller subsets of JSON Schema.
Zod 4 is available both as the package version 4, but also as part of the version 3 packages. We support both, as well as Zod 3. Here's which version of this package to use:

|Zod|zod-from-json-schema|
|---|--------------------|
| v4 proper | latest |
| v4 via 3.x | ^0.4.2 |
| v3 | ^0.0.5 |

Note that the older package for Zod 3 supports a smaller subset of JSON schema than the latest. New features will only be added to the latest.

## Usage

Expand Down
30 changes: 24 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zod-from-json-schema",
"version": "0.4.2",
"version": "0.5.0",
"description": "Creates Zod types from JSON Schema at runtime",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down Expand Up @@ -29,9 +29,10 @@
"url": "git+https://github.com/glideapps/zod-from-json-schema.git"
},
"dependencies": {
"zod": "^3.25.25"
"zod": "^4.0.17"
},
"devDependencies": {
"@types/node": "^24.3.0",
"@vitest/coverage-v8": "^3.0.9",
"esbuild": "^0.25.2",
"typescript": "^5.8.3",
Expand Down
Loading