From 2476215f90baea2a3f2fbfc451b0a7ca1d4ce5f4 Mon Sep 17 00:00:00 2001 From: dsinghvi Date: Thu, 5 Dec 2024 10:48:52 -0500 Subject: [PATCH] fix: dont unnecessarily set additional properties true --- .../src/openapi/v3/AbstractOpenAPIV3ParserContext.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/AbstractOpenAPIV3ParserContext.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/AbstractOpenAPIV3ParserContext.ts index 3af2189c53f..dea8ec2eb5a 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/AbstractOpenAPIV3ParserContext.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/AbstractOpenAPIV3ParserContext.ts @@ -106,17 +106,16 @@ export abstract class AbstractOpenAPIV3ParserContext implements SchemaParserCont for (const key of keys) { if (typeof resolvedSchema !== "object" || resolvedSchema == null) { return { - "x-fern-type": "unknown", - additionalProperties: true + "x-fern-type": "unknown" // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any as OpenAPIV3.SchemaObject; } resolvedSchema = resolvedSchema[key]; } if (resolvedSchema == null) { + this.logger.warn(`Encountered undefined reference: ${schema.$ref}`); return { - "x-fern-type": "unknown", - additionalProperties: true + "x-fern-type": "unknown" // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any as OpenAPIV3.SchemaObject; }