From 04496745b8f068143abeaeaa309d7996ce8644a5 Mon Sep 17 00:00:00 2001 From: Sherzod Karimov Date: Thu, 12 Jun 2025 14:15:02 -0400 Subject: [PATCH] handle maps --- .generator/src/generator/formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.generator/src/generator/formatter.py b/.generator/src/generator/formatter.py index 1491b9da6a4..7aac737d73c 100644 --- a/.generator/src/generator/formatter.py +++ b/.generator/src/generator/formatter.py @@ -605,7 +605,7 @@ def format_data_with_schema_dict( return _format_oneof(schema, data, name, default_name, replace_values, imports) # NOTE this is a special case for unnamed objects that should be avoided in the future - if schema.get("type") == "object" and not data: + if schema.get("type") == "object" and not data and "additionalProperties" not in schema: return "Object", "new Object()", set() if schema.get("type") == "object" and "properties" not in schema and schema.get("additionalProperties") == {}: