@@ -76,7 +76,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7676 self .default_headers [header_name ] = header_value
7777 self .cookie = cookie
7878 # Set default User-Agent.
79- self .user_agent = 'OpenAPI-Generator/0.4.5 /python'
79+ self .user_agent = 'OpenAPI-Generator/0.5.0 /python'
8080
8181 def __enter__ (self ):
8282 return self
@@ -673,7 +673,8 @@ def __init__(self, settings=None, params_map=None, root_map=None,
673673 '_return_http_data_only' ,
674674 '_check_input_type' ,
675675 '_check_return_type' ,
676- '_content_type'
676+ '_content_type' ,
677+ '_spec_property_naming'
677678 ])
678679 self .params_map ['nullable' ].extend (['_request_timeout' ])
679680 self .validations = root_map ['validations' ]
@@ -687,6 +688,7 @@ def __init__(self, settings=None, params_map=None, root_map=None,
687688 '_return_http_data_only' : (bool ,),
688689 '_check_input_type' : (bool ,),
689690 '_check_return_type' : (bool ,),
691+ '_spec_property_naming' : (bool ,),
690692 '_content_type' : (none_type , str )
691693 }
692694 self .openapi_types .update (extra_types )
@@ -723,7 +725,7 @@ def __validate_inputs(self, kwargs):
723725 value ,
724726 self .openapi_types [key ],
725727 [key ],
726- False ,
728+ kwargs [ '_spec_property_naming' ] ,
727729 kwargs ['_check_input_type' ],
728730 configuration = self .api_client .configuration
729731 )
@@ -751,11 +753,11 @@ def __gather_params(self, kwargs):
751753 base_name = self .attribute_map [param_name ]
752754 if (param_location == 'form' and
753755 self .openapi_types [param_name ] == (file_type ,)):
754- params ['file' ][param_name ] = [param_value ]
756+ params ['file' ][base_name ] = [param_value ]
755757 elif (param_location == 'form' and
756758 self .openapi_types [param_name ] == ([file_type ],)):
757759 # param_value is already a list
758- params ['file' ][param_name ] = param_value
760+ params ['file' ][base_name ] = param_value
759761 elif param_location in {'form' , 'query' }:
760762 param_value_full = (base_name , param_value )
761763 params [param_location ].append (param_value_full )
0 commit comments