We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce6463e commit 7dfac9cCopy full SHA for 7dfac9c
1 file changed
express-zod-api/src/zts.ts
@@ -93,9 +93,9 @@ const onObject: Producer = (
93
([key, value]) => {
94
const isOptional = isResponse
95
? value._zod.def.type === "optional"
96
- : value._zod.def.type === "promise"
97
- ? false
98
- : value instanceof z.ZodType && value.isOptional();
+ : value._zod.def.type !== "promise" &&
+ value instanceof z.ZodType &&
+ value.isOptional();
99
const { description: comment, deprecated: isDeprecated } =
100
globalRegistry.get(value) || {};
101
return makeInterfaceProp(key, next(value), {
0 commit comments