From 9e0a222a6c9e1905fbe3d6ce456e7e5e8de9ab77 Mon Sep 17 00:00:00 2001 From: Andrea Carraro Date: Mon, 18 Sep 2023 17:11:32 +0200 Subject: [PATCH] fix: isRef meta data prop for inline refHandling (#77) --- .changeset/purple-ducks-rule.md | 5 +++++ src/openapiToTsJsonSchema.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/purple-ducks-rule.md diff --git a/.changeset/purple-ducks-rule.md b/.changeset/purple-ducks-rule.md new file mode 100644 index 0000000..2d871b8 --- /dev/null +++ b/.changeset/purple-ducks-rule.md @@ -0,0 +1,5 @@ +--- +'openapi-ts-json-schema': patch +--- + +Fix `isRef` meta data prop for inline refHandling diff --git a/src/openapiToTsJsonSchema.ts b/src/openapiToTsJsonSchema.ts index 51dc099..a7bf3d7 100644 --- a/src/openapiToTsJsonSchema.ts +++ b/src/openapiToTsJsonSchema.ts @@ -142,7 +142,7 @@ export async function openapiToTsJsonSchema({ outputPath, schemaPatcher, refHandling, - isRef: false, + isRef: inlinedRefs.has(id), }); } }