@anatine/zod-openapi
Advanced tools
Comparing version 1.12.1 to 1.13.0
@@ -5,2 +5,9 @@ # Changelog | ||
## [1.13.0](https://github.com/anatine/zod-plugins/compare/zod-openapi-1.12.0...zod-openapi-1.13.0) (2023-05-13) | ||
### Features | ||
* **zod-openapi:** add support for branded types ([3df8e00](https://github.com/anatine/zod-plugins/commit/3df8e00dd9ed602e6a0b44e9c4b2d7fec4f89607)) | ||
### [1.12.1](https://github.com/anatine/zod-plugins/compare/zod-openapi-1.12.0...zod-openapi-1.12.1) (2023-04-23) | ||
@@ -7,0 +14,0 @@ |
{ | ||
"name": "@anatine/zod-openapi", | ||
"version": "1.12.1", | ||
"version": "1.13.0", | ||
"description": "Zod to OpenAPI converter", | ||
@@ -24,8 +24,8 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"ts-deepmerge": "^4.0.0" | ||
"ts-deepmerge": "4.0.0" | ||
}, | ||
"peerDependencies": { | ||
"zod": "^3.20.0", | ||
"openapi3-ts": "^2.0.0 || ^3.0.0" | ||
"openapi3-ts": "^2.0.0 || ^3.0.0", | ||
"zod": "^3.20.0" | ||
} | ||
} |
@@ -220,2 +220,5 @@ "use strict"; | ||
} | ||
function parseBranded({ schemas, zodRef, }) { | ||
return (0, ts_deepmerge_1.default)(generateSchema(zodRef._def.type), ...schemas); | ||
} | ||
function catchAllParser({ zodRef, schemas, }) { | ||
@@ -246,2 +249,3 @@ return (0, ts_deepmerge_1.default)(zodRef.description ? { description: zodRef.description } : {}, ...schemas); | ||
ZodNever: parseNever, | ||
ZodBranded: parseBranded, | ||
// TODO Transform the rest to schemas | ||
@@ -248,0 +252,0 @@ ZodUndefined: catchAllParser, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35799
308
Updatedts-deepmerge@4.0.0