Skip to content

Commit 63d6b98

Browse files
authored
fix(zod): preserve null type when .nullish() is applied to named schema reference (#145)
1 parent a2b79b1 commit 63d6b98

5 files changed

Lines changed: 104 additions & 35 deletions

File tree

apps/next-app-sandbox/public/openapi.json

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -486,20 +486,14 @@
486486
"description": "The profile image"
487487
},
488488
"avatar": {
489-
"allOf": [
490-
{
491-
"$ref": "#/components/schemas/Image"
492-
}
493-
],
494-
"description": "The avatar image"
489+
"$ref": "#/components/schemas/Image",
490+
"description": "The avatar image",
491+
"nullable": true
495492
},
496493
"banner": {
497-
"allOf": [
498-
{
499-
"$ref": "#/components/schemas/Image"
500-
}
501-
],
502-
"description": "The banner image"
494+
"$ref": "#/components/schemas/Image",
495+
"description": "The banner image",
496+
"nullable": true
503497
}
504498
},
505499
"required": [

0 commit comments

Comments
 (0)