forked from loafle/openapi-generator-original
[Python] abbreviate dictionary membership testing idiom (#11905)
This is a more brief and efficient way of accomplishing the same thing.
This commit is contained in:
committed by
GitHub
parent
8580e9fcf8
commit
61245fc52b
@@ -128,8 +128,7 @@ class AnotherFakeApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
||||
local_var_params['body'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `body` when calling `call_123_test_special_tags`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
@@ -128,8 +128,7 @@ class FakeApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'xml_item' is set
|
||||
if self.api_client.client_side_validation and ('xml_item' not in local_var_params or # noqa: E501
|
||||
local_var_params['xml_item'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('xml_item') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `xml_item` when calling `create_xml_item`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -804,8 +803,7 @@ class FakeApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
||||
local_var_params['body'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_file_schema`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -947,12 +945,10 @@ class FakeApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'query' is set
|
||||
if self.api_client.client_side_validation and ('query' not in local_var_params or # noqa: E501
|
||||
local_var_params['query'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('query') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501
|
||||
# verify the required parameter 'body' is set
|
||||
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
||||
local_var_params['body'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_query_params`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -960,7 +956,7 @@ class FakeApi(object):
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501
|
||||
if local_var_params.get('query') is not None: # noqa: E501
|
||||
query_params.append(('query', local_var_params['query'])) # noqa: E501
|
||||
|
||||
header_params = dict(local_var_params.get('_headers', {}))
|
||||
@@ -1093,8 +1089,7 @@ class FakeApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
||||
local_var_params['body'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `body` when calling `test_client_model`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -1304,20 +1299,16 @@ class FakeApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'number' is set
|
||||
if self.api_client.client_side_validation and ('number' not in local_var_params or # noqa: E501
|
||||
local_var_params['number'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('number') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") # noqa: E501
|
||||
# verify the required parameter 'double' is set
|
||||
if self.api_client.client_side_validation and ('double' not in local_var_params or # noqa: E501
|
||||
local_var_params['double'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('double') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`") # noqa: E501
|
||||
# verify the required parameter 'pattern_without_delimiter' is set
|
||||
if self.api_client.client_side_validation and ('pattern_without_delimiter' not in local_var_params or # noqa: E501
|
||||
local_var_params['pattern_without_delimiter'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('pattern_without_delimiter') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`") # noqa: E501
|
||||
# verify the required parameter 'byte' is set
|
||||
if self.api_client.client_side_validation and ('byte' not in local_var_params or # noqa: E501
|
||||
local_var_params['byte'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('byte') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501
|
||||
|
||||
if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501
|
||||
@@ -1550,14 +1541,14 @@ class FakeApi(object):
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'enum_query_string_array' in local_var_params and local_var_params['enum_query_string_array'] is not None: # noqa: E501
|
||||
if local_var_params.get('enum_query_string_array') is not None: # noqa: E501
|
||||
query_params.append(('enum_query_string_array', local_var_params['enum_query_string_array'])) # noqa: E501
|
||||
collection_formats['enum_query_string_array'] = 'csv' # noqa: E501
|
||||
if 'enum_query_string' in local_var_params and local_var_params['enum_query_string'] is not None: # noqa: E501
|
||||
if local_var_params.get('enum_query_string') is not None: # noqa: E501
|
||||
query_params.append(('enum_query_string', local_var_params['enum_query_string'])) # noqa: E501
|
||||
if 'enum_query_integer' in local_var_params and local_var_params['enum_query_integer'] is not None: # noqa: E501
|
||||
if local_var_params.get('enum_query_integer') is not None: # noqa: E501
|
||||
query_params.append(('enum_query_integer', local_var_params['enum_query_integer'])) # noqa: E501
|
||||
if 'enum_query_double' in local_var_params and local_var_params['enum_query_double'] is not None: # noqa: E501
|
||||
if local_var_params.get('enum_query_double') is not None: # noqa: E501
|
||||
query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501
|
||||
|
||||
header_params = dict(local_var_params.get('_headers', {}))
|
||||
@@ -1723,16 +1714,13 @@ class FakeApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'required_string_group' is set
|
||||
if self.api_client.client_side_validation and ('required_string_group' not in local_var_params or # noqa: E501
|
||||
local_var_params['required_string_group'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('required_string_group') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `required_string_group` when calling `test_group_parameters`") # noqa: E501
|
||||
# verify the required parameter 'required_boolean_group' is set
|
||||
if self.api_client.client_side_validation and ('required_boolean_group' not in local_var_params or # noqa: E501
|
||||
local_var_params['required_boolean_group'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('required_boolean_group') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `required_boolean_group` when calling `test_group_parameters`") # noqa: E501
|
||||
# verify the required parameter 'required_int64_group' is set
|
||||
if self.api_client.client_side_validation and ('required_int64_group' not in local_var_params or # noqa: E501
|
||||
local_var_params['required_int64_group'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('required_int64_group') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `required_int64_group` when calling `test_group_parameters`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -1740,13 +1728,13 @@ class FakeApi(object):
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'required_string_group' in local_var_params and local_var_params['required_string_group'] is not None: # noqa: E501
|
||||
if local_var_params.get('required_string_group') is not None: # noqa: E501
|
||||
query_params.append(('required_string_group', local_var_params['required_string_group'])) # noqa: E501
|
||||
if 'required_int64_group' in local_var_params and local_var_params['required_int64_group'] is not None: # noqa: E501
|
||||
if local_var_params.get('required_int64_group') is not None: # noqa: E501
|
||||
query_params.append(('required_int64_group', local_var_params['required_int64_group'])) # noqa: E501
|
||||
if 'string_group' in local_var_params and local_var_params['string_group'] is not None: # noqa: E501
|
||||
if local_var_params.get('string_group') is not None: # noqa: E501
|
||||
query_params.append(('string_group', local_var_params['string_group'])) # noqa: E501
|
||||
if 'int64_group' in local_var_params and local_var_params['int64_group'] is not None: # noqa: E501
|
||||
if local_var_params.get('int64_group') is not None: # noqa: E501
|
||||
query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501
|
||||
|
||||
header_params = dict(local_var_params.get('_headers', {}))
|
||||
@@ -1871,8 +1859,7 @@ class FakeApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'param' is set
|
||||
if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501
|
||||
local_var_params['param'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('param') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -2014,12 +2001,10 @@ class FakeApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'param' is set
|
||||
if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501
|
||||
local_var_params['param'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('param') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `param` when calling `test_json_form_data`") # noqa: E501
|
||||
# verify the required parameter 'param2' is set
|
||||
if self.api_client.client_side_validation and ('param2' not in local_var_params or # noqa: E501
|
||||
local_var_params['param2'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('param2') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -2180,24 +2165,19 @@ class FakeApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'pipe' is set
|
||||
if self.api_client.client_side_validation and ('pipe' not in local_var_params or # noqa: E501
|
||||
local_var_params['pipe'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('pipe') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `pipe` when calling `test_query_parameter_collection_format`") # noqa: E501
|
||||
# verify the required parameter 'ioutil' is set
|
||||
if self.api_client.client_side_validation and ('ioutil' not in local_var_params or # noqa: E501
|
||||
local_var_params['ioutil'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('ioutil') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `ioutil` when calling `test_query_parameter_collection_format`") # noqa: E501
|
||||
# verify the required parameter 'http' is set
|
||||
if self.api_client.client_side_validation and ('http' not in local_var_params or # noqa: E501
|
||||
local_var_params['http'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('http') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `http` when calling `test_query_parameter_collection_format`") # noqa: E501
|
||||
# verify the required parameter 'url' is set
|
||||
if self.api_client.client_side_validation and ('url' not in local_var_params or # noqa: E501
|
||||
local_var_params['url'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('url') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `url` when calling `test_query_parameter_collection_format`") # noqa: E501
|
||||
# verify the required parameter 'context' is set
|
||||
if self.api_client.client_side_validation and ('context' not in local_var_params or # noqa: E501
|
||||
local_var_params['context'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('context') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `context` when calling `test_query_parameter_collection_format`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -2205,19 +2185,19 @@ class FakeApi(object):
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'pipe' in local_var_params and local_var_params['pipe'] is not None: # noqa: E501
|
||||
if local_var_params.get('pipe') is not None: # noqa: E501
|
||||
query_params.append(('pipe', local_var_params['pipe'])) # noqa: E501
|
||||
collection_formats['pipe'] = 'csv' # noqa: E501
|
||||
if 'ioutil' in local_var_params and local_var_params['ioutil'] is not None: # noqa: E501
|
||||
if local_var_params.get('ioutil') is not None: # noqa: E501
|
||||
query_params.append(('ioutil', local_var_params['ioutil'])) # noqa: E501
|
||||
collection_formats['ioutil'] = 'csv' # noqa: E501
|
||||
if 'http' in local_var_params and local_var_params['http'] is not None: # noqa: E501
|
||||
if local_var_params.get('http') is not None: # noqa: E501
|
||||
query_params.append(('http', local_var_params['http'])) # noqa: E501
|
||||
collection_formats['http'] = 'ssv' # noqa: E501
|
||||
if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501
|
||||
if local_var_params.get('url') is not None: # noqa: E501
|
||||
query_params.append(('url', local_var_params['url'])) # noqa: E501
|
||||
collection_formats['url'] = 'csv' # noqa: E501
|
||||
if 'context' in local_var_params and local_var_params['context'] is not None: # noqa: E501
|
||||
if local_var_params.get('context') is not None: # noqa: E501
|
||||
query_params.append(('context', local_var_params['context'])) # noqa: E501
|
||||
collection_formats['context'] = 'multi' # noqa: E501
|
||||
|
||||
|
||||
@@ -128,8 +128,7 @@ class FakeClassnameTags123Api(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
||||
local_var_params['body'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `body` when calling `test_classname`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
@@ -126,8 +126,7 @@ class PetApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
||||
local_var_params['body'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `body` when calling `add_pet`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -269,8 +268,7 @@ class PetApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'pet_id' is set
|
||||
if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501
|
||||
local_var_params['pet_id'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -403,8 +401,7 @@ class PetApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'status' is set
|
||||
if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501
|
||||
local_var_params['status'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('status') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -412,7 +409,7 @@ class PetApi(object):
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501
|
||||
if local_var_params.get('status') is not None: # noqa: E501
|
||||
query_params.append(('status', local_var_params['status'])) # noqa: E501
|
||||
collection_formats['status'] = 'csv' # noqa: E501
|
||||
|
||||
@@ -543,8 +540,7 @@ class PetApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'tags' is set
|
||||
if self.api_client.client_side_validation and ('tags' not in local_var_params or # noqa: E501
|
||||
local_var_params['tags'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('tags') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -552,7 +548,7 @@ class PetApi(object):
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501
|
||||
if local_var_params.get('tags') is not None: # noqa: E501
|
||||
query_params.append(('tags', local_var_params['tags'])) # noqa: E501
|
||||
collection_formats['tags'] = 'csv' # noqa: E501
|
||||
|
||||
@@ -683,8 +679,7 @@ class PetApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'pet_id' is set
|
||||
if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501
|
||||
local_var_params['pet_id'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -821,8 +816,7 @@ class PetApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
||||
local_var_params['body'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `body` when calling `update_pet`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -969,8 +963,7 @@ class PetApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'pet_id' is set
|
||||
if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501
|
||||
local_var_params['pet_id'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -1121,8 +1114,7 @@ class PetApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'pet_id' is set
|
||||
if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501
|
||||
local_var_params['pet_id'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -1279,12 +1271,10 @@ class PetApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'pet_id' is set
|
||||
if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501
|
||||
local_var_params['pet_id'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('pet_id') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501
|
||||
# verify the required parameter 'required_file' is set
|
||||
if self.api_client.client_side_validation and ('required_file' not in local_var_params or # noqa: E501
|
||||
local_var_params['required_file'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('required_file') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `required_file` when calling `upload_file_with_required_file`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
@@ -128,8 +128,7 @@ class StoreApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'order_id' is set
|
||||
if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
|
||||
local_var_params['order_id'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('order_id') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -387,8 +386,7 @@ class StoreApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'order_id' is set
|
||||
if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501
|
||||
local_var_params['order_id'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('order_id') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501
|
||||
|
||||
if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501
|
||||
@@ -529,8 +527,7 @@ class StoreApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
||||
local_var_params['body'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `body` when calling `place_order`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
@@ -128,8 +128,7 @@ class UserApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
||||
local_var_params['body'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `body` when calling `create_user`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -258,8 +257,7 @@ class UserApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
||||
local_var_params['body'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_array_input`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -388,8 +386,7 @@ class UserApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
||||
local_var_params['body'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_list_input`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -520,8 +517,7 @@ class UserApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'username' is set
|
||||
if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501
|
||||
local_var_params['username'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('username') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -650,8 +646,7 @@ class UserApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'username' is set
|
||||
if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501
|
||||
local_var_params['username'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('username') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -793,12 +788,10 @@ class UserApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'username' is set
|
||||
if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501
|
||||
local_var_params['username'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('username') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `username` when calling `login_user`") # noqa: E501
|
||||
# verify the required parameter 'password' is set
|
||||
if self.api_client.client_side_validation and ('password' not in local_var_params or # noqa: E501
|
||||
local_var_params['password'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('password') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
@@ -806,9 +799,9 @@ class UserApi(object):
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'username' in local_var_params and local_var_params['username'] is not None: # noqa: E501
|
||||
if local_var_params.get('username') is not None: # noqa: E501
|
||||
query_params.append(('username', local_var_params['username'])) # noqa: E501
|
||||
if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501
|
||||
if local_var_params.get('password') is not None: # noqa: E501
|
||||
query_params.append(('password', local_var_params['password'])) # noqa: E501
|
||||
|
||||
header_params = dict(local_var_params.get('_headers', {}))
|
||||
@@ -1062,12 +1055,10 @@ class UserApi(object):
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'username' is set
|
||||
if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501
|
||||
local_var_params['username'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('username') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501
|
||||
# verify the required parameter 'body' is set
|
||||
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
|
||||
local_var_params['body'] is None): # noqa: E501
|
||||
if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501
|
||||
raise ApiValueError("Missing the required parameter `body` when calling `update_user`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
Reference in New Issue
Block a user