Skip to content

Commit 179a42d

Browse files
authored
Merge pull request #313 from macieklad/fix-open-standard-schema-calls
fix: `unwrapSchema` calls for libraries supporting open standard schema
2 parents f3c0393 + a71a4b5 commit 179a42d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/openapi.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,10 @@ export const unwrapSchema = (
534534
try {
535535
// @ts-ignore
536536
if (schema['~standard']?.jsonSchema?.[io])
537-
// @ts-ignore
538-
return schema['~standard']?.jsonSchema?.[io]?.()
537+
// @ts-ignore
538+
return schema['~standard']?.jsonSchema?.[io]?.({
539+
target: "draft-2020-12"
540+
})
539541

540542
if (
541543
mapJsonSchema?.[vendor] &&

0 commit comments

Comments
 (0)