From 005566c6e3d60557caa2b4b894c60ab5c24d0a30 Mon Sep 17 00:00:00 2001 From: Tom Crasset <25140344+tcrasset@users.noreply.github.com> Date: Fri, 8 Sep 2023 08:46:15 +0200 Subject: [PATCH] [typescript] fix: allow 'additionalProperties: true' at top level (#16526) * fix: allow 'additionalProperties: true' at top level * refactor: use same call as other typescript generators --- .../openapitools/codegen/languages/TypeScriptClientCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java index fb131f00499b..696bf349ca5f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java @@ -502,7 +502,7 @@ public String getTypeDeclaration(Schema p) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration((Schema) schema.getAdditionalProperties()); + codegenModel.additionalPropertiesType = getSchemaType(ModelUtils.getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); }