{"_id":"@aigne/json-schema-to-zod","_rev":"5-101ad94f7b9d806597e61336d7702f95","name":"@aigne/json-schema-to-zod","dist-tags":{"latest":"1.3.3"},"versions":{"1.3.0":{"name":"@aigne/json-schema-to-zod","version":"1.3.0","keywords":["zod","json","schema","converter","cli"],"author":{"name":"Stefan Terdell"},"license":"ISC","_id":"@aigne/json-schema-to-zod@1.3.0","maintainers":[{"name":"li-yechao","email":"liyechao@yechao.xyz"},{"name":"wangshijun","email":"shijun@arcblock.io"}],"contributors":[{"url":"https://github.com/werifu","name":"Chen"},{"url":"https://github.com/ncardoso-barracuda","name":"Nuno Carduso"},{"url":"https://github.com/lstrojny","name":"Lars Strojny"},{"url":"https://github.com/navtoj","name":"Navtoj Chahal"},{"url":"https://github.com/benmccann","name":"Ben McCann"},{"url":"https://github.com/DZakh","name":"Dmitry Zakharov"},{"url":"https://github.com/grimly","name":"Michel Turpin"},{"url":"https://github.com/davidbarratt","name":"David Barratt"},{"url":"https://github.com/pevisscher","name":"pevisscher"},{"url":"https://github.com/aidinabedi","name":"Aidin Abedi"},{"url":"https://github.com/brettz9","name":"Brett Zamir"},{"url":"https://github.com/n8n-io","name":"n8n"}],"homepage":"https://github.com/n8n-io/n8n#readme","bugs":{"url":"https://github.com/n8n-io/n8n/issues"},"dist":{"shasum":"eb81ce51cab51ca3d7bc0c403a0521300a7819a3","tarball":"https://registry.npmjs.org/@aigne/json-schema-to-zod/-/json-schema-to-zod-1.3.0.tgz","fileCount":123,"integrity":"sha512-sC9sSlBEQlVKohyw2pr16sb4FSZITCSxjc6m7A2srcPeK7nxyAUP1CA5uo/22dLTga+Kz0F6l3suPfp/czGCxA==","signatures":[{"sig":"MEUCIQCm7RBpihNPfA3K0v8RCqOvtQF7aDjUTC7xSZIsXCy8XQIga6Yh+upL/I94yVbPDfW+t4rnvgUJQNMnmQBpiya79kI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80600},"main":"./dist/cjs/index.js","type":"module","_from":"file:aigne-json-schema-to-zod-1.3.0.tgz","types":"./dist/types/index.d.ts","module":"./dist/esm/index.js","exports":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/types/index.d.ts","default":"./dist/cjs/index.js"}},"gitHead":"d58c314c751906e3f12aede636d6f811b1f8b76b","scripts":{"dev":"tsc -w","dry":"pnpm run build && pnpm pub --dry-run","lint":"eslint . --quiet","test":"jest","build":"rimraf ./lib && tsc --build scripts/tsconfig.build.json","clean":"rimraf dist .turbo","format":"biome format --write src","lintfix":"eslint . --fix","typecheck":"tsc --noEmit","test:watch":"jest --watch","format:check":"biome ci src"},"_npmUser":{"name":"li-yechao","email":"liyechao@yechao.xyz"},"_resolved":"/private/var/folders/tp/46k4cvdn6mv9rzqgy8br5b9r0000gn/T/1e5f94fa55ee55c5e6d2d9b17da4b03a/aigne-json-schema-to-zod-1.3.0.tgz","_integrity":"sha512-sC9sSlBEQlVKohyw2pr16sb4FSZITCSxjc6m7A2srcPeK7nxyAUP1CA5uo/22dLTga+Kz0F6l3suPfp/czGCxA==","repository":{"url":"git+https://github.com/n8n-io/n8n.git","type":"git"},"_npmVersion":"10.9.2","description":"Converts JSON schema objects into Zod schemas","directories":{},"_nodeVersion":"23.9.0","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.0.0","rimraf":"^6.0.1","typescript":"^5.8.2","@types/json-schema":"^7.0.15"},"peerDependencies":{"zod":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/json-schema-to-zod_1.3.0_1742295649389_0.47656797231812753","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@aigne/json-schema-to-zod","version":"1.3.1","keywords":["zod","json","schema","converter","cli"],"author":{"name":"Stefan Terdell"},"license":"ISC","_id":"@aigne/json-schema-to-zod@1.3.1","maintainers":[{"name":"li-yechao","email":"liyechao@yechao.xyz"},{"name":"wangshijun","email":"shijun@arcblock.io"}],"contributors":[{"url":"https://github.com/werifu","name":"Chen"},{"url":"https://github.com/ncardoso-barracuda","name":"Nuno Carduso"},{"url":"https://github.com/lstrojny","name":"Lars Strojny"},{"url":"https://github.com/navtoj","name":"Navtoj Chahal"},{"url":"https://github.com/benmccann","name":"Ben McCann"},{"url":"https://github.com/DZakh","name":"Dmitry Zakharov"},{"url":"https://github.com/grimly","name":"Michel Turpin"},{"url":"https://github.com/davidbarratt","name":"David Barratt"},{"url":"https://github.com/pevisscher","name":"pevisscher"},{"url":"https://github.com/aidinabedi","name":"Aidin Abedi"},{"url":"https://github.com/brettz9","name":"Brett Zamir"},{"url":"https://github.com/n8n-io","name":"n8n"}],"homepage":"https://github.com/n8n-io/n8n#readme","bugs":{"url":"https://github.com/n8n-io/n8n/issues"},"dist":{"shasum":"113b6241b8bfa9626d8fdb5f5b8a736e0f6f8d17","tarball":"https://registry.npmjs.org/@aigne/json-schema-to-zod/-/json-schema-to-zod-1.3.1.tgz","fileCount":123,"integrity":"sha512-XzUw1w6By2Z1LR7awkLYKB/RoTiFHz/SIQmTI3LkIMiErSs59xAU/nvKbdFfjtu+QRhvBKRYfMKQN4BQWs6RMA==","signatures":[{"sig":"MEYCIQDdkEr8JAmyxtzE6rUUhXy48j0iez2M9UVAI8HQiPssLAIhALgAKUo0gKf0KqB6IYMtGbdLg18qfyXEZMTEqVhfOtYG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80594},"main":"./dist/cjs/index.js","type":"module","_from":"file:aigne-json-schema-to-zod-1.3.1.tgz","types":"./dist/dts/index.d.ts","module":"./dist/esm/index.js","exports":{"import":{"types":"./dist/dts/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/dts/index.d.ts","default":"./dist/cjs/index.js"}},"gitHead":"d58c314c751906e3f12aede636d6f811b1f8b76b","scripts":{"dev":"tsc -w","dry":"pnpm run build && pnpm pub --dry-run","lint":"eslint . --quiet","test":"jest","build":"rimraf ./lib && tsc --build scripts/tsconfig.build.json","clean":"rimraf dist .turbo","format":"biome format --write src","lintfix":"eslint . --fix","typecheck":"tsc --noEmit","test:watch":"jest --watch","format:check":"biome ci src"},"_npmUser":{"name":"li-yechao","email":"liyechao@yechao.xyz"},"_resolved":"/private/var/folders/tp/46k4cvdn6mv9rzqgy8br5b9r0000gn/T/6ae8a0c08a9a6fa6f4c90b00fbf68d0e/aigne-json-schema-to-zod-1.3.1.tgz","_integrity":"sha512-XzUw1w6By2Z1LR7awkLYKB/RoTiFHz/SIQmTI3LkIMiErSs59xAU/nvKbdFfjtu+QRhvBKRYfMKQN4BQWs6RMA==","repository":{"url":"git+https://github.com/n8n-io/n8n.git","type":"git"},"_npmVersion":"10.9.2","description":"Converts JSON schema objects into Zod schemas","directories":{},"_nodeVersion":"23.9.0","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.0.0","rimraf":"^6.0.1","typescript":"^5.8.2","@types/json-schema":"^7.0.15"},"peerDependencies":{"zod":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/json-schema-to-zod_1.3.1_1742295856292_0.3310530813896415","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"@aigne/json-schema-to-zod","version":"1.3.2","keywords":["zod","json","schema","converter","cli"],"author":{"name":"Stefan Terdell"},"license":"ISC","_id":"@aigne/json-schema-to-zod@1.3.2","maintainers":[{"name":"li-yechao","email":"liyechao@yechao.xyz"},{"name":"wangshijun","email":"shijun@arcblock.io"}],"contributors":[{"url":"https://github.com/werifu","name":"Chen"},{"url":"https://github.com/ncardoso-barracuda","name":"Nuno Carduso"},{"url":"https://github.com/lstrojny","name":"Lars Strojny"},{"url":"https://github.com/navtoj","name":"Navtoj Chahal"},{"url":"https://github.com/benmccann","name":"Ben McCann"},{"url":"https://github.com/DZakh","name":"Dmitry Zakharov"},{"url":"https://github.com/grimly","name":"Michel Turpin"},{"url":"https://github.com/davidbarratt","name":"David Barratt"},{"url":"https://github.com/pevisscher","name":"pevisscher"},{"url":"https://github.com/aidinabedi","name":"Aidin Abedi"},{"url":"https://github.com/brettz9","name":"Brett Zamir"},{"url":"https://github.com/n8n-io","name":"n8n"}],"homepage":"https://github.com/n8n-io/n8n#readme","bugs":{"url":"https://github.com/n8n-io/n8n/issues"},"dist":{"shasum":"0446332a487cf1f3cf32b564ee496935e0fa288e","tarball":"https://registry.npmjs.org/@aigne/json-schema-to-zod/-/json-schema-to-zod-1.3.2.tgz","fileCount":123,"integrity":"sha512-yw7e4XjL4a62a+PkVHrFDHWjNjWEDh2sDG5JHY7pH+NCxkM9WavITuh/AfL5sZjA4IZVpyhcqMVvk1uIWOjENg==","signatures":[{"sig":"MEQCID62Qjr1faz/zNjhZksIm5E5ShWyTk3c98XeKSmexlC5AiBlcPzLssGwEKazGjAgH7fYWAI0tgmQMXBWdePe71yqoA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80586},"main":"./lib/cjs/index.js","type":"module","_from":"file:aigne-json-schema-to-zod-1.3.2.tgz","types":"./lib/dts/index.d.ts","module":"./lib/esm/index.js","exports":{"import":{"types":"./lib/dts/index.d.ts","default":"./lib/esm/index.js"},"require":{"types":"./lib/dts/index.d.ts","default":"./lib/cjs/index.js"}},"gitHead":"d58c314c751906e3f12aede636d6f811b1f8b76b","scripts":{"dev":"tsc -w","dry":"pnpm run build && pnpm pub --dry-run","lint":"eslint . --quiet","test":"jest","build":"rimraf ./lib && tsc --build scripts/tsconfig.build.json","clean":"rimraf lib .turbo","format":"biome format --write src","lintfix":"eslint . --fix","typecheck":"tsc --noEmit","test:watch":"jest --watch","format:check":"biome ci src"},"_npmUser":{"name":"li-yechao","email":"liyechao@yechao.xyz"},"_resolved":"/private/var/folders/tp/46k4cvdn6mv9rzqgy8br5b9r0000gn/T/36e21c480a0bb34d055d35f83fd4b26b/aigne-json-schema-to-zod-1.3.2.tgz","_integrity":"sha512-yw7e4XjL4a62a+PkVHrFDHWjNjWEDh2sDG5JHY7pH+NCxkM9WavITuh/AfL5sZjA4IZVpyhcqMVvk1uIWOjENg==","repository":{"url":"git+https://github.com/n8n-io/n8n.git","type":"git"},"_npmVersion":"10.9.2","description":"Converts JSON schema objects into Zod schemas","directories":{},"_nodeVersion":"23.9.0","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.0.0","rimraf":"^6.0.1","typescript":"^5.8.2","@types/json-schema":"^7.0.15"},"peerDependencies":{"zod":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/json-schema-to-zod_1.3.2_1742303295285_0.5857398795179667","host":"s3://npm-registry-packages-npm-production"}},"1.3.3":{"name":"@aigne/json-schema-to-zod","version":"1.3.3","keywords":["zod","json","schema","converter","cli"],"author":{"name":"Stefan Terdell"},"license":"ISC","_id":"@aigne/json-schema-to-zod@1.3.3","maintainers":[{"name":"li-yechao","email":"liyechao@yechao.xyz"},{"name":"wangshijun","email":"shijun@arcblock.io"}],"contributors":[{"url":"https://github.com/werifu","name":"Chen"},{"url":"https://github.com/ncardoso-barracuda","name":"Nuno Carduso"},{"url":"https://github.com/lstrojny","name":"Lars Strojny"},{"url":"https://github.com/navtoj","name":"Navtoj Chahal"},{"url":"https://github.com/benmccann","name":"Ben McCann"},{"url":"https://github.com/DZakh","name":"Dmitry Zakharov"},{"url":"https://github.com/grimly","name":"Michel Turpin"},{"url":"https://github.com/davidbarratt","name":"David Barratt"},{"url":"https://github.com/pevisscher","name":"pevisscher"},{"url":"https://github.com/aidinabedi","name":"Aidin Abedi"},{"url":"https://github.com/brettz9","name":"Brett Zamir"},{"url":"https://github.com/n8n-io","name":"n8n"}],"homepage":"https://github.com/n8n-io/n8n#readme","bugs":{"url":"https://github.com/n8n-io/n8n/issues"},"dist":{"shasum":"1baf7747a18994105d0f90741842b260ba7386b8","tarball":"https://registry.npmjs.org/@aigne/json-schema-to-zod/-/json-schema-to-zod-1.3.3.tgz","fileCount":125,"integrity":"sha512-8QsF5Vm/Znj16KAvfNIoXghSB7XzGGp+HHoI3CWyuFLX6DbI0YrzRm3EpKo87OhbpdtiWQurC0bidkH2cbsYNQ==","signatures":[{"sig":"MEYCIQC/iJ8tmiA49GIpl89TrTHojnvOVCDOJT0gXsEmhdyF/wIhAKeCXHZickQZBOX3VxiofCn9D/ymrO2bce7tqojgyRhw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80758},"main":"./lib/cjs/index.js","type":"module","types":"./lib/dts/index.d.ts","module":"./lib/esm/index.js","exports":{"import":{"types":"./lib/dts/index.d.ts","default":"./lib/esm/index.js"},"require":{"types":"./lib/dts/index.d.ts","default":"./lib/cjs/index.js"}},"gitHead":"54cbbf14342003145be6dcb30d713a064ecaeb3e","scripts":{"dev":"tsc -w","dry":"pnpm run build && pnpm pub --dry-run","lint":"eslint . --quiet","test":"jest","build":"rimraf ./lib && tsc --build scripts/tsconfig.build.json","clean":"rimraf lib .turbo","format":"biome format --write src","lintfix":"eslint . --fix","postbuild":"echo '{\"type\": \"module\"}' > lib/esm/package.json && echo '{\"type\": \"commonjs\"}' > lib/cjs/package.json","typecheck":"tsc --noEmit","test:watch":"jest --watch","format:check":"biome ci src"},"_npmUser":{"name":"li-yechao","email":"liyechao@yechao.xyz"},"repository":{"url":"git+https://github.com/n8n-io/n8n.git","type":"git"},"_npmVersion":"10.9.2","description":"Converts JSON schema objects into Zod schemas","directories":{},"_nodeVersion":"23.10.0","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.0.0","rimraf":"^6.0.1","typescript":"^5.8.2","@types/json-schema":"^7.0.15"},"peerDependencies":{"zod":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/json-schema-to-zod_1.3.3_1743036891543_0.532880887416054","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-03-18T11:00:49.304Z","modified":"2026-01-21T06:21:30.976Z","1.3.0":"2025-03-18T11:00:49.567Z","1.3.1":"2025-03-18T11:04:16.503Z","1.3.2":"2025-03-18T13:08:15.472Z","1.3.3":"2025-03-27T00:54:51.774Z"},"bugs":{"url":"https://github.com/n8n-io/n8n/issues"},"author":{"name":"Stefan Terdell"},"license":"ISC","homepage":"https://github.com/n8n-io/n8n#readme","keywords":["zod","json","schema","converter","cli"],"repository":{"url":"git+https://github.com/n8n-io/n8n.git","type":"git"},"description":"Converts JSON schema objects into Zod schemas","contributors":[{"url":"https://github.com/werifu","name":"Chen"},{"url":"https://github.com/ncardoso-barracuda","name":"Nuno Carduso"},{"url":"https://github.com/lstrojny","name":"Lars Strojny"},{"url":"https://github.com/navtoj","name":"Navtoj Chahal"},{"url":"https://github.com/benmccann","name":"Ben McCann"},{"url":"https://github.com/DZakh","name":"Dmitry Zakharov"},{"url":"https://github.com/grimly","name":"Michel Turpin"},{"url":"https://github.com/davidbarratt","name":"David Barratt"},{"url":"https://github.com/pevisscher","name":"pevisscher"},{"url":"https://github.com/aidinabedi","name":"Aidin Abedi"},{"url":"https://github.com/brettz9","name":"Brett Zamir"},{"url":"https://github.com/n8n-io","name":"n8n"}],"maintainers":[{"email":"liyechao@yechao.xyz","name":"li-yechao"},{"email":"shijun@arcblock.io","name":"wangshijun"},{"email":"rob@arcblock.io","name":"mave99a"}],"readme":"# Json-Schema-to-Zod\n\nA package to convert JSON schema (draft 4+) objects into Zod schemas in the form of Zod objects at runtime.\n\n## Installation\n\n```sh\nnpm install @aigne/json-schema-to-zod\n```\n\n### Simple example\n\n```typescript\nimport { jsonSchemaToZod } from \"json-schema-to-zod\";\n\nconst jsonSchema = {\n  type: \"object\",\n  properties: {\n    hello: {\n      type: \"string\",\n    },\n  },\n};\n\nconst zodSchema = jsonSchemaToZod(myObject);\n```\n\n### Overriding a parser\n\nYou can pass a function to the `overrideParser` option, which represents a function that receives the current schema node and the reference object, and should return a zod object when it wants to replace a default output. If the default output should be used for the node just return undefined.\n\n## Acknowledgements\n\nThis is a fork of [`json-schema-to-zod`](https://github.com/StefanTerdell/json-schema-to-zod).\n","readmeFilename":"README.md"}