{"_id":"@cafercangundogdu/nestjs-zod-openapi","_rev":"8-34fe058f86c50cfb8f6185aeea35a51f","name":"@cafercangundogdu/nestjs-zod-openapi","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"@cafercangundogdu/nestjs-zod-openapi","version":"0.0.1","keywords":["nestjs","zod","openapi","swagger","zod4","discriminatedUnion","oneOf","dto","validation"],"author":{"name":"Cafer Can Gundogdu"},"license":"MIT","_id":"@cafercangundogdu/nestjs-zod-openapi@0.0.1","maintainers":[{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"}],"homepage":"https://github.com/cafercangundogdu/nestjs-zod-openapi#readme","bugs":{"url":"https://github.com/cafercangundogdu/nestjs-zod-openapi/issues"},"dist":{"shasum":"7a6f06ad44ee7eeb968fb61915a3ed09196a9ad9","tarball":"https://registry.npmjs.org/@cafercangundogdu/nestjs-zod-openapi/-/nestjs-zod-openapi-0.0.1.tgz","fileCount":15,"integrity":"sha512-NWy5XDPdpWw3vSd+iHhfjtu1ti3BZ06pQI7Y7+R/s4mlFBU79hhGsmqWkglSRHZnWuOdmLg6RuSSburPiFX5tA==","signatures":[{"sig":"MEUCIAWPl2HQWqG8dHoA1WOJSXcN/evTuSScpdFsH8TDk7y8AiEA82wGUDTqf1AYZYRqXgjhonAEcgDNpeB/9XIk37swAPQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49742},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"793b663f7ba0dc18af01620d98368b5af3e7db70","scripts":{"lint":"biome check .","test":"jest","build":"tsc -p tsconfig.build.json","format":"biome format --write .","prepare":"husky","lint:fix":"biome check --write .","test:cov":"jest --coverage","test:watch":"jest --watch","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"},"repository":{"url":"git+https://github.com/cafercangundogdu/nestjs-zod-openapi.git","type":"git"},"_npmVersion":"11.6.0","description":"NestJS + Zod 4 + OpenAPI — type-safe DTOs with discriminatedUnion oneOf support","directories":{},"_nodeVersion":"24.8.0","dependencies":{"openapi3-ts":"^4.5.0","@asteasolutions/zod-to-openapi":"^8.4.3"},"typesVersions":{"*":{}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","jest":"^30.3.0","rxjs":"^7.8.2","husky":"^9.1.7","publint":"^0.3.18","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^24.12.0","@nestjs/core":"^11.1.17","@biomejs/biome":"^2.4.8","@nestjs/common":"^11.1.17","@commitlint/cli":"^20.5.0","@nestjs/swagger":"^11.2.6","@nestjs/testing":"^11.1.17","reflect-metadata":"^0.2.2","@arethetypeswrong/cli":"^0.18.2","@nestjs/platform-express":"^11.1.17","@commitlint/config-conventional":"^20.5.0"},"peerDependencies":{"zod":"^4.0.0","@nestjs/common":"^11.0.0","@nestjs/swagger":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-zod-openapi_0.0.1_1774239359894_0.2325170684178215","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@cafercangundogdu/nestjs-zod-openapi","version":"0.0.2","keywords":["nestjs","zod","openapi","swagger","zod4","discriminatedUnion","oneOf","dto","validation"],"author":{"name":"Cafer Can Gundogdu"},"license":"MIT","_id":"@cafercangundogdu/nestjs-zod-openapi@0.0.2","maintainers":[{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"}],"homepage":"https://github.com/cafercangundogdu/nestjs-zod-openapi#readme","bugs":{"url":"https://github.com/cafercangundogdu/nestjs-zod-openapi/issues"},"dist":{"shasum":"f47121ddab10361c9a47d76fec59ff3b2f0a1cc9","tarball":"https://registry.npmjs.org/@cafercangundogdu/nestjs-zod-openapi/-/nestjs-zod-openapi-0.0.2.tgz","fileCount":13,"integrity":"sha512-DndgKOmy62VtSpXcKGXRKSEdmeQs2y3yfWfvhtVpIvTPlIs1wuoXM6FWridp/mZVRw5ygPrsCJOfQPMFqDn7/A==","signatures":[{"sig":"MEYCIQCab5avSJ6jnvQKwcXUZ3Nen8UvmbG5+1Kkn/HX+90OLgIhAPtCJc8WRsHuKhWXw+qD1wx8k1EdFMjF8pSMoowwKHOF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cafercangundogdu%2fnestjs-zod-openapi@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":48147},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"0cca2cb3bca3c5924013f1580d86bcce66c83ef8","scripts":{"lint":"biome check .","test":"jest","build":"tsc -p tsconfig.build.json","format":"biome format --write .","prepare":"husky","lint:fix":"biome check --write .","test:cov":"jest --coverage","test:watch":"jest --watch","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b8727f55-c8ef-4b49-b8a3-b24f04537a6f"}},"repository":{"url":"git+https://github.com/cafercangundogdu/nestjs-zod-openapi.git","type":"git"},"_npmVersion":"11.12.0","description":"NestJS + Zod 4 + OpenAPI — type-safe DTOs with discriminatedUnion oneOf support","directories":{},"_nodeVersion":"22.22.1","dependencies":{"openapi3-ts":"^4.5.0","@asteasolutions/zod-to-openapi":"^8.4.3"},"typesVersions":{"*":{}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","jest":"^30.3.0","rxjs":"^7.8.2","husky":"^9.1.7","publint":"^0.3.18","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^24.12.0","@nestjs/core":"^11.1.17","@biomejs/biome":"^2.4.8","@nestjs/common":"^11.1.17","@commitlint/cli":"^20.5.0","@nestjs/swagger":"^11.2.6","@nestjs/testing":"^11.1.17","reflect-metadata":"^0.2.2","@arethetypeswrong/cli":"^0.18.2","@nestjs/platform-express":"^11.1.17","@commitlint/config-conventional":"^20.5.0"},"peerDependencies":{"zod":"^4.0.0","@nestjs/common":"^11.0.0","@nestjs/swagger":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-zod-openapi_0.0.2_1774239603394_0.25633453307909004","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@cafercangundogdu/nestjs-zod-openapi","version":"0.0.3","keywords":["nestjs","zod","openapi","swagger","zod4","discriminatedUnion","oneOf","dto","validation"],"author":{"name":"Cafer Can Gundogdu"},"license":"MIT","_id":"@cafercangundogdu/nestjs-zod-openapi@0.0.3","maintainers":[{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"}],"homepage":"https://github.com/cafercangundogdu/nestjs-zod-openapi#readme","bugs":{"url":"https://github.com/cafercangundogdu/nestjs-zod-openapi/issues"},"dist":{"shasum":"7f8955f31e1ef2e00f4188485120f27321bc5f89","tarball":"https://registry.npmjs.org/@cafercangundogdu/nestjs-zod-openapi/-/nestjs-zod-openapi-0.0.3.tgz","fileCount":13,"integrity":"sha512-GqzeRejDBlMWKjyvvVvQMqpW2V7rhZP5Wf1pc/BoE9B5w5/IqSxxKkL2Rfk2MeMGkCOHUUhwAWiDOBZwc0L1TQ==","signatures":[{"sig":"MEQCIHM4N6ZKeLYTXUU1kobc14tQDp26N/oluAYDRKZ/88zuAiAL9sYWJbdi+Ag3jLL42NjXTFmAanG/dxv1c0WoZ+A3Pw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cafercangundogdu%2fnestjs-zod-openapi@0.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":48881},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"a4e5e9df571984ad2bfac8dab71b0f0263f53338","scripts":{"lint":"biome check .","test":"jest","build":"tsc -p tsconfig.build.json","format":"biome format --write .","prepare":"husky","lint:fix":"biome check --write .","test:cov":"jest --coverage","test:watch":"jest --watch","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b8727f55-c8ef-4b49-b8a3-b24f04537a6f"}},"repository":{"url":"git+https://github.com/cafercangundogdu/nestjs-zod-openapi.git","type":"git"},"_npmVersion":"11.12.1","description":"NestJS + Zod 4 + OpenAPI — type-safe DTOs with discriminatedUnion oneOf support","directories":{},"_nodeVersion":"22.22.1","dependencies":{"openapi3-ts":"^4.5.0","@asteasolutions/zod-to-openapi":"^8.4.3"},"typesVersions":{"*":{}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","jest":"^30.3.0","rxjs":"^7.8.2","husky":"^9.1.7","publint":"^0.3.18","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^24.12.0","@nestjs/core":"^11.1.17","@biomejs/biome":"^2.4.8","@nestjs/common":"^11.1.17","@commitlint/cli":"^20.5.0","@nestjs/swagger":"^11.2.6","@nestjs/testing":"^11.1.17","reflect-metadata":"^0.2.2","@arethetypeswrong/cli":"^0.18.2","@nestjs/platform-express":"^11.1.17","@commitlint/config-conventional":"^20.5.0"},"peerDependencies":{"zod":"^4.0.0","@nestjs/common":"^11.0.0","@nestjs/swagger":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-zod-openapi_0.0.3_1774992772046_0.5333847333088411","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@cafercangundogdu/nestjs-zod-openapi","version":"0.0.4","keywords":["nestjs","zod","openapi","swagger","zod4","discriminatedUnion","oneOf","dto","validation"],"author":{"name":"Cafer Can Gundogdu"},"license":"MIT","_id":"@cafercangundogdu/nestjs-zod-openapi@0.0.4","maintainers":[{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"}],"homepage":"https://github.com/cafercangundogdu/nestjs-zod-openapi#readme","bugs":{"url":"https://github.com/cafercangundogdu/nestjs-zod-openapi/issues"},"dist":{"shasum":"02de418c988fcb809284f214c195da6134d14651","tarball":"https://registry.npmjs.org/@cafercangundogdu/nestjs-zod-openapi/-/nestjs-zod-openapi-0.0.4.tgz","fileCount":13,"integrity":"sha512-va6Mf1TIpqfXhzxqeHRVCheGFm9dZxTPsJ/nVbF0d7zWk9hhXuZtbS5x5OLinqP2v1x9+LoIr4Dh/dr2t9qcyQ==","signatures":[{"sig":"MEUCIQDsaA/2iWVDdhhruQsCe3bw+vlgCYJvJoEKSVSm7dnh+wIgHv62L+ERKFcRijRsH2bdg378gxeDqRdSkZq4UirDkKs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cafercangundogdu%2fnestjs-zod-openapi@0.0.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":53579},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"2395eaf8fa9450804502b2e74c0d6d252c68358e","scripts":{"lint":"biome check .","test":"jest","build":"tsc -p tsconfig.build.json","format":"biome format --write .","prepare":"husky","lint:fix":"biome check --write .","test:cov":"jest --coverage","test:watch":"jest --watch","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b8727f55-c8ef-4b49-b8a3-b24f04537a6f"}},"repository":{"url":"git+https://github.com/cafercangundogdu/nestjs-zod-openapi.git","type":"git"},"_npmVersion":"11.16.0","description":"NestJS + Zod 4 + OpenAPI — type-safe DTOs with discriminatedUnion oneOf support","directories":{},"_nodeVersion":"22.22.3","dependencies":{"openapi3-ts":"^4.5.0","@asteasolutions/zod-to-openapi":"^8.4.3"},"typesVersions":{"*":{}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.4.3","jest":"^30.4.2","rxjs":"^7.8.2","husky":"^9.1.7","publint":"^0.3.21","ts-jest":"^29.4.11","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^25.9.1","@nestjs/core":"^11.1.24","@biomejs/biome":"^2.4.16","@nestjs/common":"^11.1.24","@commitlint/cli":"^21.0.2","@nestjs/swagger":"^11.4.4","@nestjs/testing":"^11.1.24","reflect-metadata":"^0.2.2","@arethetypeswrong/cli":"^0.18.3","@nestjs/platform-express":"^11.1.24","@commitlint/config-conventional":"^21.0.2"},"peerDependencies":{"zod":"^4.0.0","@nestjs/common":"^11.0.0","@nestjs/swagger":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-zod-openapi_0.0.4_1780563022787_0.8873357227748597","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@cafercangundogdu/nestjs-zod-openapi","version":"0.0.5","keywords":["nestjs","zod","openapi","swagger","zod4","discriminatedUnion","oneOf","dto","validation"],"author":{"name":"Cafer Can Gundogdu"},"license":"MIT","_id":"@cafercangundogdu/nestjs-zod-openapi@0.0.5","maintainers":[{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"}],"homepage":"https://github.com/cafercangundogdu/nestjs-zod-openapi#readme","bugs":{"url":"https://github.com/cafercangundogdu/nestjs-zod-openapi/issues"},"dist":{"shasum":"2ff5e0acbec070430cb44eef0a15aaf525a017d1","tarball":"https://registry.npmjs.org/@cafercangundogdu/nestjs-zod-openapi/-/nestjs-zod-openapi-0.0.5.tgz","fileCount":13,"integrity":"sha512-bLS0nTgSAEF9rgzPjcD5h1KnLwurQ+UHrOHH5RUsvEdr1aYdswJ1e5vwMiI81hnoGbEnTmHST2+KAP2pp6hHIg==","signatures":[{"sig":"MEQCIGBiWDUPmCvdajKSHv8PrqT52VLKfa2q9SeTw85upFt3AiB4i+ndqEA74c/+0hr8eQSXGQMPZ5FX0B1Wkf5OSzj6Aw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cafercangundogdu%2fnestjs-zod-openapi@0.0.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":55751},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"be60a32b43c69ae0991cb1b10e0738cff5d4b5e1","scripts":{"lint":"biome check .","test":"jest","build":"tsc -p tsconfig.build.json","format":"biome format --write .","prepare":"husky","lint:fix":"biome check --write .","test:cov":"jest --coverage","test:watch":"jest --watch","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b8727f55-c8ef-4b49-b8a3-b24f04537a6f"}},"repository":{"url":"git+https://github.com/cafercangundogdu/nestjs-zod-openapi.git","type":"git"},"_npmVersion":"11.18.0","description":"NestJS + Zod 4 + OpenAPI — type-safe DTOs with discriminatedUnion oneOf support","directories":{},"_nodeVersion":"22.23.0","dependencies":{"openapi3-ts":"^4.6.0","@asteasolutions/zod-to-openapi":"^8.5.0"},"typesVersions":{"*":{}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.4.3","jest":"^30.4.2","rxjs":"^7.8.2","husky":"^9.1.7","publint":"^0.3.21","ts-jest":"^29.4.11","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^26.0.1","@nestjs/core":"^11.1.27","@biomejs/biome":"^2.5.1","@nestjs/common":"^11.1.27","@commitlint/cli":"^21.2.0","@nestjs/swagger":"^11.4.5","@nestjs/testing":"^11.1.27","reflect-metadata":"^0.2.2","@arethetypeswrong/cli":"^0.18.4","@nestjs/platform-express":"^11.1.27","@commitlint/config-conventional":"^21.2.0"},"peerDependencies":{"zod":"^4.0.0","@nestjs/common":"^11.0.0","@nestjs/swagger":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-zod-openapi_0.0.5_1782816802956_0.033107673950984795","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@cafercangundogdu/nestjs-zod-openapi","version":"0.0.6","keywords":["nestjs","zod","openapi","swagger","zod4","discriminatedUnion","oneOf","dto","validation"],"author":{"name":"Cafer Can Gundogdu"},"license":"MIT","_id":"@cafercangundogdu/nestjs-zod-openapi@0.0.6","maintainers":[{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"}],"homepage":"https://github.com/cafercangundogdu/nestjs-zod-openapi#readme","bugs":{"url":"https://github.com/cafercangundogdu/nestjs-zod-openapi/issues"},"dist":{"shasum":"11577193977006e11732c0a31301cdd475ce8e81","tarball":"https://registry.npmjs.org/@cafercangundogdu/nestjs-zod-openapi/-/nestjs-zod-openapi-0.0.6.tgz","fileCount":13,"integrity":"sha512-WepZKQrwPLg5x2Yweseg1hIZSngQJ9nnQl932lHj7amZQQflcIYKp7749Bso/n3EPzJyK8kigP1ncfD/u+ZWZw==","signatures":[{"sig":"MEQCICrcHHwz5LpzJgZub/CUBSz+UrhsLy5eKZr0GQuwjEUQAiBzT8bu6huvITEnM1b7YfcNq9K3kYU3c5jYkCdPqkEiWw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cafercangundogdu%2fnestjs-zod-openapi@0.0.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":55751},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"944f3aa5d4082bd991694424980579925df8c058","scripts":{"lint":"biome check .","test":"jest","build":"tsc -p tsconfig.build.json","format":"biome format --write .","prepare":"husky","lint:fix":"biome check --write .","test:cov":"jest --coverage","test:watch":"jest --watch","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b8727f55-c8ef-4b49-b8a3-b24f04537a6f"}},"repository":{"url":"git+https://github.com/cafercangundogdu/nestjs-zod-openapi.git","type":"git"},"_npmVersion":"11.18.0","description":"NestJS + Zod 4 + OpenAPI — type-safe DTOs with discriminatedUnion oneOf support","directories":{},"_nodeVersion":"22.23.0","dependencies":{"openapi3-ts":"^4.6.0","@asteasolutions/zod-to-openapi":"^8.5.0"},"typesVersions":{"*":{}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.4.3","jest":"^30.4.2","rxjs":"^7.8.2","husky":"^9.1.7","publint":"^0.3.21","ts-jest":"^29.4.11","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^26.0.1","@nestjs/core":"^11.1.27","@biomejs/biome":"^2.5.1","@nestjs/common":"^11.1.27","@commitlint/cli":"^21.2.0","@nestjs/swagger":"^11.4.5","@nestjs/testing":"^11.1.27","reflect-metadata":"^0.2.2","@arethetypeswrong/cli":"^0.18.4","@nestjs/platform-express":"^11.1.27","@commitlint/config-conventional":"^21.2.0"},"peerDependencies":{"zod":"^4.0.0","@nestjs/common":"^11.0.0","@nestjs/swagger":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-zod-openapi_0.0.6_1782818632044_0.8388500315540983","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@cafercangundogdu/nestjs-zod-openapi","version":"0.1.0","keywords":["nestjs","zod","openapi","swagger","zod4","discriminatedUnion","oneOf","dto","validation"],"author":{"name":"Cafer Can Gundogdu"},"license":"MIT","_id":"@cafercangundogdu/nestjs-zod-openapi@0.1.0","maintainers":[{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"}],"homepage":"https://github.com/cafercangundogdu/nestjs-zod-openapi#readme","bugs":{"url":"https://github.com/cafercangundogdu/nestjs-zod-openapi/issues"},"dist":{"shasum":"37e596a248f118205a46ac9087c06f831240db29","tarball":"https://registry.npmjs.org/@cafercangundogdu/nestjs-zod-openapi/-/nestjs-zod-openapi-0.1.0.tgz","fileCount":24,"integrity":"sha512-3jRgzWvTtgW1ab/fPuZ/iQFKKX7btV7HXd3ApW02v8g2p36PfUfoLYVx7xpUbHWZGL8icAwWTdh/hZ58d/c/sA==","signatures":[{"sig":"MEQCIAv2SUYBPEXyOUrokEQ3T7dhdP2egalEpaNyQS4FWzbVAiBTftF3Fjw4w99/TSi8dX7HsxaM09nL1KMdZAOtc9+KfA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cafercangundogdu%2fnestjs-zod-openapi@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":101526},"main":"./dist/cjs/index.js","type":"commonjs","types":"./dist/cjs/index.d.ts","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}},"./package.json":"./package.json"},"gitHead":"a3b2075b39e0b2c808b26f2c6e6b26820575c1e6","scripts":{"lint":"biome check .","test":"jest","build":"pnpm run clean && pnpm run build:cjs && pnpm run build:esm && pnpm run build:esm:marker","clean":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","format":"biome format --write .","prepare":"husky","lint:fix":"biome check --write .","test:cov":"jest --coverage","build:cjs":"tsc -p tsconfig.build.json","build:esm":"tsc -p tsconfig.build.esm.json","typecheck":"tsc --noEmit","test:watch":"jest --watch","check:package":"publint && attw --pack .","prepublishOnly":"pnpm run typecheck && pnpm run build && pnpm run check:package","build:esm:marker":"node -e \"require('node:fs').writeFileSync('dist/esm/package.json', JSON.stringify({ type: 'module' }, null, 2))\""},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b8727f55-c8ef-4b49-b8a3-b24f04537a6f"}},"repository":{"url":"git+https://github.com/cafercangundogdu/nestjs-zod-openapi.git","type":"git"},"_npmVersion":"12.0.1","description":"NestJS + Zod 4 + OpenAPI — type-safe DTOs with discriminatedUnion oneOf support","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","dependencies":{"openapi3-ts":"^4.6.0","@asteasolutions/zod-to-openapi":"^9.0.0"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.4.3","jest":"^30.4.2","rxjs":"^7.8.2","husky":"^9.1.7","publint":"^0.3.21","@swc/core":"^1.15.43","@swc/jest":"^0.2.39","typescript":"^7.0.2","@types/jest":"^30.0.0","@types/node":"^26.1.1","@nestjs/core":"^11.1.28","@biomejs/biome":"^2.5.3","@nestjs/common":"^11.1.28","@commitlint/cli":"^21.2.1","@nestjs/swagger":"^11.4.5","@nestjs/testing":"^11.1.28","reflect-metadata":"^0.2.2","@arethetypeswrong/cli":"^0.18.5","@nestjs/platform-express":"^11.1.28","@commitlint/config-conventional":"^21.2.0"},"peerDependencies":{"zod":"^4.0.0","@nestjs/common":"^11.0.0","@nestjs/swagger":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-zod-openapi_0.1.0_1784101847920_0.2327218200129333","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@cafercangundogdu/nestjs-zod-openapi","version":"0.2.0","description":"NestJS + Zod 4 + OpenAPI — type-safe DTOs with discriminatedUnion oneOf support","author":{"name":"Cafer Can Gundogdu"},"license":"MIT","type":"commonjs","packageManager":"pnpm@12.3.4","main":"./dist/cjs/index.js","types":"./dist/cjs/index.d.ts","exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}},"./package.json":"./package.json"},"sideEffects":false,"engines":{"node":">=22.12.0"},"scripts":{"clean":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","build":"pnpm run clean && pnpm run build:cjs && pnpm run build:esm && pnpm run build:esm:marker","build:cjs":"tsc -p tsconfig.build.json","build:esm":"tsc -p tsconfig.build.esm.json","build:esm:marker":"node -e \"require('node:fs').writeFileSync('dist/esm/package.json', JSON.stringify({ type: 'module' }, null, 2))\"","check:package":"publint && attw --pack .","test":"vitest run","test:watch":"vitest","test:cov":"vitest run --coverage","typecheck":"tsc --noEmit","lint":"biome check .","lint:fix":"biome check --write .","format":"biome format --write .","prepublishOnly":"pnpm run typecheck && pnpm run build && pnpm run check:package","prepare":"husky"},"keywords":["nestjs","zod","openapi","swagger","zod4","discriminatedUnion","oneOf","dto","validation"],"repository":{"type":"git","url":"git+https://github.com/cafercangundogdu/nestjs-zod-openapi.git"},"dependencies":{"@asteasolutions/zod-to-openapi":"^9.1.0","openapi3-ts":"^4.6.1"},"peerDependencies":{"@nestjs/common":"^11.0.0 || ^12.0.0","@nestjs/swagger":"^11.0.0 || ^12.0.0","zod":"^4.0.0"},"devDependencies":{"@arethetypeswrong/cli":"^0.18.5","@biomejs/biome":"^2.5.12","@commitlint/cli":"^21.2.2","@commitlint/config-conventional":"^21.2.2","@nestjs/common":"^12.0.1","@nestjs/core":"^12.0.1","@nestjs/platform-express":"^12.0.1","@nestjs/swagger":"^12.0.1","@nestjs/testing":"^12.0.1","@swc/core":"^1.16.2","@types/node":"^26.5.0","@vitest/coverage-v8":"^5.0.0","husky":"^9.1.7","publint":"^0.3.24","reflect-metadata":"^0.2.2","rxjs":"^7.8.2","typescript":"^7.0.2","unplugin-swc":"^1.6.0","vitest":"^5.0.0","zod":"^4.5.4"},"gitHead":"93690cc4ce0e2715fdedbbece3e6b8b6cc5bb490","_id":"@cafercangundogdu/nestjs-zod-openapi@0.2.0","bugs":{"url":"https://github.com/cafercangundogdu/nestjs-zod-openapi/issues"},"homepage":"https://github.com/cafercangundogdu/nestjs-zod-openapi#readme","_nodeVersion":"22.23.2","_npmVersion":"12.0.2","dist":{"integrity":"sha512-aei5cSfMxa2N2wKrvozPXekz696yhsifx34m7o3pdk33N8sKuTr/uytzZycoOipQkC4R0GFX2rzycuJt2+hAyw==","shasum":"abef39329c2c858e653ed3076704c71740b430b5","tarball":"https://registry.npmjs.org/@cafercangundogdu/nestjs-zod-openapi/-/nestjs-zod-openapi-0.2.0.tgz","fileCount":36,"unpackedSize":141586,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cafercangundogdu%2fnestjs-zod-openapi@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDMdBTFCk0KWxhcmKc14ATblV/5Lh/SD4KRQPKIIy153AIhAMYfprBtJ8cR6hzzLqRcZylm95yJXWJfGq3WYfeWtHm1"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b8727f55-c8ef-4b49-b8a3-b24f04537a6f"}},"directories":{},"maintainers":[{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nestjs-zod-openapi_0.2.0_1788959367720_0.27746138351133287"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-23T04:15:59.760Z","modified":"2026-09-09T13:09:28.182Z","0.0.1":"2026-03-23T04:16:00.069Z","0.0.2":"2026-03-23T04:20:03.529Z","0.0.3":"2026-03-31T21:32:52.209Z","0.0.4":"2026-06-04T08:50:22.929Z","0.0.5":"2026-06-30T10:53:23.127Z","0.0.6":"2026-06-30T11:23:52.198Z","0.1.0":"2026-07-15T07:50:48.098Z","0.2.0":"2026-09-09T13:09:27.861Z"},"bugs":{"url":"https://github.com/cafercangundogdu/nestjs-zod-openapi/issues"},"author":{"name":"Cafer Can Gundogdu"},"license":"MIT","homepage":"https://github.com/cafercangundogdu/nestjs-zod-openapi#readme","keywords":["nestjs","zod","openapi","swagger","zod4","discriminatedUnion","oneOf","dto","validation"],"repository":{"type":"git","url":"git+https://github.com/cafercangundogdu/nestjs-zod-openapi.git"},"description":"NestJS + Zod 4 + OpenAPI — type-safe DTOs with discriminatedUnion oneOf support","maintainers":[{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"}],"readme":"# @cafercangundogdu/nestjs-zod-openapi\n\n[![npm version](https://img.shields.io/npm/v/@cafercangundogdu/nestjs-zod-openapi.svg)](https://www.npmjs.com/package/@cafercangundogdu/nestjs-zod-openapi)\n[![npm downloads](https://img.shields.io/npm/dm/@cafercangundogdu/nestjs-zod-openapi.svg)](https://www.npmjs.com/package/@cafercangundogdu/nestjs-zod-openapi)\n[![CI](https://github.com/cafercangundogdu/nestjs-zod-openapi/actions/workflows/ci.yml/badge.svg)](https://github.com/cafercangundogdu/nestjs-zod-openapi/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![NestJS](https://img.shields.io/badge/NestJS-11+-ea2845.svg)](https://nestjs.com/)\n[![Zod](https://img.shields.io/badge/Zod-4+-3068b7.svg)](https://zod.dev/)\n\n> Type-safe NestJS DTOs from Zod 4 schemas with full OpenAPI support — `discriminatedUnion` → `oneOf`, nested `$ref`, `enum`, and more.\n\n## Features\n\n- `z.discriminatedUnion()` → OpenAPI `oneOf` with `discriminator`\n- `z.union()` → OpenAPI `anyOf`\n- `z.nativeEnum()` → OpenAPI `enum`\n- `.openapi('Name')` → named `$ref` in `components/schemas`\n- `ZodValidationPipe` — request validation with structured error responses\n- `createZodDto()` — type-safe DTO classes from any Zod schema\n\n## Install\n\n```bash\npnpm add @cafercangundogdu/nestjs-zod-openapi\n```\n\nPeer dependencies: `@nestjs/common ^11 || ^12`, `@nestjs/swagger ^11 || ^12`, `zod ^4`\n\n## Quick start\n\n### 1. Initialize Zod OpenAPI\n\nCall `initZodOpenApi(z)` **at the very top** of your `main.ts`, before any module imports that use `.openapi()`:\n\n```typescript\n// src/zod-init.ts (create this file)\nimport { z } from 'zod';\nimport { initZodOpenApi } from '@cafercangundogdu/nestjs-zod-openapi';\n\ninitZodOpenApi(z);\n```\n\n```typescript\n// src/main.ts\nimport './zod-init'; // must be first import\n\nimport { NestFactory } from '@nestjs/core';\nimport { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';\nimport { patchNestSwagger } from '@cafercangundogdu/nestjs-zod-openapi';\nimport { AppModule } from './app.module';\n\nasync function bootstrap() {\n  const app = await NestFactory.create(AppModule);\n\n  patchNestSwagger({ schemasSort: 'alpha' });\n\n  const config = new DocumentBuilder()\n    .setTitle('My API')\n    .setVersion('1.0')\n    .build();\n\n  const document = SwaggerModule.createDocument(app, config);\n  SwaggerModule.setup('docs', app, document);\n\n  await app.listen(3000);\n}\nbootstrap();\n```\n\n> **Why a separate file?** `initZodOpenApi(z)` must run before any DTO file that calls `.openapi()` is loaded. Putting it in a separate file imported first guarantees execution order.\n\n### 2. Create DTOs\n\n```typescript\nimport { z } from 'zod';\nimport { createZodDto } from '@cafercangundogdu/nestjs-zod-openapi';\n\nconst UserSchema = z\n  .object({\n    id: z.string().uuid(),\n    name: z.string(),\n    email: z.string().email(),\n  })\n  .openapi('User');\n\nexport class UserDto extends createZodDto(UserSchema) {}\n```\n\n### 3. Validate requests\n\n```typescript\nimport { Module } from '@nestjs/common';\nimport { APP_PIPE } from '@nestjs/core';\nimport { ZodValidationPipe } from '@cafercangundogdu/nestjs-zod-openapi';\n\n@Module({\n  providers: [{ provide: APP_PIPE, useClass: ZodValidationPipe }],\n})\nexport class AppModule {}\n```\n\n## Discriminated union → oneOf\n\n```typescript\nconst TextPart = z\n  .object({ type: z.literal('text'), content: z.string() })\n  .openapi('TextPart');\n\nconst ImagePart = z\n  .object({ type: z.literal('image'), url: z.string().url() })\n  .openapi('ImagePart');\n\nconst MessagePart = z\n  .discriminatedUnion('type', [TextPart, ImagePart])\n  .openapi('MessagePart');\n\n// Union DTOs use const assignment (not extends)\nexport const MessagePartDto = createZodDto(MessagePart);\nexport type MessagePartInput = z.output<typeof MessagePart>;\n```\n\nOpenAPI output:\n\n```yaml\nMessagePart:\n  oneOf:\n    - $ref: '#/components/schemas/TextPart'\n    - $ref: '#/components/schemas/ImagePart'\n  discriminator:\n    propertyName: type\n    mapping:\n      text: '#/components/schemas/TextPart'\n      image: '#/components/schemas/ImagePart'\n```\n\n## Nested $ref\n\n```typescript\nconst Address = z\n  .object({ street: z.string(), city: z.string() })\n  .openapi('Address');\n\nconst User = z\n  .object({ name: z.string(), address: Address })\n  .openapi('User');\n```\n\n```yaml\nUser:\n  properties:\n    name: { type: string }\n    address: { $ref: '#/components/schemas/Address' }\n```\n\n## Union DTOs in controllers\n\nObject DTOs work directly as types:\n\n```typescript\n@Body() body: CreateUserDto  // ✅ works\n```\n\nUnion/discriminatedUnion DTOs need a companion type:\n\n```typescript\n// dto.ts\nexport const MessagePartDto = createZodDto(MessagePartSchema);\nexport type MessagePartInput = z.output<typeof MessagePartSchema>;\n\n// controller.ts\n@Post()\n@ApiCreatedResponse({ type: MessagePartDto })  // Swagger\nasync create(@Body() body: MessagePartInput) {  // TypeScript type\n  return body;\n}\n```\n\n## NestJS 12: Standard Schema\n\nNestJS 12 accepts a Standard Schema directly on the parameter decorators — no DTO class needed. Zod 4 schemas are Standard Schemas, so they can be passed as-is:\n\n```typescript\nimport { Body, Controller, Get, Param, Post, Query } from '@nestjs/common';\nimport { ApiOkResponse } from '@nestjs/swagger';\nimport { z } from 'zod';\n\n@Controller('users')\nexport class UsersController {\n  @Post()\n  @ApiOkResponse({ standardSchema: UserSchema })\n  create(@Body({ schema: CreateUserSchema }) body: z.infer<typeof CreateUserSchema>) {\n    return body;\n  }\n\n  @Get(':id')\n  @ApiOkResponse({ standardSchema: UserSchema })\n  findOne(\n    @Param('id', { schema: z.string().uuid() }) id: string,\n    @Query({ schema: ListUsersSchema }) query: z.infer<typeof ListUsersSchema>,\n  ) {\n    return { id, query };\n  }\n}\n```\n\n`patchNestSwagger()` handles the Swagger side automatically — it injects `createStandardSchemaConverter()` into `SwaggerModule.createDocument()`. `ZodValidationPipe` registered globally validates these parameters too, throwing the same `BadRequestException` as it does for `createZodDto()` classes.\n\nIf you don't use the patch, pass the converter yourself:\n\n```typescript\nimport { createStandardSchemaConverter } from '@cafercangundogdu/nestjs-zod-openapi';\n\nconst document = SwaggerModule.createDocument(app, config, {\n  standardSchemaConverter: createStandardSchemaConverter(),\n});\n```\n\nTo keep `@nestjs/swagger`'s built-in conversion instead, opt out:\n\n```typescript\npatchNestSwagger({ standardSchemaConverter: false });\n```\n\n`patchNestSwagger({ standardSchemaConverter: myConverter })` also accepts a custom converter, and a `standardSchemaConverter` passed to `createDocument()` by your app always wins.\n\nWhat the converter gives you over the built-in conversion:\n\n- `.openapi('Name')` schemas become `components/schemas/Name` referenced by `$ref` (nested named schemas become components too); unnamed schemas are inlined\n- `z.discriminatedUnion()` → `oneOf` with `discriminator`\n- `z.coerce.date()` → `string` / `date-time` (the built-in conversion throws *Date cannot be represented in JSON Schema*)\n- spurious `nullable` on `z.coerce.*` stripped, `format` checks (uuid, email, …) gain their regex `pattern`\n- non-Zod Standard Schemas (Valibot, ArkType, …) fall back to `@nestjs/swagger`'s built-in conversion\n\n> Transforms and pipes are described from their **input** side for both request and response schemas — same limitation as `createZodDto()`.\n\nOn `@nestjs/swagger` 11 all of this is inert; nothing changes for NestJS 11 users.\n\n## API\n\n| Export | Description |\n|--------|-------------|\n| `initZodOpenApi(z)` | Extends Zod with `.openapi()`. Call once before DTOs load. |\n| `createZodDto(schema)` | Creates a DTO class from any Zod schema. |\n| `ZodValidationPipe` | NestJS pipe — validates against DTO's Zod schema. |\n| `patchNestSwagger(opts?)` | Patches Swagger to generate schemas from Zod. |\n| `createStandardSchemaConverter()` | `standardSchemaConverter` for `createDocument()` — renders Zod Standard Schemas (NestJS 12). |\n| `isZodDto(value)` | Type guard for ZodDto classes. |\n\n## Compatibility\n\n| Dependency | Version |\n|------------|---------|\n| `@nestjs/common` | ^11 \\|\\| ^12 |\n| `@nestjs/swagger` | ^11 \\|\\| ^12 |\n| `zod` | ^4 |\n| `node` | >= 22.12 |\n\nNestJS 12 ships ESM-only packages. Both the CommonJS and ESM builds of this library work with it unchanged — Node loads the `@nestjs/*` internals through `require(esm)`, so no changes to your app are needed.\n\n## How it works\n\n`patchNestSwagger()` monkey-patches `@nestjs/swagger` internals:\n\n- `SchemaObjectFactory.prototype.exploreModelSchema` — routes Zod DTOs through [@asteasolutions/zod-to-openapi](https://github.com/asteasolutions/zod-to-openapi)\n- `SwaggerScanner.prototype.scanApplication` — merges generated schemas into the document and injects the Standard Schema converter\n- `SchemaObjectFactory.prototype.getSchemaOverride` (`@nestjs/swagger` 12 only) — expands an unnamed `@Query({ schema })` / `@Param({ schema })` whose schema is named with `.openapi('Name')` into individual parameters\n\n`initZodOpenApi(z)` passes **your** Zod instance to `extendZodWithOpenApi()`, avoiding duplicate-package issues in pnpm/monorepo setups.\n\n> Since this relies on `@nestjs/swagger` internals, a major Swagger update may require a corresponding update here. Tested against `@nestjs/swagger ^11` and `^12`.\n\n## Development\n\nRequires Node 22+ and pnpm 11 — the `packageManager` field pins the exact version, so `corepack enable` is enough.\n\n```bash\npnpm install\npnpm test              # Vitest\npnpm run test:watch\npnpm run test:cov\npnpm run lint          # Biome\npnpm run typecheck\npnpm run build         # CJS + ESM\npnpm run check:package # publint + are-the-types-wrong\n```\n\nCI runs the suite on Node 22/24 × NestJS 11/12 — tests that need NestJS 12 features are skipped on the 11 leg.\n\nCommits follow [Conventional Commits](https://www.conventionalcommits.org/), enforced by commitlint via a husky hook.\n\nChangelog: [CHANGELOG.md](CHANGELOG.md).\n\n### Releasing\n\nReleases are driven by [release-please](https://github.com/googleapis/release-please). Every push to `main` refreshes a `chore(main): release x.y.z` pull request built from the Conventional Commits since the last tag — `feat` bumps the minor, `fix` the patch, and while the package is below 1.0.0 a `!` / `BREAKING CHANGE` bumps the minor too.\n\nMerging that PR bumps `package.json` and `.release-please-manifest.json`, rewrites `CHANGELOG.md`, and creates the `vX.Y.Z` tag and GitHub release. The publish workflow then runs on that push to `main` and publishes to npm with provenance — it skips versions already on npm, so ordinary merges are no-ops.\n\nOne-time bootstrap for 0.2.0 — release-please needs the manifest version to exist as a release before it takes over, so after merging this work create it by hand:\n\n```bash\ngh release create v0.2.0 --title v0.2.0 --notes-file <(sed -n '/^## \\[0.2.0\\]/,/^## \\[/p' CHANGELOG.md)\n```\n\nThe npm publish of 0.2.0 happens on its own from the push to `main`. With the default `GITHUB_TOKEN` the release PR runs no CI checks — add a `RELEASE_PLEASE_TOKEN` secret (a PAT with contents + pull-requests write) to fix that.\n\n## Inspired by\n\n- [@asteasolutions/zod-to-openapi](https://github.com/asteasolutions/zod-to-openapi) — Zod → OpenAPI schema generation\n- [@wahyubucil/nestjs-zod-openapi](https://github.com/wahyubucil/nestjs-zod-openapi) — Zod 3 + NestJS 10 integration\n- [@anatine/zod-nestjs](https://github.com/anatine/zod-plugins/tree/main/packages/zod-nestjs) — Zod DTO integration\n- [nestjs-zod](https://github.com/BenLorantfy-Leapsome/nestjs-zod) — Zod integration for NestJS\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}