{"_id":"zod-from-json-schema","_rev":"17-d647a629150ca9a22f12e789ec8b4339","name":"zod-from-json-schema","dist-tags":{"latest":"0.5.6"},"versions":{"0.0.1":{"name":"zod-from-json-schema","version":"0.0.1","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.0.1","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"c9fead96722f62566499d3399ff6fcdbdc0dc635","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.0.1.tgz","fileCount":7,"integrity":"sha512-zy2tFLjeFxEVls2FZg7dToRw7PcPwKZF2Zsv2ttoXEDmPsiCW/FBep17LTVkVpeRrrIhTbQ2TRKrPu0pUByCDQ==","signatures":[{"sig":"MEQCIEi0TzvJ6a8ZUgFfIem68XpNabhZiuiCZgEy9PNVWaw6AiA+7MU8KViJ8KFw0pCW2GLFC2ALwAJuh4YYZUn0ziGhdg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19866},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"b85d96c1128e095b2af1acb2d94633e5b500ff6d","scripts":{"test":"vitest run","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","prepare":"npm run build","prepublishOnly":"npm run build"},"_npmUser":{"name":"mark.probst","email":"mark.probst@gmail.com"},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"10.9.2","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"23.10.0","dependencies":{"zod":"^3.24.2"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.2","zod-to-json-schema":"^3.24.5"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.0.1_1743381499587_0.8319979999337617","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"zod-from-json-schema","version":"0.0.2","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.0.2","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"2c8eda71616374d91551e46688ce48e6050e704a","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.0.2.tgz","fileCount":7,"integrity":"sha512-6TXXROc9MpPgXBbntE80nL62EToWfashcf+qEccDfNqL0fng18hVT3nKSTfmcn91m3LnDtFMiH/Zka0dmqKPaQ==","signatures":[{"sig":"MEQCIBH1LV4bb7PPDFugkr6RU8pNdNs+eBfP2/LeLsx0d7B/AiAHF+gysBkcbt6/BNcawupbpLPYf78kqYC7Cr9Oad0m3w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19986},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"b42b075a094294b6ea586adf1deb6b46a3e244be","scripts":{"test":"vitest run","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","prepare":"npm run build","prepublishOnly":"npm run build"},"_npmUser":{"name":"mark.probst","email":"mark.probst@gmail.com"},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"18.20.7","dependencies":{"zod":"^3.24.2"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.2","zod-to-json-schema":"^3.24.5"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.0.2_1743411678227_0.04614625104956893","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"zod-from-json-schema","version":"0.0.3","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.0.3","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"cb9a79afe19af3e5f5474302d210f798eb308efa","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.0.3.tgz","fileCount":7,"integrity":"sha512-LThHy6SAi8lFg6pPO1iNRQTVJAkD9Wl9HDDbQtGYN/8DxcvZ4BS4VUyQzHQuAyAHj5+mcb2MI88Qt6lKetXTvQ==","signatures":[{"sig":"MEYCIQCnueTyTG8G7115Iklg0yiouNieTKc0atycHgzZRQ86hQIhANGH62gUEsMCF9HW6i/jYJ5FDvpKhi93wrxn36hnuyQl","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21241},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"0d7322fbeac5cf11f8575bce331808bda8c39d2b","scripts":{"test":"vitest run","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","prepare":"npm run build","prepublishOnly":"npm run build"},"_npmUser":{"name":"mark.probst","email":"mark.probst@gmail.com"},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"18.20.7","dependencies":{"zod":"^3.24.2"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.2","zod-to-json-schema":"^3.24.5"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.0.3_1743424540389_0.7661461451939562","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"zod-from-json-schema","version":"0.0.4","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.0.4","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"ca307e23da1776652f0004aae35203cd2137f80d","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.0.4.tgz","fileCount":7,"integrity":"sha512-UcgqFfxxqBI/2+5zHnJssJJlxL6UEJTgWYtFRVAgQaNvwPm/F27sv0nGH2fZ6tg94ylGEdI7QtPcNkB8c4L3AA==","signatures":[{"sig":"MEYCIQDvQRTuXh+tx4tJgDZzbZyt3Rlo1w634zKiLkt4PUWzHgIhAI6vgzlTJpi7s41fFvnS/TfMQrUpsHPXPMIF2puepTIU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24902},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"f0e55b3818ddf1cfc759e66aa500a77cdf391030","scripts":{"test":"vitest run --coverage","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","prepare":"npm run build","prepublishOnly":"npm run build"},"_npmUser":{"name":"mark.probst","email":"mark.probst@gmail.com"},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"18.20.8","dependencies":{"zod":"^3.24.2"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.2","zod-to-json-schema":"^3.24.5","@vitest/coverage-v8":"^3.0.9"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.0.4_1744331205070_0.22666110019909924","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"zod-from-json-schema","version":"0.0.5","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.0.5","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"b62b87da65b3c13a78913aa3643761d423d5487e","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.0.5.tgz","fileCount":7,"integrity":"sha512-zYEoo86M1qpA1Pq6329oSyHLS785z/mTwfr9V1Xf/ZLhuuBGaMlDGu/pDVGVUe4H4oa1EFgWZT53DP0U3oT9CQ==","signatures":[{"sig":"MEQCICxyZj89iN0V3FX4mB2I0etPu1CD03MmvWD1reQF/oD0AiApLvy9P1LDyciGyhNyqd6dPjLiI3umadSX2ZrM1eiBnA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25245},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"d7e81f71eb577baf9336e1b1e3cb06f4b6001509","scripts":{"test":"vitest run --coverage","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","prepare":"npm run build","prepublishOnly":"npm run build"},"_npmUser":{"name":"mark.probst","email":"mark.probst@gmail.com"},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"18.20.8","dependencies":{"zod":"^3.24.2"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.2","zod-to-json-schema":"^3.24.5","@vitest/coverage-v8":"^3.0.9"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.0.5_1744332244843_0.6978032695282017","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"zod-from-json-schema","version":"0.4.0","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.4.0","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"5c16f03ac6e08ebfa14451dad0b50ee801a8b398","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.4.0.tgz","fileCount":7,"integrity":"sha512-utByuMQG1JDsNAzGzSIlaPNP/CHUbXd+FPmQ4TUSC0UBMqnqIiMFer+6Vza3Jd4YyPzO6kgLRCnHMAQU8sq1Wg==","signatures":[{"sig":"MEUCIQCoxYGhdXhHxSYS9ycKXImq2jkHc9rcz5E0sp3EkzmAJQIgIK8+edHmxhOJvTTbdzVmTezddmCV+yL5BlQVnCjkWzg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25424},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"1c4c9e7bb6864501165acb9077c0f9b6307015f6","scripts":{"test":"vitest run --coverage","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","prepare":"npm run build","prepublishOnly":"npm run build"},"_npmUser":{"name":"mark.probst","email":"mark.probst@gmail.com"},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"18.20.8","dependencies":{"zod":"^3.25.25"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.3","@vitest/coverage-v8":"^3.0.9"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.4.0_1748127756238_0.7616647292427781","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"zod-from-json-schema","version":"0.4.1","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.4.1","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"3625c7f4b3cbf7f1021c4bb074c3fd395bd32830","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.4.1.tgz","fileCount":7,"integrity":"sha512-SquQhdDg2176+A3XTha5AcmZt+7V0wjJiZhxkO+mnQsxhRr1VI6gVkOzm0G4J8j/LKdOiXA/9fXYFBk+HZ8I+g==","signatures":[{"sig":"MEUCIFwSgRCQZQp4OSWxTezyXRSJYBO5XAyKZx5PoTjw9v11AiEAh3LVgUkXCLKKKKFbQYIN/ZrJQzbdrkI4xTr8Orc8wpQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27454},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","vitest":{"coverage":{"exclude":["build.js"]}},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"454f85403b07673a54bac9300819e31d08ee8163","scripts":{"test":"vitest run --coverage","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","prepare":"npm run build","prepublishOnly":"npm run build"},"_npmUser":{"name":"mark.probst","email":"mark.probst@gmail.com"},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"18.20.8","dependencies":{"zod":"^3.25.25"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.3","@vitest/coverage-v8":"^3.0.9"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.4.1_1748196183431_0.29269491475092835","host":"s3://npm-registry-packages-npm-production"}},"0.4.2":{"name":"zod-from-json-schema","version":"0.4.2","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.4.2","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"7e7e962f28fa1ec6b4d17036e81ec72101cd1355","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.4.2.tgz","fileCount":30,"integrity":"sha512-U+SIzUUT7P6w1UNAz81Sj0Vko77eQPkZ8LbJeXqQbwLmq1MZlrjB3Gj4LuebqJW25/CzS9WA8SjTgR5lvuv+zA==","signatures":[{"sig":"MEUCIQC+je0hy3vdxPwUgSbOMMMIL05Dq8sGTfFWdbhH5lRmsQIgNW8wI+Lc22l7+DNjzDA5e2qc+IrOIIG5pOrNCFFjNvs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":78034},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","vitest":{"coverage":{"exclude":["build.js"]}},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"473bc22b22d8cca13692ba731b326053b988d889","scripts":{"test":"vitest run --coverage","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"mark.probst","email":"mark.probst@gmail.com"},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"18.20.8","dependencies":{"zod":"^3.25.25"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.3","@vitest/coverage-v8":"^3.0.9"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.4.2_1749424472640_0.24839883696085674","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"zod-from-json-schema","version":"0.5.0","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.5.0","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"79ad1f74c4b0855ed618b0a6e3ad5b34e534e781","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.5.0.tgz","fileCount":30,"integrity":"sha512-W1v1YIoimOJfvuorGGp1QroizLL3jEGELJtgrHiVg/ytxVZdh/BTTVyPypGB7YK30LHrCkkebbjuyHIjBGCEzw==","signatures":[{"sig":"MEUCIQCrwL/vOjxim9CvKuhSMJGs23zKYG1+61tIBxPJuBySKgIgHxr+cKPwVhAXomHM69h30o6BmIm5igbFPEr8ApPL+EI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81557},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","vitest":{"coverage":{"exclude":["build.js"]}},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"ea94da9c7a82464f10afacaaf31b36558bac9120","scripts":{"test":"vitest run --coverage","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"mark.probst","email":"mark.probst@gmail.com"},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"18.20.8","dependencies":{"zod":"^4.0.17"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.3","@types/node":"^24.3.0","@vitest/coverage-v8":"^3.0.9"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.5.0_1755776572251_0.03848350179993787","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"zod-from-json-schema","version":"0.1.0","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.1.0","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"3c3e33c91cc2a08bbf2b685ff4b6d1f7b323e5c5","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.1.0.tgz","fileCount":7,"integrity":"sha512-yPcDmFziXePHO8iK4WXl4WcqlKolohQKEdhbJadCzZ/+/ayr1IELxWrVQ/NSUKiuIweNiDlZoi6dgle4Bd1baw==","signatures":[{"sig":"MEYCIQChGi+ISisQiRr3DASG1NHH/eDKscUP73n94UtrIR0PqgIhAKeZyve2Rea3DD0gutreGmifrKbn/rNUk89WuT8hKGfp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25911},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"5e7950e04c66ffc2d9ef66a254ec571d99a0e9ac","scripts":{"test":"vitest run --coverage","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","prepare":"npm run build","prepublishOnly":"npm run build"},"_npmUser":{"name":"mark.probst","email":"mark.probst@gmail.com"},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"18.20.8","dependencies":{"zod":"^3.24.2"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.2","zod-to-json-schema":"^3.24.5","@vitest/coverage-v8":"^3.0.9"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.1.0_1757681017026_0.0095067231454391","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"zod-from-json-schema","version":"0.5.1","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.5.1","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"fc3257b1b7a0ac0cf75aefbdda9542460b4a2975","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.5.1.tgz","fileCount":31,"integrity":"sha512-HZH5mnA6oasGU2mYknkhfZ2LbP2UaRk5cXmgDyc5AZdKvwq/4RY5P/yexPq8vl9rw/3OYvpwMXcDwLag3Tb6DQ==","signatures":[{"sig":"MEUCIEefwfWlfnD8obFWqqSvi70RWB2w3rSp5M4nrstSOqEtAiEAwSgg6aO+NOKe6hDuQrsscDoauufsz2/FtE5gG1dDXK4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82489},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","vitest":{"coverage":{"exclude":["build.js"]}},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"b9faeaeb8ecd6e2d8572e4793d3d4244de535819","scripts":{"test":"vitest run --coverage","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"mark.probst","email":"mark.probst@gmail.com"},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"18.20.8","dependencies":{"zod":"^4.0.17"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.3","@types/node":"^24.3.0","@vitest/coverage-v8":"^3.0.9"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.5.1_1761563472147_0.17419424398375272","host":"s3://npm-registry-packages-npm-production"}},"0.5.2":{"name":"zod-from-json-schema","version":"0.5.2","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.5.2","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"0d56e1a3d3a0f15b6bf22d1aa9653bbf85600eb4","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.5.2.tgz","fileCount":32,"integrity":"sha512-/dNaicfdhJTOuUd4RImbLUE2g5yrSzzDjI/S6C2vO2ecAGZzn9UcRVgtyLSnENSmAOBRiSpUdzDS6fDWX3Z35g==","signatures":[{"sig":"MEYCIQCmoXrC/aIosrscYeahlTel1grtM4iT5eDTWqePkPwV5gIhALV3Mg1V8PavIskmLjKZYSBd/rkIdeMaGEqF2NL+8qRa","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":84775},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","vitest":{"coverage":{"exclude":["build.js"]}},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"7298276887fdbc5229bcf30f10268eb7d731eea8","scripts":{"test":"vitest run --coverage","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"mark.probst","email":"mark.probst@gmail.com"},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"18.20.8","dependencies":{"zod":"^4.0.17"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.3","@types/node":"^24.3.0","@vitest/coverage-v8":"^3.0.9"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.5.2_1763057225579_0.1349896154270378","host":"s3://npm-registry-packages-npm-production"}},"0.5.3":{"name":"zod-from-json-schema","version":"0.5.3","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.5.3","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"f0fbbade08a6289199113368181af2cc7aa538a4","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.5.3.tgz","fileCount":32,"integrity":"sha512-44YFiuq+WHw9YZQAo/Ad0F7o9c/im0Q6cnHI23BsXhEmZtkNn4cD0bljLMMjkfb/EidopPWdsmKI8EvLHX5ZyA==","signatures":[{"sig":"MEYCIQDkrHjEtF8NDimZu09rE93/ZWJLMw3H+LQ8rDPTAek0BAIhANIVkjvI4V7fqPkX0mfFeDjnLNSDtjBC9kzXVzYyc7dO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/zod-from-json-schema@0.5.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":93437},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","vitest":{"coverage":{"exclude":["build.js"]}},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"4aae6657c9e7c3b1dc16c9ceeec86d7e1cc861df","scripts":{"test":"vitest run --coverage","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:39005b4e-aedf-417f-af9d-8ef5d596bf04"}},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"11.16.0","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"24.16.0","dependencies":{"zod":"^4.0.17"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.3","@types/node":"^24.3.0","@vitest/coverage-v8":"^3.0.9"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.5.3_1781191970005_0.2916694294364497","host":"s3://npm-registry-packages-npm-production"}},"0.5.4":{"name":"zod-from-json-schema","version":"0.5.4","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.5.4","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"19205cd620b9bbfc6bdd751ce908f79e58519bbe","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.5.4.tgz","fileCount":38,"integrity":"sha512-l+XRdV8YZAolpJSXDk3kSEam1W0knpSj7vvbA0laOzJyGV7vhmKFqgfl815VePvp2vhPOhbgo4pMtuYKXqkv9w==","signatures":[{"sig":"MEUCIE8qN5ptT92jKTFlFk1ebK6QGEiG3YaMNpQc/YLAye5QAiEA9OrvGqKvZ4ee+oaotRYN49k5pyVtmg6AScBjhCgxu7A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/zod-from-json-schema@0.5.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":127428},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","vitest":{"coverage":{"exclude":["build.js"]}},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"98dba240977f4e5c8d423a4a7af5feff555a58ab","scripts":{"test":"vitest run --coverage","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:39005b4e-aedf-417f-af9d-8ef5d596bf04"}},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"12.0.1","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"24.18.0","dependencies":{"zod":"^4.0.17"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.3","@types/node":"^24.3.0","@vitest/coverage-v8":"^3.0.9"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.5.4_1783735535725_0.5443197796848289","host":"s3://npm-registry-packages-npm-production"}},"0.5.5":{"name":"zod-from-json-schema","version":"0.5.5","keywords":["zod","json-schema","validation","typescript","schema"],"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","_id":"zod-from-json-schema@0.5.5","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"dist":{"shasum":"84d94804b0509708273a4d13da6a813ec2812206","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.5.5.tgz","fileCount":38,"integrity":"sha512-W7Fi0xxpkFCzzESxUQM1LF/ghFgUY/h5U6fH5Q6J9odWH5WJmTazoP8+f6jmrBhnBGI9TqELJrdkn1zsP2gU9g==","signatures":[{"sig":"MEUCIBfEs7g2pDF66E05dEux/PvF6mVHCDjUQeBv5u09z1OdAiEAp3IML5c/9j/A39lSmfviQnltkDFez1j1Rw8D6GHkrSo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/zod-from-json-schema@0.5.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":127596},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","vitest":{"coverage":{"exclude":["build.js"]}},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"74efb4bb70200ab460685b9b763786a90ab92a83","scripts":{"test":"vitest run --coverage","build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","clean":"rm -rf dist","test:fixtures":"vitest run tests/json-fixtures.test.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:39005b4e-aedf-417f-af9d-8ef5d596bf04"}},"repository":{"url":"git+https://github.com/glideapps/zod-from-json-schema.git","type":"git"},"_npmVersion":"12.0.1","description":"Creates Zod types from JSON Schema at runtime","directories":{},"_nodeVersion":"24.18.0","dependencies":{"zod":"^4.0.17"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.3","@types/node":"^24.3.0","@vitest/coverage-v8":"^3.0.9"},"_npmOperationalInternal":{"tmp":"tmp/zod-from-json-schema_0.5.5_1784038078891_0.18046331348421707","host":"s3://npm-registry-packages-npm-production"}},"0.5.6":{"name":"zod-from-json-schema","version":"0.5.6","description":"Creates Zod types from JSON Schema at runtime","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"build":"npm run clean && tsc -d --emitDeclarationOnly --outDir dist && node build.js","test":"vitest run --coverage","test:fixtures":"vitest run tests/json-fixtures.test.ts","prepublishOnly":"npm run build","clean":"rm -rf dist"},"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/glideapps/zod-from-json-schema.git"},"dependencies":{"zod":"^4.0.17"},"devDependencies":{"@types/node":"^24.3.0","@vitest/coverage-v8":"^3.0.9","esbuild":"^0.25.2","typescript":"^5.8.3","vitest":"^3.0.9"},"vitest":{"coverage":{"exclude":["build.js"]}},"keywords":["zod","json-schema","validation","typescript","schema"],"gitHead":"c4a72a30b1c84ce1a3868abe80a4549400095bd1","_id":"zod-from-json-schema@0.5.6","bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"homepage":"https://github.com/glideapps/zod-from-json-schema#readme","_nodeVersion":"24.18.0","_npmVersion":"12.0.1","dist":{"integrity":"sha512-U33AJ7ZWS6y9XNSzMWcdy8hRAvZmWhTtpYJu0SXPT5AArbc9nq2ur7Magzmn5RF9KBV4b3FP0nCpmqqlfXlR9w==","shasum":"a8c7a188a795715d6fff15604101a37dd455d4b1","tarball":"https://registry.npmjs.org/zod-from-json-schema/-/zod-from-json-schema-0.5.6.tgz","fileCount":38,"unpackedSize":130180,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/zod-from-json-schema@0.5.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBExiHqXFMPFnZsjVxJVBTlJKM+E7MXubXpKmvh2TnM7AiAPM+wX6DYmfEN66PtYfvsBO/8WLWf+SSnQ0xJNeYPkQA=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:39005b4e-aedf-417f-af9d-8ef5d596bf04"}},"directories":{},"maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/zod-from-json-schema_0.5.6_1784218719850_0.2056801740425107"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-31T00:38:19.586Z","modified":"2026-07-16T16:18:40.330Z","0.0.1":"2025-03-31T00:38:19.772Z","0.0.2":"2025-03-31T09:01:18.385Z","0.0.3":"2025-03-31T12:35:40.561Z","0.0.4":"2025-04-11T00:26:45.263Z","0.0.5":"2025-04-11T00:44:04.993Z","0.4.0":"2025-05-24T23:02:36.476Z","0.4.1":"2025-05-25T18:03:03.655Z","0.4.2":"2025-06-08T23:14:32.917Z","0.5.0":"2025-08-21T11:42:52.451Z","0.1.0":"2025-09-12T12:43:37.216Z","0.5.1":"2025-10-27T11:11:12.331Z","0.5.2":"2025-11-13T18:07:05.789Z","0.5.3":"2026-06-11T15:32:50.128Z","0.5.4":"2026-07-11T02:05:36.000Z","0.5.5":"2026-07-14T14:07:59.070Z","0.5.6":"2026-07-16T16:18:39.996Z"},"bugs":{"url":"https://github.com/glideapps/zod-from-json-schema/issues"},"author":{"name":"Mark Probst","email":"mark.probst@gmail.com"},"license":"MIT","homepage":"https://github.com/glideapps/zod-from-json-schema#readme","keywords":["zod","json-schema","validation","typescript","schema"],"repository":{"type":"git","url":"git+https://github.com/glideapps/zod-from-json-schema.git"},"description":"Creates Zod types from JSON Schema at runtime","maintainers":[{"name":"mark.probst","email":"mark.probst@gmail.com"}],"readme":"# zod-from-json-schema\n\n[![CI](https://github.com/glideapps/zod-from-json-schema/actions/workflows/ci.yml/badge.svg)](https://github.com/glideapps/zod-from-json-schema/actions/workflows/ci.yml)\n[![Coverage](https://img.shields.io/endpoint?url=https://glideapps.github.io/zod-from-json-schema/badges/coverage.json)](https://github.com/glideapps/zod-from-json-schema/actions/workflows/ci.yml)\n[![npm version](https://img.shields.io/npm/v/zod-from-json-schema.svg)](https://www.npmjs.com/package/zod-from-json-schema)\n\nA library that creates [Zod](https://github.com/colinhacks/zod) types from [JSON Schema](https://json-schema.org/) at runtime.  This is in contrast to [json-schema-to-zod](https://www.npmjs.com/package/json-schema-to-zod), which generates JavaScript source code.\n\n## Installation\n\n```bash\nnpm install zod-from-json-schema\n```\n\n## Zod 3 vs 4\n\nZod 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:\n\n|Zod|zod-from-json-schema|\n|---|--------------------|\n| v4 proper  | latest    |\n| v4 via 3.x | ^0.4.2    |\n| v3 | ^0.1.0            |\n\nNote 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.\n\n## Usage\n\nThis package supports both ESM and CommonJS formats.\n\n### ESM (ES Modules)\n\n```typescript\nimport { convertJsonSchemaToZod } from 'zod-from-json-schema';\n\n// Define a JSON Schema with advanced features\nconst jsonSchema = {\n  $schema: \"https://json-schema.org/draft/2020-12/schema\",\n  type: \"object\",\n  properties: {\n    name: { type: \"string\", minLength: 2, maxLength: 50 },\n    age: { type: \"integer\", minimum: 0, maximum: 120 },\n    email: { type: \"string\", pattern: \"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\\\.[a-zA-Z]{2,}$\" },\n    tags: {\n      type: \"array\",\n      items: { type: \"string\" },\n      uniqueItems: true,\n      minItems: 1,\n      maxItems: 10,\n      contains: { enum: [\"user\", \"admin\", \"guest\"] }\n    },\n    coordinates: {\n      type: \"array\",\n      prefixItems: [\n        { type: \"number\", minimum: -90, maximum: 90 },   // latitude\n        { type: \"number\", minimum: -180, maximum: 180 }  // longitude\n      ],\n      items: false  // No additional items allowed\n    },\n    score: { type: \"number\", multipleOf: 0.5, minimum: 0, maximum: 100 }\n  },\n  required: [\"name\", \"email\"],\n  additionalProperties: false,\n  minProperties: 2,\n  maxProperties: 10\n};\n\n// Convert JSON Schema to Zod schema\nconst zodSchema = convertJsonSchemaToZod(jsonSchema);\n\n// Use the Zod schema to validate data\ntry {\n  const validData = zodSchema.parse({\n    name: \"John Doe\",\n    email: \"john@example.com\",\n    age: 30,\n    tags: [\"user\", \"premium\", \"admin\"],  // Contains required \"admin\" role\n    coordinates: [37.7749, -122.4194],   // San Francisco lat/lng\n    score: 87.5  // Multiple of 0.5\n  });\n  console.log(\"Valid data:\", validData);\n} catch (error) {\n  console.error(\"Validation error:\", error);\n}\n```\n\n### CommonJS\n\n```javascript\nconst { convertJsonSchemaToZod } = require('zod-from-json-schema');\n\n// Define a JSON Schema\nconst jsonSchema = {\n  $schema: \"https://json-schema.org/draft/2020-12/schema\",\n  type: \"object\",\n  properties: {\n    name: { type: \"string\", minLength: 2, maxLength: 50 },\n    age: { type: \"integer\", minimum: 0, maximum: 120 },\n    hobbies: {\n      type: \"array\",\n      items: { type: \"string\" },\n      minItems: 1,\n      maxItems: 5\n    }\n  },\n  required: [\"name\"],\n  additionalProperties: false,\n  minProperties: 1\n};\n\n// Convert JSON Schema to Zod schema\nconst zodSchema = convertJsonSchemaToZod(jsonSchema);\n\n// Use the Zod schema to validate data\ntry {\n  const validData = zodSchema.parse({\n    name: \"John Doe\",\n    age: 30,\n    hobbies: [\"reading\", \"coding\", \"gaming\"]\n  });\n  console.log(\"Valid data:\", validData);\n} catch (error) {\n  console.error(\"Validation error:\", error);\n}\n```\n\n## API Reference\n\n### `convertJsonSchemaToZod(schema)`\n\nConverts a JSON Schema object to a complete Zod schema.\n\n- **Parameters**:\n  - `schema` (Object): A JSON Schema object\n- **Returns**:\n  - A Zod schema that validates according to the JSON Schema\n\n### `jsonSchemaObjectToZodRawShape(schema)`\n\nExtracts the object properties from a JSON Schema object into a Zod raw shape. This is useful when you want to combine the properties with other Zod object configurations.\n\n- **Parameters**:\n  - `schema` (Object): A JSON Schema object that should have a `properties` field\n- **Returns**:\n  - A `ZodRawShape` object that can be used with `z.object()`\n\n**Example**:\n\n```typescript\nimport { jsonSchemaObjectToZodRawShape } from 'zod-from-json-schema';\nimport { z } from 'zod';\n\nconst jsonSchema = {\n  properties: {\n    name: { type: \"string\" },\n    age: { type: \"integer\" }\n  },\n  required: [\"name\"]\n};\n\n// Get just the property definitions\nconst rawShape = jsonSchemaObjectToZodRawShape(jsonSchema);\n\n// Add custom handling\nconst customSchema = z.object({\n  ...rawShape,\n  // Add additional fields not in the JSON Schema\n  createdAt: z.date().default(() => new Date())\n}).refine(data => data.age > 18, {\n  message: \"Age must be over 18 to continue\"\n});\n```\n\n## Supported JSON Schema Features\n\nThis library provides comprehensive support for JSON Schema Draft 2020-12 features with **100% code coverage** and extensive test validation against the official JSON Schema Test Suite.\n\n### Basic Types\n- `string` - Basic string validation\n- `number` - Numeric values (including integers)\n- `integer` - Integer-only numeric values\n- `boolean` - Boolean true/false values\n- `null` - Null values\n- `object` - Object validation with property definitions\n- `array` - Array validation with item constraints\n\n### String Validations\n- `minLength` - Minimum string length (Unicode grapheme-aware)\n- `maxLength` - Maximum string length (Unicode grapheme-aware)\n- `pattern` - Regular expression pattern matching\n\n**Unicode Support**: String length validation correctly counts Unicode grapheme clusters (user-perceived characters) rather than UTF-16 code units, ensuring proper validation of emoji and international text.\n\n### Number Validations\n- `minimum` - Minimum numeric value\n- `maximum` - Maximum numeric value\n- `exclusiveMinimum` - Exclusive minimum (greater than)\n- `exclusiveMaximum` - Exclusive maximum (less than)\n- `multipleOf` - Multiple validation with floating-point precision handling\n\n**Draft-4 Compatibility**: The legacy boolean form of `exclusiveMinimum`/`exclusiveMaximum` (e.g. `{ \"minimum\": 5, \"exclusiveMinimum\": true }`, as used by draft-4 and Swagger 2.0) is also accepted: `true` makes the sibling `minimum`/`maximum` bound exclusive, and `false` is a no-op.\n\n### Array Validations\n- `items` - Item schema validation (supports schemas, boolean values, and arrays)\n- `prefixItems` - Tuple-style positional item validation (Draft 2020-12)\n- `minItems` - Minimum array length\n- `maxItems` - Maximum array length\n- `uniqueItems` - Ensures all array items are unique\n- `contains` - Validates that array contains items matching a schema\n- `minContains` - Minimum number of items matching the contains schema\n- `maxContains` - Maximum number of items matching the contains schema\n\n**Advanced Array Features**:\n- Boolean `items` schemas (`items: false` = empty arrays only, `items: true` = any items allowed)\n- Complex tuple validation with `prefixItems` and additional items control\n- Sophisticated contains validation with count constraints\n\n### Object Validations\n- `properties` - Property schema definitions\n- `required` - Required property validation (supports special JavaScript property names)\n- `additionalProperties` - Controls whether additional properties are allowed\n- `patternProperties` - Regex-based property validation (partial; see [Known Limitations](#known-limitations))\n- `propertyNames` - Validation of property names themselves\n- `dependentSchemas` - Schema dependencies based on property presence\n- `minProperties` - Minimum number of object properties\n- `maxProperties` - Maximum number of object properties\n- `dependentRequired` - Required properties based on other property presence\n\n**Special Property Support**: Correctly handles JavaScript reserved property names like `constructor` and `toString` — inherited members are not mistaken for property values, and own keys are validated normally. `__proto__` is an exception; see [Known Limitations](#known-limitations).\n\n### Schema Composition\n- `const` - Literal value constraints\n- `enum` - Enumerated value validation\n- `anyOf` - Union type validation (basic cases)\n- `allOf` - Intersection validation (basic cases)\n- `oneOf` - Exclusive union validation (exactly one schema must match)\n- `not` - Negation validation\n- `if` / `then` / `else` - Conditional schema application\n\n### References and Definitions\n- `$ref` - Internal references, including JSON pointer fragments (with `~0`/`~1` and percent-encoding escapes) and references to arbitrary schema locations (e.g. `#/properties/foo`)\n- `$defs` / `definitions` - Schema definitions for reuse\n- `$id` - Intra-document base URI resolution (nearest-parent bases, relative and absolute URIs, URN and `file:` bases)\n- `$anchor` - Location-independent identifiers, scoped to their schema resource\n- `$dynamicRef` / `$dynamicAnchor` - Resolved statically, like `$ref`/`$anchor` (no dynamic scoping; see [Known Limitations](#known-limitations))\n- Recursive and mutually recursive references\n- Sibling keywords next to `$ref` apply conjunctively (Draft 2020-12 semantics)\n\nRemote/external references (documents other than the one being converted) are not yet supported and are ignored; see [Known Limitations](#known-limitations).\n\n### Additional Features\n- `title` - Schema titles (carried over to Zod schemas)\n- `description` - Schema descriptions (carried over to Zod schemas)\n- `default` - Default value annotation, but ignored if it doesn't conform to the schema; a default never satisfies `required` for a missing property\n- Boolean schemas (`true` = allow anything, `false` = allow nothing)\n- Implicit type detection from constraints\n- Comprehensive error messages\n\n## Currently Unsupported Features\n\nThe following JSON Schema features are **not yet implemented**:\n\n### References and Definitions\n- Remote/external references (referencing documents other than the one being converted)\n- True dynamic scoping for `$dynamicRef` / `$dynamicAnchor` (they are resolved statically)\n\n### Advanced Object Validation\n- `additionalProperties` - Fine-grained control over additional properties (basic support exists)\n- `unevaluatedProperties` - Properties not covered by schema evaluation\n\n### Advanced Array Validation\n- `unevaluatedItems` - Items not covered by schema evaluation\n- Complex `prefixItems` scenarios with additional item control\n\n### Meta-Schema Features\n- Custom vocabularies and meta-schema validation\n- Annotation collection and processing\n\n## Known Limitations\n\nBeyond the unsupported keywords above, supported features have some known gaps:\n\n- **`__proto__` properties**: Zod removes own `__proto__` keys from parsed objects to prevent prototype pollution, and this library's validation runs on Zod's parse output. As a result, a `__proto__` entry in `properties` cannot validate its value, and `required: [\"__proto__\"]` is only enforced for schemas without an explicit `type`.\n- **Unresolvable references are ignored**: A `$ref`/`$dynamicRef` that cannot be resolved within the document (remote URIs, unknown anchors, dangling pointers) does not constrain the value at all; the rest of the schema still applies.\n- **`$dynamicRef` is resolved statically**: Dynamic scoping is not implemented; `$dynamicRef` behaves like `$ref` (and `$dynamicAnchor` like `$anchor`), which matches the spec whenever the dynamic anchor is bookended in the same schema resource.\n- **Degenerate reference cycles**: Reference chains that lead back to themselves without making progress on the data are dropped (treated as unresolvable) when the cycle consists purely of `$ref`/`$dynamicRef` edges. Cycles that pass through applicators that don't consume data (e.g. `not` or `allOf`) are not detected and will recurse at validation time.\n- **Deeply recursive data**: Validating recursive schemas against deeply nested data (on the order of a few hundred nesting levels, engine-dependent) can exhaust the JavaScript call stack.\n- **`unevaluatedProperties` is ignored**: In particular, discriminated unions whose `oneOf` variants differ only by `unevaluatedProperties: false` will not reject inputs that mix properties from different variants. Declaring `required` properties in each variant makes the variants distinguishable instead.\n\n## Standards Compliance\n\n- **JSON Schema Draft 2020-12** - Partial support for core features of the latest JSON Schema standard\n- **Official Test Suite** - Passes the majority of tests from the official JSON Schema Test Suite (tests for unsupported features are listed in the [skip list](./failing-tests-skip-list.json))\n\n## License\n\nMIT\n\n## Sponsor\n\nSponsored by [Glide](https://glideapps.com), the platform for custom business software.\n","readmeFilename":"README.md"}