[python] Add option to skip client validations (#4137)

* Adds options to skip client side validations

* Runs petstore.sh

* Correct typo in variable name

* Consistent code styling

* Rerun petstore.sh

* Change position of local_vars_configuration

* Make code pep8 compliant
This commit is contained in:
Arun
2019-10-16 13:14:04 +05:30
committed by William Cheng
parent 095fa719b3
commit d71b1cf49e
115 changed files with 1453 additions and 620 deletions

View File

@@ -103,8 +103,8 @@ class AnotherFakeApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
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
raise ApiValueError("Missing the required parameter `body` when calling `call_123_test_special_tags`") # noqa: E501
collection_formats = {}

View File

@@ -103,8 +103,8 @@ class FakeApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'xml_item' is set
if ('xml_item' not in local_var_params or
local_var_params['xml_item'] is None):
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
raise ApiValueError("Missing the required parameter `xml_item` when calling `create_xml_item`") # noqa: E501
collection_formats = {}
@@ -627,8 +627,8 @@ class FakeApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
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
raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_file_schema`") # noqa: E501
collection_formats = {}
@@ -735,12 +735,12 @@ class FakeApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'query' is set
if ('query' not in local_var_params or
local_var_params['query'] is None):
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
raise ApiValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
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
raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_query_params`") # noqa: E501
collection_formats = {}
@@ -849,8 +849,8 @@ class FakeApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
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
raise ApiValueError("Missing the required parameter `body` when calling `test_client_model`") # noqa: E501
collection_formats = {}
@@ -987,49 +987,49 @@ class FakeApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'number' is set
if ('number' not in local_var_params or
local_var_params['number'] is None):
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
raise ApiValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") # noqa: E501
# verify the required parameter 'double' is set
if ('double' not in local_var_params or
local_var_params['double'] is None):
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
raise ApiValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`") # noqa: E501
# verify the required parameter 'pattern_without_delimiter' is set
if ('pattern_without_delimiter' not in local_var_params or
local_var_params['pattern_without_delimiter'] is None):
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
raise ApiValueError("Missing the required parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`") # noqa: E501
# verify the required parameter 'byte' is set
if ('byte' not in local_var_params or
local_var_params['byte'] is None):
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
raise ApiValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501
if 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501
if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501
raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`") # noqa: E501
if 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501
if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501
raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`") # noqa: E501
if 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501
if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501
raise ApiValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") # noqa: E501
if 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501
if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501
raise ApiValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") # noqa: E501
if 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501
if self.api_client.client_side_validation and 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501
raise ApiValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`") # noqa: E501
if 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501
if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501
raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501
if 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501
if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501
raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10`") # noqa: E501
if 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501
if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501
raise ApiValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501
if 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501
if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501
raise ApiValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`") # noqa: E501
if 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501
if self.api_client.client_side_validation and 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501
raise ApiValueError("Invalid value for parameter `float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501
if 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501
if self.api_client.client_side_validation and 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501
raise ApiValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") # noqa: E501
if ('password' in local_var_params and
len(local_var_params['password']) > 64):
if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501
len(local_var_params['password']) > 64): # noqa: E501
raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`") # noqa: E501
if ('password' in local_var_params and
len(local_var_params['password']) < 10):
if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501
len(local_var_params['password']) < 10): # noqa: E501
raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`") # noqa: E501
collection_formats = {}
@@ -1306,16 +1306,16 @@ class FakeApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'required_string_group' is set
if ('required_string_group' not in local_var_params or
local_var_params['required_string_group'] is None):
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
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 ('required_boolean_group' not in local_var_params or
local_var_params['required_boolean_group'] is None):
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
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 ('required_int64_group' not in local_var_params or
local_var_params['required_int64_group'] is None):
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
raise ApiValueError("Missing the required parameter `required_int64_group` when calling `test_group_parameters`") # noqa: E501
collection_formats = {}
@@ -1426,8 +1426,8 @@ class FakeApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'param' is set
if ('param' not in local_var_params or
local_var_params['param'] is None):
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
raise ApiValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501
collection_formats = {}
@@ -1534,12 +1534,12 @@ class FakeApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'param' is set
if ('param' not in local_var_params or
local_var_params['param'] is None):
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
raise ApiValueError("Missing the required parameter `param` when calling `test_json_form_data`") # noqa: E501
# verify the required parameter 'param2' is set
if ('param2' not in local_var_params or
local_var_params['param2'] is None):
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
raise ApiValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501
collection_formats = {}
@@ -1656,24 +1656,24 @@ class FakeApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'pipe' is set
if ('pipe' not in local_var_params or
local_var_params['pipe'] is None):
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
raise ApiValueError("Missing the required parameter `pipe` when calling `test_query_parameter_collection_format`") # noqa: E501
# verify the required parameter 'ioutil' is set
if ('ioutil' not in local_var_params or
local_var_params['ioutil'] is None):
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
raise ApiValueError("Missing the required parameter `ioutil` when calling `test_query_parameter_collection_format`") # noqa: E501
# verify the required parameter 'http' is set
if ('http' not in local_var_params or
local_var_params['http'] is None):
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
raise ApiValueError("Missing the required parameter `http` when calling `test_query_parameter_collection_format`") # noqa: E501
# verify the required parameter 'url' is set
if ('url' not in local_var_params or
local_var_params['url'] is None):
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
raise ApiValueError("Missing the required parameter `url` when calling `test_query_parameter_collection_format`") # noqa: E501
# verify the required parameter 'context' is set
if ('context' not in local_var_params or
local_var_params['context'] is None):
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
raise ApiValueError("Missing the required parameter `context` when calling `test_query_parameter_collection_format`") # noqa: E501
collection_formats = {}

