File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments