express-zod-api
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -5,2 +5,8 @@ # Changelog | ||
### v2.1.1 | ||
- Fixed issue [#92](https://github.com/RobinTail/express-zod-api/issues/92): The error | ||
`Cannot convert undefined or null to object` in OpenAPI generator when using `z.record()` type has been fixed. | ||
- Supporting type `z.any()` in OpenAPI generator. | ||
### v2.1.0 | ||
@@ -7,0 +13,0 @@ |
@@ -36,3 +36,2 @@ "use strict"; | ||
}; | ||
case value instanceof zod_1.z.ZodObject: | ||
case value instanceof zod_1.z.ZodRecord: | ||
@@ -42,2 +41,8 @@ return { | ||
type: 'object', | ||
additionalProperties: describeSchema(value._def.valueType, isResponse) | ||
}; | ||
case value instanceof zod_1.z.ZodObject: | ||
return { | ||
...otherProps, | ||
type: 'object', | ||
properties: describeObject(value, isResponse), | ||
@@ -93,2 +98,7 @@ required: Object.keys(value.shape) | ||
}; | ||
case value instanceof zod_1.z.ZodAny: | ||
return { | ||
...otherProps, | ||
format: 'any' | ||
}; | ||
case value instanceof zod_1.z.ZodUndefined: | ||
@@ -100,3 +110,2 @@ case value instanceof zod_1.z.ZodTuple: | ||
case value instanceof zod_1.z.ZodPromise: | ||
case value instanceof zod_1.z.ZodAny: | ||
case value instanceof zod_1.z.ZodUnknown: | ||
@@ -103,0 +112,0 @@ case value instanceof zod_1.z.ZodNever: |
{ | ||
"name": "express-zod-api", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "A Typescript library to help you get an API server up and running with I/O schema validation and custom middlewares in minutes.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
116020
1213