View File

@@ -103,8 +103,8 @@ class FakeClassnameTags123Api(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
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
raise ApiValueError("Missing the required parameter `body` when calling `test_classname`") # noqa: E501
collection_formats = {}

View File

@@ -101,8 +101,8 @@ class PetApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
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
raise ApiValueError("Missing the required parameter `body` when calling `add_pet`") # noqa: E501
collection_formats = {}
@@ -209,8 +209,8 @@ class PetApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'pet_id' is set
if ('pet_id' not in local_var_params or
local_var_params['pet_id'] is None):
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
raise ApiValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501
collection_formats = {}
@@ -315,8 +315,8 @@ class PetApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'status' is set
if ('status' not in local_var_params or
local_var_params['status'] is None):
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
raise ApiValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501
collection_formats = {}
@@ -424,8 +424,8 @@ class PetApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'tags' is set
if ('tags' not in local_var_params or
local_var_params['tags'] is None):
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
raise ApiValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501
collection_formats = {}
@@ -533,8 +533,8 @@ class PetApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'pet_id' is set
if ('pet_id' not in local_var_params or
local_var_params['pet_id'] is None):
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
raise ApiValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501
collection_formats = {}
@@ -639,8 +639,8 @@ class PetApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
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
raise ApiValueError("Missing the required parameter `body` when calling `update_pet`") # noqa: E501
collection_formats = {}
@@ -749,8 +749,8 @@ class PetApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'pet_id' is set
if ('pet_id' not in local_var_params or
local_var_params['pet_id'] is None):
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
raise ApiValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501
collection_formats = {}
@@ -863,8 +863,8 @@ class PetApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'pet_id' is set
if ('pet_id' not in local_var_params or
local_var_params['pet_id'] is None):
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
raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501
collection_formats = {}
@@ -981,12 +981,12 @@ class PetApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'pet_id' is set
if ('pet_id' not in local_var_params or
local_var_params['pet_id'] is None):
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
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 ('required_file' not in local_var_params or
local_var_params['required_file'] is None):
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
raise ApiValueError("Missing the required parameter `required_file` when calling `upload_file_with_required_file`") # noqa: E501
collection_formats = {}

View File

@@ -103,8 +103,8 @@ class StoreApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'order_id' is set
if ('order_id' not in local_var_params or
local_var_params['order_id'] is None):
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
raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501
collection_formats = {}
@@ -307,13 +307,13 @@ class StoreApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'order_id' is set
if ('order_id' not in local_var_params or
local_var_params['order_id'] is None):
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
raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501
if 'order_id' in local_var_params and local_var_params['order_id'] > 5: # 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
raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5`") # noqa: E501
if 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501
if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501
raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
@@ -417,8 +417,8 @@ class StoreApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
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
raise ApiValueError("Missing the required parameter `body` when calling `place_order`") # noqa: E501
collection_formats = {}

View File

@@ -103,8 +103,8 @@ class UserApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
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
raise ApiValueError("Missing the required parameter `body` when calling `create_user`") # noqa: E501
collection_formats = {}
@@ -205,8 +205,8 @@ class UserApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
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
raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_array_input`") # noqa: E501
collection_formats = {}
@@ -307,8 +307,8 @@ class UserApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
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
raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_list_input`") # noqa: E501
collection_formats = {}
@@ -411,8 +411,8 @@ class UserApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'username' is set
if ('username' not in local_var_params or
local_var_params['username'] is None):
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
raise ApiValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501
collection_formats = {}
@@ -513,8 +513,8 @@ class UserApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'username' is set
if ('username' not in local_var_params or
local_var_params['username'] is None):
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
raise ApiValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501
collection_formats = {}
@@ -621,12 +621,12 @@ class UserApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'username' is set
if ('username' not in local_var_params or
local_var_params['username'] is None):
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
raise ApiValueError("Missing the required parameter `username` when calling `login_user`") # noqa: E501
# verify the required parameter 'password' is set
if ('password' not in local_var_params or
local_var_params['password'] is None):
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
raise ApiValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501
collection_formats = {}
@@ -831,12 +831,12 @@ class UserApi(object):
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'username' is set
if ('username' not in local_var_params or
local_var_params['username'] is None):
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
raise ApiValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
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
raise ApiValueError("Missing the required parameter `body` when calling `update_user`") # noqa: E501
collection_formats = {}

View File

@@ -77,6 +77,7 @@ class ApiClient(object):
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/1.0.0/python'
self.client_side_validation = configuration.client_side_validation
def __del__(self):
if self._pool:

View File

@@ -138,6 +138,8 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
self.retries = None
"""Adding retries to override urllib3 default value 3
"""
# Disable client side validation
self.client_side_validation = True
@property
def logger_file(self):

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class AdditionalPropertiesAnyType(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class AdditionalPropertiesAnyType(object):
'name': 'name'
}
def __init__(self, name=None): # noqa: E501
def __init__(self, name=None, local_vars_configuration=None): # noqa: E501
"""AdditionalPropertiesAnyType - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._name = None
self.discriminator = None
@@ -105,8 +110,11 @@ class AdditionalPropertiesAnyType(object):
if not isinstance(other, AdditionalPropertiesAnyType):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, AdditionalPropertiesAnyType):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class AdditionalPropertiesArray(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class AdditionalPropertiesArray(object):
'name': 'name'
}
def __init__(self, name=None): # noqa: E501
def __init__(self, name=None, local_vars_configuration=None): # noqa: E501
"""AdditionalPropertiesArray - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._name = None
self.discriminator = None
@@ -105,8 +110,11 @@ class AdditionalPropertiesArray(object):
if not isinstance(other, AdditionalPropertiesArray):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, AdditionalPropertiesArray):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class AdditionalPropertiesBoolean(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class AdditionalPropertiesBoolean(object):
'name': 'name'
}
def __init__(self, name=None): # noqa: E501
def __init__(self, name=None, local_vars_configuration=None): # noqa: E501
"""AdditionalPropertiesBoolean - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._name = None
self.discriminator = None
@@ -105,8 +110,11 @@ class AdditionalPropertiesBoolean(object):
if not isinstance(other, AdditionalPropertiesBoolean):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, AdditionalPropertiesBoolean):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class AdditionalPropertiesClass(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -58,8 +60,11 @@ class AdditionalPropertiesClass(object):
'anytype_3': 'anytype_3'
}
def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None): # noqa: E501
def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501
"""AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._map_string = None
self._map_number = None
@@ -365,8 +370,11 @@ class AdditionalPropertiesClass(object):
if not isinstance(other, AdditionalPropertiesClass):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, AdditionalPropertiesClass):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class AdditionalPropertiesInteger(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class AdditionalPropertiesInteger(object):
'name': 'name'
}
def __init__(self, name=None): # noqa: E501
def __init__(self, name=None, local_vars_configuration=None): # noqa: E501
"""AdditionalPropertiesInteger - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._name = None
self.discriminator = None
@@ -105,8 +110,11 @@ class AdditionalPropertiesInteger(object):
if not isinstance(other, AdditionalPropertiesInteger):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, AdditionalPropertiesInteger):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class AdditionalPropertiesNumber(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class AdditionalPropertiesNumber(object):
'name': 'name'
}
def __init__(self, name=None): # noqa: E501
def __init__(self, name=None, local_vars_configuration=None): # noqa: E501
"""AdditionalPropertiesNumber - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._name = None
self.discriminator = None
@@ -105,8 +110,11 @@ class AdditionalPropertiesNumber(object):
if not isinstance(other, AdditionalPropertiesNumber):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, AdditionalPropertiesNumber):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class AdditionalPropertiesObject(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class AdditionalPropertiesObject(object):
'name': 'name'
}
def __init__(self, name=None): # noqa: E501
def __init__(self, name=None, local_vars_configuration=None): # noqa: E501
"""AdditionalPropertiesObject - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._name = None
self.discriminator = None
@@ -105,8 +110,11 @@ class AdditionalPropertiesObject(object):
if not isinstance(other, AdditionalPropertiesObject):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, AdditionalPropertiesObject):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class AdditionalPropertiesString(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class AdditionalPropertiesString(object):
'name': 'name'
}
def __init__(self, name=None): # noqa: E501
def __init__(self, name=None, local_vars_configuration=None): # noqa: E501
"""AdditionalPropertiesString - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._name = None
self.discriminator = None
@@ -105,8 +110,11 @@ class AdditionalPropertiesString(object):
if not isinstance(other, AdditionalPropertiesString):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, AdditionalPropertiesString):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class Animal(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -45,8 +47,11 @@ class Animal(object):
'Cat': 'Cat'
}
def __init__(self, class_name=None, color='red'): # noqa: E501
def __init__(self, class_name=None, color='red', local_vars_configuration=None): # noqa: E501
"""Animal - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._class_name = None
self._color = None
@@ -74,7 +79,7 @@ class Animal(object):
:param class_name: The class_name of this Animal. # noqa: E501
:type: str
"""
if class_name is None:
if self.local_vars_configuration.client_side_validation and class_name is None: # noqa: E501
raise ValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501
self._class_name = class_name
@@ -143,8 +148,11 @@ class Animal(object):
if not isinstance(other, Animal):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, Animal):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class ApiResponse(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -42,8 +44,11 @@ class ApiResponse(object):
'message': 'message'
}
def __init__(self, code=None, type=None, message=None): # noqa: E501
def __init__(self, code=None, type=None, message=None, local_vars_configuration=None): # noqa: E501
"""ApiResponse - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._code = None
self._type = None
@@ -157,8 +162,11 @@ class ApiResponse(object):
if not isinstance(other, ApiResponse):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, ApiResponse):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class ArrayOfArrayOfNumberOnly(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class ArrayOfArrayOfNumberOnly(object):
'array_array_number': 'ArrayArrayNumber'
}
def __init__(self, array_array_number=None): # noqa: E501
def __init__(self, array_array_number=None, local_vars_configuration=None): # noqa: E501
"""ArrayOfArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._array_array_number = None
self.discriminator = None
@@ -105,8 +110,11 @@ class ArrayOfArrayOfNumberOnly(object):
if not isinstance(other, ArrayOfArrayOfNumberOnly):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, ArrayOfArrayOfNumberOnly):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class ArrayOfNumberOnly(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class ArrayOfNumberOnly(object):
'array_number': 'ArrayNumber'
}
def __init__(self, array_number=None): # noqa: E501
def __init__(self, array_number=None, local_vars_configuration=None): # noqa: E501
"""ArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._array_number = None
self.discriminator = None
@@ -105,8 +110,11 @@ class ArrayOfNumberOnly(object):
if not isinstance(other, ArrayOfNumberOnly):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, ArrayOfNumberOnly):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class ArrayTest(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -42,8 +44,11 @@ class ArrayTest(object):
'array_array_of_model': 'array_array_of_model'
}
def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None): # noqa: E501
def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None, local_vars_configuration=None): # noqa: E501
"""ArrayTest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._array_of_string = None
self._array_array_of_integer = None
@@ -157,8 +162,11 @@ class ArrayTest(object):
if not isinstance(other, ArrayTest):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, ArrayTest):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class Capitalization(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -48,8 +50,11 @@ class Capitalization(object):
'att_name': 'ATT_NAME'
}
def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None): # noqa: E501
def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None, local_vars_configuration=None): # noqa: E501
"""Capitalization - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._small_camel = None
self._capital_camel = None
@@ -237,8 +242,11 @@ class Capitalization(object):
if not isinstance(other, Capitalization):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, Capitalization):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class Cat(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class Cat(object):
'declawed': 'declawed'
}
def __init__(self, declawed=None): # noqa: E501
def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501
"""Cat - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._declawed = None
self.discriminator = None
@@ -105,8 +110,11 @@ class Cat(object):
if not isinstance(other, Cat):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, Cat):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class CatAllOf(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class CatAllOf(object):
'declawed': 'declawed'
}
def __init__(self, declawed=None): # noqa: E501
def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501
"""CatAllOf - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._declawed = None
self.discriminator = None
@@ -105,8 +110,11 @@ class CatAllOf(object):
if not isinstance(other, CatAllOf):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, CatAllOf):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class Category(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -40,8 +42,11 @@ class Category(object):
'name': 'name'
}
def __init__(self, id=None, name='default-name'): # noqa: E501
def __init__(self, id=None, name='default-name', local_vars_configuration=None): # noqa: E501
"""Category - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._id = None
self._name = None
@@ -90,7 +95,7 @@ class Category(object):
:param name: The name of this Category. # noqa: E501
:type: str
"""
if name is None:
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
self._name = name
@@ -132,8 +137,11 @@ class Category(object):
if not isinstance(other, Category):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, Category):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class ClassModel(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class ClassModel(object):
'_class': '_class'
}
def __init__(self, _class=None): # noqa: E501
def __init__(self, _class=None, local_vars_configuration=None): # noqa: E501
"""ClassModel - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self.__class = None
self.discriminator = None
@@ -105,8 +110,11 @@ class ClassModel(object):
if not isinstance(other, ClassModel):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, ClassModel):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class Client(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class Client(object):
'client': 'client'
}
def __init__(self, client=None): # noqa: E501
def __init__(self, client=None, local_vars_configuration=None): # noqa: E501
"""Client - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._client = None
self.discriminator = None
@@ -105,8 +110,11 @@ class Client(object):
if not isinstance(other, Client):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, Client):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class Dog(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class Dog(object):
'breed': 'breed'
}
def __init__(self, breed=None): # noqa: E501
def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501
"""Dog - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._breed = None
self.discriminator = None
@@ -105,8 +110,11 @@ class Dog(object):
if not isinstance(other, Dog):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, Dog):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class DogAllOf(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class DogAllOf(object):
'breed': 'breed'
}
def __init__(self, breed=None): # noqa: E501
def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501
"""DogAllOf - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._breed = None
self.discriminator = None
@@ -105,8 +110,11 @@ class DogAllOf(object):
if not isinstance(other, DogAllOf):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, DogAllOf):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class EnumArrays(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -40,8 +42,11 @@ class EnumArrays(object):
'array_enum': 'array_enum'
}
def __init__(self, just_symbol=None, array_enum=None): # noqa: E501
def __init__(self, just_symbol=None, array_enum=None, local_vars_configuration=None): # noqa: E501
"""EnumArrays - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._just_symbol = None
self._array_enum = None
@@ -71,7 +76,7 @@ class EnumArrays(object):
:type: str
"""
allowed_values = [">=", "$"] # noqa: E501
if just_symbol not in allowed_values:
if self.local_vars_configuration.client_side_validation and just_symbol not in allowed_values: # noqa: E501
raise ValueError(
"Invalid value for `just_symbol` ({0}), must be one of {1}" # noqa: E501
.format(just_symbol, allowed_values)
@@ -98,7 +103,8 @@ class EnumArrays(object):
:type: list[str]
"""
allowed_values = ["fish", "crab"] # noqa: E501
if not set(array_enum).issubset(set(allowed_values)):
if (self.local_vars_configuration.client_side_validation and
not set(array_enum).issubset(set(allowed_values))):
raise ValueError(
"Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501
@@ -144,8 +150,11 @@ class EnumArrays(object):
if not isinstance(other, EnumArrays):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, EnumArrays):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class EnumClass(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -43,8 +45,11 @@ class EnumClass(object):
attribute_map = {
}
def __init__(self): # noqa: E501
def __init__(self, local_vars_configuration=None): # noqa: E501
"""EnumClass - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self.discriminator = None
def to_dict(self):
@@ -84,8 +89,11 @@ class EnumClass(object):
if not isinstance(other, EnumClass):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, EnumClass):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class EnumTest(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -46,8 +48,11 @@ class EnumTest(object):
'outer_enum': 'outerEnum'
}
def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501
def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None, local_vars_configuration=None): # noqa: E501
"""EnumTest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._enum_string = None
self._enum_string_required = None
@@ -85,7 +90,7 @@ class EnumTest(object):
:type: str
"""
allowed_values = ["UPPER", "lower", ""] # noqa: E501
if enum_string not in allowed_values:
if self.local_vars_configuration.client_side_validation and enum_string not in allowed_values: # noqa: E501
raise ValueError(
"Invalid value for `enum_string` ({0}), must be one of {1}" # noqa: E501
.format(enum_string, allowed_values)
@@ -111,10 +116,10 @@ class EnumTest(object):
:param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501
:type: str
"""
if enum_string_required is None:
if self.local_vars_configuration.client_side_validation and enum_string_required is None: # noqa: E501
raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501
allowed_values = ["UPPER", "lower", ""] # noqa: E501
if enum_string_required not in allowed_values:
if self.local_vars_configuration.client_side_validation and enum_string_required not in allowed_values: # noqa: E501
raise ValueError(
"Invalid value for `enum_string_required` ({0}), must be one of {1}" # noqa: E501
.format(enum_string_required, allowed_values)
@@ -141,7 +146,7 @@ class EnumTest(object):
:type: int
"""
allowed_values = [1, -1] # noqa: E501
if enum_integer not in allowed_values:
if self.local_vars_configuration.client_side_validation and enum_integer not in allowed_values: # noqa: E501
raise ValueError(
"Invalid value for `enum_integer` ({0}), must be one of {1}" # noqa: E501
.format(enum_integer, allowed_values)
@@ -168,7 +173,7 @@ class EnumTest(object):
:type: float
"""
allowed_values = [1.1, -1.2] # noqa: E501
if enum_number not in allowed_values:
if self.local_vars_configuration.client_side_validation and enum_number not in allowed_values: # noqa: E501
raise ValueError(
"Invalid value for `enum_number` ({0}), must be one of {1}" # noqa: E501
.format(enum_number, allowed_values)
@@ -234,8 +239,11 @@ class EnumTest(object):
if not isinstance(other, EnumTest):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, EnumTest):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class File(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class File(object):
'source_uri': 'sourceURI'
}
def __init__(self, source_uri=None): # noqa: E501
def __init__(self, source_uri=None, local_vars_configuration=None): # noqa: E501
"""File - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._source_uri = None
self.discriminator = None
@@ -107,8 +112,11 @@ class File(object):
if not isinstance(other, File):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, File):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class FileSchemaTestClass(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -40,8 +42,11 @@ class FileSchemaTestClass(object):
'files': 'files'
}
def __init__(self, file=None, files=None): # noqa: E501
def __init__(self, file=None, files=None, local_vars_configuration=None): # noqa: E501
"""FileSchemaTestClass - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._file = None
self._files = None
@@ -131,8 +136,11 @@ class FileSchemaTestClass(object):
if not isinstance(other, FileSchemaTestClass):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, FileSchemaTestClass):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class FormatTest(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -64,8 +66,11 @@ class FormatTest(object):
'big_decimal': 'BigDecimal'
}
def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, big_decimal=None): # noqa: E501
def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, big_decimal=None, local_vars_configuration=None): # noqa: E501
"""FormatTest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._integer = None
self._int32 = None
@@ -126,9 +131,11 @@ class FormatTest(object):
:param integer: The integer of this FormatTest. # noqa: E501
:type: int
"""
if integer is not None and integer > 100: # noqa: E501
if (self.local_vars_configuration.client_side_validation and
integer is not None and integer > 100): # noqa: E501
raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100`") # noqa: E501
if integer is not None and integer < 10: # noqa: E501
if (self.local_vars_configuration.client_side_validation and
integer is not None and integer < 10): # noqa: E501
raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10`") # noqa: E501
self._integer = integer
@@ -151,9 +158,11 @@ class FormatTest(object):
:param int32: The int32 of this FormatTest. # noqa: E501
:type: int
"""
if int32 is not None and int32 > 200: # noqa: E501
if (self.local_vars_configuration.client_side_validation and
int32 is not None and int32 > 200): # noqa: E501
raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200`") # noqa: E501
if int32 is not None and int32 < 20: # noqa: E501
if (self.local_vars_configuration.client_side_validation and
int32 is not None and int32 < 20): # noqa: E501
raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20`") # noqa: E501
self._int32 = int32
@@ -197,11 +206,13 @@ class FormatTest(object):
:param number: The number of this FormatTest. # noqa: E501
:type: float
"""
if number is None:
if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501
raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501
if number is not None and number > 543.2: # noqa: E501
if (self.local_vars_configuration.client_side_validation and
number is not None and number > 543.2): # noqa: E501
raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") # noqa: E501
if number is not None and number < 32.1: # noqa: E501
if (self.local_vars_configuration.client_side_validation and
number is not None and number < 32.1): # noqa: E501
raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") # noqa: E501
self._number = number
@@ -224,9 +235,11 @@ class FormatTest(object):
:param float: The float of this FormatTest. # noqa: E501
:type: float
"""
if float is not None and float > 987.6: # noqa: E501
if (self.local_vars_configuration.client_side_validation and
float is not None and float > 987.6): # noqa: E501
raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501
if float is not None and float < 54.3: # noqa: E501
if (self.local_vars_configuration.client_side_validation and
float is not None and float < 54.3): # noqa: E501
raise ValueError("Invalid value for `float`, must be a value greater than or equal to `54.3`") # noqa: E501
self._float = float
@@ -249,9 +262,11 @@ class FormatTest(object):
:param double: The double of this FormatTest. # noqa: E501
:type: float
"""
if double is not None and double > 123.4: # noqa: E501
if (self.local_vars_configuration.client_side_validation and
double is not None and double > 123.4): # noqa: E501
raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") # noqa: E501
if double is not None and double < 67.8: # noqa: E501
if (self.local_vars_configuration.client_side_validation and
double is not None and double < 67.8): # noqa: E501
raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") # noqa: E501
self._double = double
@@ -274,7 +289,8 @@ class FormatTest(object):
:param string: The string of this FormatTest. # noqa: E501
:type: str
"""
if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501
if (self.local_vars_configuration.client_side_validation and
string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE)): # noqa: E501
raise ValueError(r"Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501
self._string = string
@@ -297,9 +313,10 @@ class FormatTest(object):
:param byte: The byte of this FormatTest. # noqa: E501
:type: str
"""
if byte is None:
if self.local_vars_configuration.client_side_validation and byte is None: # noqa: E501
raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501
if byte is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte): # noqa: E501
if (self.local_vars_configuration.client_side_validation and
byte is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte)): # noqa: E501
raise ValueError(r"Invalid value for `byte`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501
self._byte = byte
@@ -343,7 +360,7 @@ class FormatTest(object):
:param date: The date of this FormatTest. # noqa: E501
:type: date
"""
if date is None:
if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501
raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501
self._date = date
@@ -408,11 +425,13 @@ class FormatTest(object):
:param password: The password of this FormatTest. # noqa: E501
:type: str
"""
if password is None:
if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501
raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501
if password is not None and len(password) > 64:
if (self.local_vars_configuration.client_side_validation and
password is not None and len(password) > 64):
raise ValueError("Invalid value for `password`, length must be less than or equal to `64`") # noqa: E501
if password is not None and len(password) < 10:
if (self.local_vars_configuration.client_side_validation and
password is not None and len(password) < 10):
raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") # noqa: E501
self._password = password
@@ -475,8 +494,11 @@ class FormatTest(object):
if not isinstance(other, FormatTest):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, FormatTest):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class HasOnlyReadOnly(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -40,8 +42,11 @@ class HasOnlyReadOnly(object):
'foo': 'foo'
}
def __init__(self, bar=None, foo=None): # noqa: E501
def __init__(self, bar=None, foo=None, local_vars_configuration=None): # noqa: E501
"""HasOnlyReadOnly - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._bar = None
self._foo = None
@@ -131,8 +136,11 @@ class HasOnlyReadOnly(object):
if not isinstance(other, HasOnlyReadOnly):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, HasOnlyReadOnly):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class List(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class List(object):
'_123_list': '123-list'
}
def __init__(self, _123_list=None): # noqa: E501
def __init__(self, _123_list=None, local_vars_configuration=None): # noqa: E501
"""List - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self.__123_list = None
self.discriminator = None
@@ -105,8 +110,11 @@ class List(object):
if not isinstance(other, List):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, List):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class MapTest(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -44,8 +46,11 @@ class MapTest(object):
'indirect_map': 'indirect_map'
}
def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None): # noqa: E501
def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None, local_vars_configuration=None): # noqa: E501
"""MapTest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._map_map_of_string = None
self._map_of_enum_string = None
@@ -102,7 +107,8 @@ class MapTest(object):
:type: dict(str, str)
"""
allowed_values = ["UPPER", "lower"] # noqa: E501
if not set(map_of_enum_string.keys()).issubset(set(allowed_values)):
if (self.local_vars_configuration.client_side_validation and
not set(map_of_enum_string.keys()).issubset(set(allowed_values))):
raise ValueError(
"Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501
@@ -190,8 +196,11 @@ class MapTest(object):
if not isinstance(other, MapTest):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, MapTest):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class MixedPropertiesAndAdditionalPropertiesClass(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -42,8 +44,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
'map': 'map'
}
def __init__(self, uuid=None, date_time=None, map=None): # noqa: E501
def __init__(self, uuid=None, date_time=None, map=None, local_vars_configuration=None): # noqa: E501
"""MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._uuid = None
self._date_time = None
@@ -157,8 +162,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class Model200Response(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -40,8 +42,11 @@ class Model200Response(object):
'_class': 'class'
}
def __init__(self, name=None, _class=None): # noqa: E501
def __init__(self, name=None, _class=None, local_vars_configuration=None): # noqa: E501
"""Model200Response - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._name = None
self.__class = None
@@ -131,8 +136,11 @@ class Model200Response(object):
if not isinstance(other, Model200Response):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, Model200Response):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class ModelReturn(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class ModelReturn(object):
'_return': 'return'
}
def __init__(self, _return=None): # noqa: E501
def __init__(self, _return=None, local_vars_configuration=None): # noqa: E501
"""ModelReturn - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self.__return = None
self.discriminator = None
@@ -105,8 +110,11 @@ class ModelReturn(object):
if not isinstance(other, ModelReturn):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, ModelReturn):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class Name(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -44,8 +46,11 @@ class Name(object):
'_123_number': '123Number'
}
def __init__(self, name=None, snake_case=None, _property=None, _123_number=None): # noqa: E501
def __init__(self, name=None, snake_case=None, _property=None, _123_number=None, local_vars_configuration=None): # noqa: E501
"""Name - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._name = None
self._snake_case = None
@@ -79,7 +84,7 @@ class Name(object):
:param name: The name of this Name. # noqa: E501
:type: int
"""
if name is None:
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
self._name = name
@@ -184,8 +189,11 @@ class Name(object):
if not isinstance(other, Name):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, Name):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class NumberOnly(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class NumberOnly(object):
'just_number': 'JustNumber'
}
def __init__(self, just_number=None): # noqa: E501
def __init__(self, just_number=None, local_vars_configuration=None): # noqa: E501
"""NumberOnly - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._just_number = None
self.discriminator = None
@@ -105,8 +110,11 @@ class NumberOnly(object):
if not isinstance(other, NumberOnly):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, NumberOnly):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class Order(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -48,8 +50,11 @@ class Order(object):
'complete': 'complete'
}
def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False): # noqa: E501
def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False, local_vars_configuration=None): # noqa: E501
"""Order - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._id = None
self._pet_id = None
@@ -177,7 +182,7 @@ class Order(object):
:type: str
"""
allowed_values = ["placed", "approved", "delivered"] # noqa: E501
if status not in allowed_values:
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
raise ValueError(
"Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
.format(status, allowed_values)
@@ -243,8 +248,11 @@ class Order(object):
if not isinstance(other, Order):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, Order):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class OuterComposite(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -42,8 +44,11 @@ class OuterComposite(object):
'my_boolean': 'my_boolean'
}
def __init__(self, my_number=None, my_string=None, my_boolean=None): # noqa: E501
def __init__(self, my_number=None, my_string=None, my_boolean=None, local_vars_configuration=None): # noqa: E501
"""OuterComposite - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._my_number = None
self._my_string = None
@@ -157,8 +162,11 @@ class OuterComposite(object):
if not isinstance(other, OuterComposite):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, OuterComposite):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class OuterEnum(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -43,8 +45,11 @@ class OuterEnum(object):
attribute_map = {
}
def __init__(self): # noqa: E501
def __init__(self, local_vars_configuration=None): # noqa: E501
"""OuterEnum - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self.discriminator = None
def to_dict(self):
@@ -84,8 +89,11 @@ class OuterEnum(object):
if not isinstance(other, OuterEnum):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, OuterEnum):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class Pet(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -48,8 +50,11 @@ class Pet(object):
'status': 'status'
}
def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): # noqa: E501
def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None, local_vars_configuration=None): # noqa: E501
"""Pet - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._id = None
self._category = None
@@ -130,7 +135,7 @@ class Pet(object):
:param name: The name of this Pet. # noqa: E501
:type: str
"""
if name is None:
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
self._name = name
@@ -153,7 +158,7 @@ class Pet(object):
:param photo_urls: The photo_urls of this Pet. # noqa: E501
:type: list[str]
"""
if photo_urls is None:
if self.local_vars_configuration.client_side_validation and photo_urls is None: # noqa: E501
raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501
self._photo_urls = photo_urls
@@ -200,7 +205,7 @@ class Pet(object):
:type: str
"""
allowed_values = ["available", "pending", "sold"] # noqa: E501
if status not in allowed_values:
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
raise ValueError(
"Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
.format(status, allowed_values)
@@ -245,8 +250,11 @@ class Pet(object):
if not isinstance(other, Pet):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, Pet):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class ReadOnlyFirst(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -40,8 +42,11 @@ class ReadOnlyFirst(object):
'baz': 'baz'
}
def __init__(self, bar=None, baz=None): # noqa: E501
def __init__(self, bar=None, baz=None, local_vars_configuration=None): # noqa: E501
"""ReadOnlyFirst - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._bar = None
self._baz = None
@@ -131,8 +136,11 @@ class ReadOnlyFirst(object):
if not isinstance(other, ReadOnlyFirst):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, ReadOnlyFirst):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class SpecialModelName(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -38,8 +40,11 @@ class SpecialModelName(object):
'special_property_name': '$special[property.name]'
}
def __init__(self, special_property_name=None): # noqa: E501
def __init__(self, special_property_name=None, local_vars_configuration=None): # noqa: E501
"""SpecialModelName - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._special_property_name = None
self.discriminator = None
@@ -105,8 +110,11 @@ class SpecialModelName(object):
if not isinstance(other, SpecialModelName):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, SpecialModelName):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class Tag(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -40,8 +42,11 @@ class Tag(object):
'name': 'name'
}
def __init__(self, id=None, name=None): # noqa: E501
def __init__(self, id=None, name=None, local_vars_configuration=None): # noqa: E501
"""Tag - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._id = None
self._name = None
@@ -131,8 +136,11 @@ class Tag(object):
if not isinstance(other, Tag):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, Tag):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class TypeHolderDefault(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -46,8 +48,11 @@ class TypeHolderDefault(object):
'array_item': 'array_item'
}
def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None): # noqa: E501
def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None, local_vars_configuration=None): # noqa: E501
"""TypeHolderDefault - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._string_item = None
self._number_item = None
@@ -80,7 +85,7 @@ class TypeHolderDefault(object):
:param string_item: The string_item of this TypeHolderDefault. # noqa: E501
:type: str
"""
if string_item is None:
if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501
raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
self._string_item = string_item
@@ -103,7 +108,7 @@ class TypeHolderDefault(object):
:param number_item: The number_item of this TypeHolderDefault. # noqa: E501
:type: float
"""
if number_item is None:
if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501
raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
self._number_item = number_item
@@ -126,7 +131,7 @@ class TypeHolderDefault(object):
:param integer_item: The integer_item of this TypeHolderDefault. # noqa: E501
:type: int
"""
if integer_item is None:
if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501
raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
self._integer_item = integer_item
@@ -149,7 +154,7 @@ class TypeHolderDefault(object):
:param bool_item: The bool_item of this TypeHolderDefault. # noqa: E501
:type: bool
"""
if bool_item is None:
if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501
raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
self._bool_item = bool_item
@@ -172,7 +177,7 @@ class TypeHolderDefault(object):
:param array_item: The array_item of this TypeHolderDefault. # noqa: E501
:type: list[int]
"""
if array_item is None:
if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501
raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
self._array_item = array_item
@@ -214,8 +219,11 @@ class TypeHolderDefault(object):
if not isinstance(other, TypeHolderDefault):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, TypeHolderDefault):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class TypeHolderExample(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -48,8 +50,11 @@ class TypeHolderExample(object):
'array_item': 'array_item'
}
def __init__(self, string_item=None, number_item=None, float_item=None, integer_item=None, bool_item=None, array_item=None): # noqa: E501
def __init__(self, string_item=None, number_item=None, float_item=None, integer_item=None, bool_item=None, array_item=None, local_vars_configuration=None): # noqa: E501
"""TypeHolderExample - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._string_item = None
self._number_item = None
@@ -84,7 +89,7 @@ class TypeHolderExample(object):
:param string_item: The string_item of this TypeHolderExample. # noqa: E501
:type: str
"""
if string_item is None:
if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501
raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
self._string_item = string_item
@@ -107,7 +112,7 @@ class TypeHolderExample(object):
:param number_item: The number_item of this TypeHolderExample. # noqa: E501
:type: float
"""
if number_item is None:
if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501
raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
self._number_item = number_item
@@ -130,7 +135,7 @@ class TypeHolderExample(object):
:param float_item: The float_item of this TypeHolderExample. # noqa: E501
:type: float
"""
if float_item is None:
if self.local_vars_configuration.client_side_validation and float_item is None: # noqa: E501
raise ValueError("Invalid value for `float_item`, must not be `None`") # noqa: E501
self._float_item = float_item
@@ -153,7 +158,7 @@ class TypeHolderExample(object):
:param integer_item: The integer_item of this TypeHolderExample. # noqa: E501
:type: int
"""
if integer_item is None:
if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501
raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
self._integer_item = integer_item
@@ -176,7 +181,7 @@ class TypeHolderExample(object):
:param bool_item: The bool_item of this TypeHolderExample. # noqa: E501
:type: bool
"""
if bool_item is None:
if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501
raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
self._bool_item = bool_item
@@ -199,7 +204,7 @@ class TypeHolderExample(object):
:param array_item: The array_item of this TypeHolderExample. # noqa: E501
:type: list[int]
"""
if array_item is None:
if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501
raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
self._array_item = array_item
@@ -241,8 +246,11 @@ class TypeHolderExample(object):
if not isinstance(other, TypeHolderExample):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, TypeHolderExample):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class User(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -52,8 +54,11 @@ class User(object):
'user_status': 'userStatus'
}
def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None): # noqa: E501
def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None, local_vars_configuration=None): # noqa: E501
"""User - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._id = None
self._username = None
@@ -289,8 +294,11 @@ class User(object):
if not isinstance(other, User):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, User):
return True
return self.to_dict() != other.to_dict()

View File

@@ -15,6 +15,8 @@ import re # noqa: F401
import six
from petstore_api.configuration import Configuration
class XmlItem(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -94,8 +96,11 @@ class XmlItem(object):
'prefix_ns_wrapped_array': 'prefix_ns_wrapped_array'
}
def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None): # noqa: E501
def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None, local_vars_configuration=None): # noqa: E501
"""XmlItem - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._attribute_string = None
self._attribute_number = None
@@ -833,8 +838,11 @@ class XmlItem(object):
if not isinstance(other, XmlItem):
return False
return self.__dict__ == other.__dict__
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
if not isinstance(other, XmlItem):
return True
return self.to_dict() != other.to_dict()