Skip to content

Commit ed44f66

Browse files
committed
fix generator
1 parent 183a77c commit ed44f66

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.generator/src/generator/formatter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,13 +308,13 @@ def format_data_with_schema_dict(
308308
)
309309
parameters += f"{escape_reserved_keyword(snake_case(k))}: {value},\n"
310310

311-
if schema.get("additionalProperties"):
311+
if (additionalProperties := schema.get("additionalProperties", {})) and additionalProperties != False:
312312
for k, v in data.items():
313313
if has_properties and k in schema["properties"]:
314314
continue
315315
value = format_data_with_schema(
316316
v,
317-
schema["additionalProperties"],
317+
additionalProperties,
318318
name_prefix=name_prefix,
319319
replace_values=replace_values,
320320
)

.generator/src/generator/openapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def type_to_ruby(schema, alternative_name=None):
3333
if "enum" in schema:
3434
return name
3535
if (
36-
not (schema.get("additionalProperties") and not schema.get("properties"))
36+
not (schema.get("additionalProperties") not in (None, False) and not schema.get("properties"))
3737
and schema.get("type", "object") == "object"
3838
):
3939
return name

0 commit comments

Comments
 (0)