forked from loafle/openapi-generator-original
[python] Do not pydantic-validate function args twice (#16776)
* refactor: Use newlines in _with_http_info call This prevents too-long lines and matches the style that black would enforce. * fix: Do not pydantic-validate function args twice Closes #15757
This commit is contained in:
@@ -70,7 +70,10 @@ class AuthApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_auth_http_basic_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_auth_http_basic_with_http_info(**kwargs) # noqa: E501
|
||||
|
||||
return self.test_auth_http_basic_with_http_info.raw_function(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_auth_http_basic_with_http_info(
|
||||
|
||||
@@ -78,7 +78,10 @@ class BodyApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_binary_gif_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_binary_gif_with_http_info(**kwargs) # noqa: E501
|
||||
|
||||
return self.test_binary_gif_with_http_info.raw_function(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_binary_gif_with_http_info(
|
||||
@@ -219,7 +222,11 @@ class BodyApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_body_application_octetstream_binary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_body_application_octetstream_binary_with_http_info(body, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_body_application_octetstream_binary_with_http_info.raw_function(
|
||||
body,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_body_application_octetstream_binary_with_http_info(
|
||||
@@ -379,7 +386,11 @@ class BodyApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_body_multipart_formdata_array_of_binary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_body_multipart_formdata_array_of_binary_with_http_info(files, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_body_multipart_formdata_array_of_binary_with_http_info.raw_function(
|
||||
files,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_body_multipart_formdata_array_of_binary_with_http_info(
|
||||
@@ -535,7 +546,11 @@ class BodyApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_echo_body_free_form_object_response_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_echo_body_free_form_object_response_string_with_http_info(body, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_echo_body_free_form_object_response_string_with_http_info.raw_function(
|
||||
body,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_echo_body_free_form_object_response_string_with_http_info(
|
||||
@@ -690,7 +705,11 @@ class BodyApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_echo_body_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_echo_body_pet_with_http_info(pet, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_echo_body_pet_with_http_info.raw_function(
|
||||
pet,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_echo_body_pet_with_http_info(
|
||||
@@ -845,7 +864,11 @@ class BodyApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_echo_body_pet_response_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_echo_body_pet_response_string_with_http_info(pet, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_echo_body_pet_response_string_with_http_info.raw_function(
|
||||
pet,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_echo_body_pet_response_string_with_http_info(
|
||||
@@ -1000,7 +1023,11 @@ class BodyApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_echo_body_tag_response_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_echo_body_tag_response_string_with_http_info(tag, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_echo_body_tag_response_string_with_http_info.raw_function(
|
||||
tag,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_echo_body_tag_response_string_with_http_info(
|
||||
|
||||
@@ -83,7 +83,13 @@ class FormApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_form_integer_boolean_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_form_integer_boolean_string_with_http_info(integer_form, boolean_form, string_form, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_form_integer_boolean_string_with_http_info.raw_function(
|
||||
integer_form,
|
||||
boolean_form,
|
||||
string_form,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_form_integer_boolean_string_with_http_info(
|
||||
@@ -267,7 +273,16 @@ class FormApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_form_oneof_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_form_oneof_with_http_info(form1, form2, form3, form4, id, name, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_form_oneof_with_http_info.raw_function(
|
||||
form1,
|
||||
form2,
|
||||
form3,
|
||||
form4,
|
||||
id,
|
||||
name,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_form_oneof_with_http_info(
|
||||
|
||||
@@ -90,7 +90,15 @@ class HeaderApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_header_integer_boolean_string_enums_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_header_integer_boolean_string_enums_with_http_info(integer_header, boolean_header, string_header, enum_nonref_string_header, enum_ref_string_header, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_header_integer_boolean_string_enums_with_http_info.raw_function(
|
||||
integer_header,
|
||||
boolean_header,
|
||||
string_header,
|
||||
enum_nonref_string_header,
|
||||
enum_ref_string_header,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_header_integer_boolean_string_enums_with_http_info(
|
||||
|
||||
@@ -85,7 +85,14 @@ class PathApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path_with_http_info(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, **kwargs) # noqa: E501
|
||||
|
||||
return self.tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path_with_http_info.raw_function(
|
||||
path_string,
|
||||
path_integer,
|
||||
enum_nonref_string_path,
|
||||
enum_ref_string_path,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path_with_http_info(
|
||||
|
||||
@@ -85,7 +85,12 @@ class QueryApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_enum_ref_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_enum_ref_string_with_http_info(enum_nonref_string_query, enum_ref_string_query, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_enum_ref_string_with_http_info.raw_function(
|
||||
enum_nonref_string_query,
|
||||
enum_ref_string_query,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_enum_ref_string_with_http_info(
|
||||
@@ -246,7 +251,13 @@ class QueryApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_query_datetime_date_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_datetime_date_string_with_http_info(datetime_query, date_query, string_query, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_query_datetime_date_string_with_http_info.raw_function(
|
||||
datetime_query,
|
||||
date_query,
|
||||
string_query,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_query_datetime_date_string_with_http_info(
|
||||
@@ -420,7 +431,13 @@ class QueryApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_query_integer_boolean_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_integer_boolean_string_with_http_info(integer_query, boolean_query, string_query, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_query_integer_boolean_string_with_http_info.raw_function(
|
||||
integer_query,
|
||||
boolean_query,
|
||||
string_query,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_query_integer_boolean_string_with_http_info(
|
||||
@@ -582,7 +599,11 @@ class QueryApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_query_style_deep_object_explode_true_object_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_style_deep_object_explode_true_object_with_http_info(query_object, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_query_style_deep_object_explode_true_object_with_http_info.raw_function(
|
||||
query_object,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_query_style_deep_object_explode_true_object_with_http_info(
|
||||
@@ -730,7 +751,11 @@ class QueryApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_query_style_deep_object_explode_true_object_all_of_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_style_deep_object_explode_true_object_all_of_with_http_info(query_object, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_query_style_deep_object_explode_true_object_all_of_with_http_info.raw_function(
|
||||
query_object,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_query_style_deep_object_explode_true_object_all_of_with_http_info(
|
||||
@@ -878,7 +903,11 @@ class QueryApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_query_style_form_explode_true_array_string_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_style_form_explode_true_array_string_with_http_info(query_object, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_query_style_form_explode_true_array_string_with_http_info.raw_function(
|
||||
query_object,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_query_style_form_explode_true_array_string_with_http_info(
|
||||
@@ -1026,7 +1055,11 @@ class QueryApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_query_style_form_explode_true_object_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_style_form_explode_true_object_with_http_info(query_object, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_query_style_form_explode_true_object_with_http_info.raw_function(
|
||||
query_object,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_query_style_form_explode_true_object_with_http_info(
|
||||
@@ -1174,7 +1207,11 @@ class QueryApi:
|
||||
if '_preload_content' in kwargs:
|
||||
message = "Error! Please call the test_query_style_form_explode_true_object_all_of_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
||||
raise ValueError(message)
|
||||
return self.test_query_style_form_explode_true_object_all_of_with_http_info(query_object, **kwargs) # noqa: E501
|
||||
|
||||
return self.test_query_style_form_explode_true_object_all_of_with_http_info.raw_function(
|
||||
query_object,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@validate_call
|
||||
def test_query_style_form_explode_true_object_all_of_with_http_info(
|
||||
|
||||
Reference in New Issue
Block a user