We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 71afc31 + 70d31cd commit 24ea3e6Copy full SHA for 24ea3e6
1 file changed
src/openapi.ts
@@ -531,19 +531,19 @@ export const unwrapSchema = (
531
const vendor = schema['~standard'].vendor
532
533
try {
534
- // @ts-ignore
535
- if (schema['~standard']?.jsonSchema?.[io])
536
537
- return schema['~standard']?.jsonSchema?.[io]?.({
538
- target: "draft-2020-12"
539
- })
540
-
541
if (
542
mapJsonSchema?.[vendor] &&
543
typeof mapJsonSchema[vendor] === 'function'
544
)
545
return enumToOpenApi(mapJsonSchema[vendor](schema))
546
+ // @ts-ignore
+ if (schema['~standard']?.jsonSchema?.[io])
+ return enumToOpenApi(schema['~standard'].jsonSchema[io]({
+ target: 'draft-2020-12'
+ }))
+
547
switch (vendor) {
548
case 'zod':
549
if (warned.zod4 || warned.zod3) break
0 commit comments