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 6fcdacf commit 4ed9a64Copy full SHA for 4ed9a64
1 file changed
express-zod-api/src/documentation-helpers.ts
@@ -119,7 +119,6 @@ export const depictUnion: Depicter = ({ zodSchema, jsonSchema }) => {
119
return jsonSchema;
120
if (!("discriminator" in zodSchema._zod.def)) return jsonSchema;
121
const propertyName: string = zodSchema._zod.def.discriminator;
122
- if (!propertyName) return jsonSchema;
123
return {
124
...jsonSchema,
125
discriminator: jsonSchema.discriminator ?? { propertyName },
0 commit comments