diff --git a/modules/swagger-codegen/src/main/resources/python/api.mustache b/modules/swagger-codegen/src/main/resources/python/api.mustache index 43962c7f525..050278b2b5d 100644 --- a/modules/swagger-codegen/src/main/resources/python/api.mustache +++ b/modules/swagger-codegen/src/main/resources/python/api.mustache @@ -73,7 +73,6 @@ class {{classname}}(object): ) params[key] = val del params['kwargs'] - {{#allParams}} {{#required}} # verify the required parameter '{{paramName}}' is set @@ -85,28 +84,27 @@ class {{classname}}(object): {{#allParams}} {{#hasValidation}} {{#maxLength}} - if '{{paramName}}' in params and len(params['{{paramName}}']) > {{maxLength}}: + if '{{paramName}}' in params and len(params['{{paramName}}']) > {{maxLength}}: raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, length must be less than or equal to `{{maxLength}}`") {{/maxLength}} {{#minLength}} - if '{{paramName}}' in params and len(params['{{paramName}}']) < {{minLength}}: + if '{{paramName}}' in params and len(params['{{paramName}}']) < {{minLength}}: raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, length must be greater than or equal to `{{minLength}}`") {{/minLength}} {{#maximum}} - if '{{paramName}}' in params and params['{{paramName}}'] > {{maximum}}: + if '{{paramName}}' in params and params['{{paramName}}'] > {{maximum}}: raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must be a value less than or equal to `{{maximum}}`") {{/maximum}} {{#minimum}} - if '{{paramName}}' in params and params['{{paramName}}'] < {{minimum}}: + if '{{paramName}}' in params and params['{{paramName}}'] < {{minimum}}: raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must be a value greater than or equal to `{{minimum}}`") {{/minimum}} {{#pattern}} - if '{{paramName}}' in params and not re.search('{{vendorExtensions.x-regex}}', params['{{paramName}}']{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): + if '{{paramName}}' in params and not re.search('{{vendorExtensions.x-regex}}', params['{{paramName}}']{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must conform to the pattern `{{pattern}}`") {{/pattern}} {{/hasValidation}} {{/allParams}} - resource_path = '{{path}}'.replace('{format}', 'json') path_params = {} {{#pathParams}} diff --git a/modules/swagger-codegen/src/main/resources/python/api_client.mustache b/modules/swagger-codegen/src/main/resources/python/api_client.mustache index 07b9419e08f..2a4732f5afd 100644 --- a/modules/swagger-codegen/src/main/resources/python/api_client.mustache +++ b/modules/swagger-codegen/src/main/resources/python/api_client.mustache @@ -191,7 +191,7 @@ class ApiClient(object): :return: The serialized form of data. """ types = (str, int, float, bool, tuple) - if sys.version_info < (3,0): + if sys.version_info < (3, 0): types = types + (unicode,) if isinstance(obj, type(None)): return None diff --git a/modules/swagger-codegen/src/main/resources/python/api_test.mustache b/modules/swagger-codegen/src/main/resources/python/api_test.mustache index 4906d0e0371..a301d64722a 100644 --- a/modules/swagger-codegen/src/main/resources/python/api_test.mustache +++ b/modules/swagger-codegen/src/main/resources/python/api_test.mustache @@ -35,4 +35,4 @@ class {{#operations}}Test{{classname}}(unittest.TestCase): {{/operations}} if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/modules/swagger-codegen/src/main/resources/python/configuration.mustache b/modules/swagger-codegen/src/main/resources/python/configuration.mustache index 9ea2ab4a7b5..2a26c651d7d 100644 --- a/modules/swagger-codegen/src/main/resources/python/configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/python/configuration.mustache @@ -17,6 +17,7 @@ import logging from six import iteritems + def singleton(cls, *args, **kw): instances = {} @@ -59,7 +60,6 @@ class Configuration(object): # access token for OAuth self.access_token = "" {{/isOAuth}}{{/authMethods}} - # Logging Settings self.logger = {} self.logger["package_logger"] = logging.getLogger("{{packageName}}") diff --git a/modules/swagger-codegen/src/main/resources/python/model.mustache b/modules/swagger-codegen/src/main/resources/python/model.mustache index 781bb37e4e5..a592278bf12 100644 --- a/modules/swagger-codegen/src/main/resources/python/model.mustache +++ b/modules/swagger-codegen/src/main/resources/python/model.mustache @@ -36,8 +36,8 @@ class {{classname}}(object): {{#vars}} self._{{name}} = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}} {{/vars}} - -{{#vars}} +{{#vars}}{{#-first}} +{{/-first}} @property def {{name}}(self): """ @@ -58,7 +58,8 @@ class {{classname}}(object): :param {{name}}: The {{name}} of this {{classname}}. :type: {{datatype}} """ - {{#isEnum}}allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] +{{#isEnum}} + allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] if {{name}} not in allowed_values: raise ValueError( "Invalid value for `{{name}}`, must be one of {0}" @@ -71,23 +72,23 @@ class {{classname}}(object): if not {{name}}: raise ValueError("Invalid value for `{{name}}`, must not be `None`") {{#maxLength}} - if len({{name}}) > {{maxLength}}: + if len({{name}}) > {{maxLength}}: raise ValueError("Invalid value for `{{name}}`, length must be less than `{{maxLength}}`") {{/maxLength}} {{#minLength}} - if len({{name}}) < {{minLength}}: + if len({{name}}) < {{minLength}}: raise ValueError("Invalid value for `{{name}}`, length must be greater than or equal to `{{minLength}}`") {{/minLength}} {{#maximum}} - if {{name}} > {{maximum}}: + if {{name}} > {{maximum}}: raise ValueError("Invalid value for `{{name}}`, must be a value less than or equal to `{{maximum}}`") {{/maximum}} {{#minimum}} - if {{name}} < {{minimum}}: + if {{name}} < {{minimum}}: raise ValueError("Invalid value for `{{name}}`, must be a value greater than or equal to `{{minimum}}`") {{/minimum}} {{#pattern}} - if not re.search('{{vendorExtensions.x-regex}}', {{name}}{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): + if not re.search('{{vendorExtensions.x-regex}}', {{name}}{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): raise ValueError("Invalid value for `{{name}}`, must be a follow pattern or equal to `{{pattern}}`") {{/pattern}} {{/hasValidation}} @@ -145,6 +146,5 @@ class {{classname}}(object): Returns true if both objects are not equal """ return not self == other - {{/model}} -{{/models}} +{{/models}} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/python/model_test.mustache b/modules/swagger-codegen/src/main/resources/python/model_test.mustache index ffd38a52b49..3533fa11063 100644 --- a/modules/swagger-codegen/src/main/resources/python/model_test.mustache +++ b/modules/swagger-codegen/src/main/resources/python/model_test.mustache @@ -34,4 +34,4 @@ class Test{{classname}}(unittest.TestCase): {{/models}} if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/modules/swagger-codegen/src/main/resources/python/partial_header.mustache b/modules/swagger-codegen/src/main/resources/python/partial_header.mustache index ea97064963c..004460091dd 100644 --- a/modules/swagger-codegen/src/main/resources/python/partial_header.mustache +++ b/modules/swagger-codegen/src/main/resources/python/partial_header.mustache @@ -10,13 +10,13 @@ {{#version}}OpenAPI spec version: {{{version}}}{{/version}} {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/modules/swagger-codegen/src/main/resources/python/setup.mustache b/modules/swagger-codegen/src/main/resources/python/setup.mustache index c825911f91a..f46265995fa 100644 --- a/modules/swagger-codegen/src/main/resources/python/setup.mustache +++ b/modules/swagger-codegen/src/main/resources/python/setup.mustache @@ -7,9 +7,7 @@ from setuptools import setup, find_packages NAME = "{{packageName}}" VERSION = "{{packageVersion}}" - {{#apiInfo}}{{#apis}}{{^hasMore}} - # To install the library, run the following # # python setup.py install @@ -33,5 +31,4 @@ setup( {{appDescription}} """ ) - -{{/hasMore}}{{/apis}}{{/apiInfo}} +{{/hasMore}}{{/apis}}{{/apiInfo}} \ No newline at end of file diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index 274de71c435..453d140f1f7 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -5,7 +5,7 @@ This Python package is automatically generated by the [Swagger Codegen](https:// - API version: 1.0.0 - Package version: 1.0.0 -- Build date: 2016-06-02T12:44:41.178+09:00 +- Build date: 2016-06-05T23:15:10.095+09:00 - Build package: class io.swagger.codegen.languages.PythonClientCodegen ## Requirements. diff --git a/samples/client/petstore/python/setup.py b/samples/client/petstore/python/setup.py index a4d22d206ac..2029c83372c 100644 --- a/samples/client/petstore/python/setup.py +++ b/samples/client/petstore/python/setup.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,8 +28,6 @@ from setuptools import setup, find_packages NAME = "swagger_client" VERSION = "1.0.0" - - # To install the library, run the following # # python setup.py install @@ -53,5 +51,3 @@ setup( This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ """ ) - - diff --git a/samples/client/petstore/python/swagger_client/__init__.py b/samples/client/petstore/python/swagger_client/__init__.py index 13fbf2257b0..ae225644f73 100644 --- a/samples/client/petstore/python/swagger_client/__init__.py +++ b/samples/client/petstore/python/swagger_client/__init__.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/samples/client/petstore/python/swagger_client/api_client.py b/samples/client/petstore/python/swagger_client/api_client.py index 5d5a5fccc4c..5bc448a950c 100644 --- a/samples/client/petstore/python/swagger_client/api_client.py +++ b/samples/client/petstore/python/swagger_client/api_client.py @@ -191,7 +191,7 @@ class ApiClient(object): :return: The serialized form of data. """ types = (str, int, float, bool, tuple) - if sys.version_info < (3,0): + if sys.version_info < (3, 0): types = types + (unicode,) if isinstance(obj, type(None)): return None diff --git a/samples/client/petstore/python/swagger_client/apis/fake_api.py b/samples/client/petstore/python/swagger_client/apis/fake_api.py index f8c522d2bf8..317232217b8 100644 --- a/samples/client/petstore/python/swagger_client/apis/fake_api.py +++ b/samples/client/petstore/python/swagger_client/apis/fake_api.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -95,7 +95,6 @@ class FakeApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'number' is set if ('number' not in params) or (params['number'] is None): raise ValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") @@ -109,31 +108,30 @@ class FakeApi(object): if ('byte' not in params) or (params['byte'] is None): raise ValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") - if 'number' in params and params['number'] > 543.2: + if 'number' in params and params['number'] > 543.2: raise ValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`") - if 'number' in params and params['number'] < 32.1: + if 'number' in params and params['number'] < 32.1: raise ValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`") - if 'double' in params and params['double'] > 123.4: + if 'double' in params and params['double'] > 123.4: raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") - if 'double' in params and params['double'] < 67.8: + if 'double' in params and params['double'] < 67.8: raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") - if 'string' in params and not re.search('[a-z]', params['string'], flags=re.IGNORECASE): + if 'string' in params and not re.search('[a-z]', params['string'], flags=re.IGNORECASE): raise ValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") - if 'integer' in params and params['integer'] > 100.0: + if 'integer' in params and params['integer'] > 100.0: raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100.0`") - if 'integer' in params and params['integer'] < 10.0: + if 'integer' in params and params['integer'] < 10.0: raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10.0`") - if 'int32' in params and params['int32'] > 200.0: + if 'int32' in params and params['int32'] > 200.0: raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200.0`") - if 'int32' in params and params['int32'] < 20.0: + if 'int32' in params and params['int32'] < 20.0: raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20.0`") - if 'float' in params and params['float'] > 987.6: + if 'float' in params and params['float'] > 987.6: raise ValueError("Invalid value for parameter `float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") - if 'password' in params and len(params['password']) > 64: + if 'password' in params and len(params['password']) > 64: raise ValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`") - if 'password' in params and len(params['password']) < 10: + if 'password' in params and len(params['password']) < 10: raise ValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`") - resource_path = '/fake'.replace('{format}', 'json') path_params = {} diff --git a/samples/client/petstore/python/swagger_client/apis/pet_api.py b/samples/client/petstore/python/swagger_client/apis/pet_api.py index dd730f31dfe..2f2ee4429c2 100644 --- a/samples/client/petstore/python/swagger_client/apis/pet_api.py +++ b/samples/client/petstore/python/swagger_client/apis/pet_api.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -84,12 +84,10 @@ class PetApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `add_pet`") - resource_path = '/pet'.replace('{format}', 'json') path_params = {} @@ -163,12 +161,10 @@ class PetApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'pet_id' is set if ('pet_id' not in params) or (params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `delete_pet`") - resource_path = '/pet/{petId}'.replace('{format}', 'json') path_params = {} if 'pet_id' in params: @@ -243,12 +239,10 @@ class PetApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'status' is set if ('status' not in params) or (params['status'] is None): raise ValueError("Missing the required parameter `status` when calling `find_pets_by_status`") - resource_path = '/pet/findByStatus'.replace('{format}', 'json') path_params = {} @@ -321,12 +315,10 @@ class PetApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'tags' is set if ('tags' not in params) or (params['tags'] is None): raise ValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") - resource_path = '/pet/findByTags'.replace('{format}', 'json') path_params = {} @@ -399,12 +391,10 @@ class PetApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'pet_id' is set if ('pet_id' not in params) or (params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") - resource_path = '/pet/{petId}'.replace('{format}', 'json') path_params = {} if 'pet_id' in params: @@ -477,12 +467,10 @@ class PetApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `update_pet`") - resource_path = '/pet'.replace('{format}', 'json') path_params = {} @@ -557,12 +545,10 @@ class PetApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'pet_id' is set if ('pet_id' not in params) or (params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") - resource_path = '/pet/{petId}'.replace('{format}', 'json') path_params = {} if 'pet_id' in params: @@ -641,12 +627,10 @@ class PetApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'pet_id' is set if ('pet_id' not in params) or (params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `upload_file`") - resource_path = '/pet/{petId}/uploadImage'.replace('{format}', 'json') path_params = {} if 'pet_id' in params: diff --git a/samples/client/petstore/python/swagger_client/apis/store_api.py b/samples/client/petstore/python/swagger_client/apis/store_api.py index 61a2d50a5ff..e945b61509c 100644 --- a/samples/client/petstore/python/swagger_client/apis/store_api.py +++ b/samples/client/petstore/python/swagger_client/apis/store_api.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -84,14 +84,12 @@ class StoreApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'order_id' is set if ('order_id' not in params) or (params['order_id'] is None): raise ValueError("Missing the required parameter `order_id` when calling `delete_order`") - if 'order_id' in params and params['order_id'] < 1.0: + if 'order_id' in params and params['order_id'] < 1.0: raise ValueError("Invalid value for parameter `order_id` when calling `delete_order`, must be a value greater than or equal to `1.0`") - resource_path = '/store/order/{orderId}'.replace('{format}', 'json') path_params = {} if 'order_id' in params: @@ -164,8 +162,6 @@ class StoreApi(object): params[key] = val del params['kwargs'] - - resource_path = '/store/inventory'.replace('{format}', 'json') path_params = {} @@ -236,16 +232,14 @@ class StoreApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'order_id' is set if ('order_id' not in params) or (params['order_id'] is None): raise ValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") - if 'order_id' in params and params['order_id'] > 5.0: + if 'order_id' in params and params['order_id'] > 5.0: raise ValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5.0`") - if 'order_id' in params and params['order_id'] < 1.0: + if 'order_id' in params and params['order_id'] < 1.0: raise ValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1.0`") - resource_path = '/store/order/{orderId}'.replace('{format}', 'json') path_params = {} if 'order_id' in params: @@ -318,12 +312,10 @@ class StoreApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `place_order`") - resource_path = '/store/order'.replace('{format}', 'json') path_params = {} diff --git a/samples/client/petstore/python/swagger_client/apis/user_api.py b/samples/client/petstore/python/swagger_client/apis/user_api.py index 17865142a70..5a8f1815495 100644 --- a/samples/client/petstore/python/swagger_client/apis/user_api.py +++ b/samples/client/petstore/python/swagger_client/apis/user_api.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -84,12 +84,10 @@ class UserApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_user`") - resource_path = '/user'.replace('{format}', 'json') path_params = {} @@ -162,12 +160,10 @@ class UserApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_users_with_array_input`") - resource_path = '/user/createWithArray'.replace('{format}', 'json') path_params = {} @@ -240,12 +236,10 @@ class UserApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_users_with_list_input`") - resource_path = '/user/createWithList'.replace('{format}', 'json') path_params = {} @@ -318,12 +312,10 @@ class UserApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'username' is set if ('username' not in params) or (params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `delete_user`") - resource_path = '/user/{username}'.replace('{format}', 'json') path_params = {} if 'username' in params: @@ -396,12 +388,10 @@ class UserApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'username' is set if ('username' not in params) or (params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `get_user_by_name`") - resource_path = '/user/{username}'.replace('{format}', 'json') path_params = {} if 'username' in params: @@ -475,7 +465,6 @@ class UserApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'username' is set if ('username' not in params) or (params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `login_user`") @@ -483,7 +472,6 @@ class UserApi(object): if ('password' not in params) or (params['password'] is None): raise ValueError("Missing the required parameter `password` when calling `login_user`") - resource_path = '/user/login'.replace('{format}', 'json') path_params = {} @@ -558,8 +546,6 @@ class UserApi(object): params[key] = val del params['kwargs'] - - resource_path = '/user/logout'.replace('{format}', 'json') path_params = {} @@ -631,7 +617,6 @@ class UserApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'username' is set if ('username' not in params) or (params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `update_user`") @@ -639,7 +624,6 @@ class UserApi(object): if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `update_user`") - resource_path = '/user/{username}'.replace('{format}', 'json') path_params = {} if 'username' in params: diff --git a/samples/client/petstore/python/swagger_client/configuration.py b/samples/client/petstore/python/swagger_client/configuration.py index a1efadf13b7..50b38c61d56 100644 --- a/samples/client/petstore/python/swagger_client/configuration.py +++ b/samples/client/petstore/python/swagger_client/configuration.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -37,6 +37,7 @@ import logging from six import iteritems + def singleton(cls, *args, **kw): instances = {} @@ -79,7 +80,6 @@ class Configuration(object): # access token for OAuth self.access_token = "" - # Logging Settings self.logger = {} self.logger["package_logger"] = logging.getLogger("swagger_client") diff --git a/samples/client/petstore/python/swagger_client/models/__init__.py b/samples/client/petstore/python/swagger_client/models/__init__.py index a3c738c19a8..4ccf94c0415 100644 --- a/samples/client/petstore/python/swagger_client/models/__init__.py +++ b/samples/client/petstore/python/swagger_client/models/__init__.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/samples/client/petstore/python/swagger_client/models/additional_properties_class.py b/samples/client/petstore/python/swagger_client/models/additional_properties_class.py index c62cc80cd8a..510287a1633 100644 --- a/samples/client/petstore/python/swagger_client/models/additional_properties_class.py +++ b/samples/client/petstore/python/swagger_client/models/additional_properties_class.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -74,7 +74,7 @@ class AdditionalPropertiesClass(object): :param map_property: The map_property of this AdditionalPropertiesClass. :type: dict(str, str) """ - + self._map_property = map_property @property @@ -97,7 +97,7 @@ class AdditionalPropertiesClass(object): :param map_of_map_property: The map_of_map_property of this AdditionalPropertiesClass. :type: dict(str, dict(str, str)) """ - + self._map_of_map_property = map_of_map_property def to_dict(self): @@ -149,4 +149,3 @@ class AdditionalPropertiesClass(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/animal.py b/samples/client/petstore/python/swagger_client/models/animal.py index 1fe5bc6d4ba..6ed4786c88b 100644 --- a/samples/client/petstore/python/swagger_client/models/animal.py +++ b/samples/client/petstore/python/swagger_client/models/animal.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -74,7 +74,7 @@ class Animal(object): :param class_name: The class_name of this Animal. :type: str """ - + self._class_name = class_name @property @@ -97,7 +97,7 @@ class Animal(object): :param color: The color of this Animal. :type: str """ - + self._color = color def to_dict(self): @@ -149,4 +149,3 @@ class Animal(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/animal_farm.py b/samples/client/petstore/python/swagger_client/models/animal_farm.py index d240be4b7ff..72fce33f252 100644 --- a/samples/client/petstore/python/swagger_client/models/animal_farm.py +++ b/samples/client/petstore/python/swagger_client/models/animal_farm.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -49,7 +49,6 @@ class AnimalFarm(object): } - def to_dict(self): """ Returns the model properties as a dict @@ -99,4 +98,3 @@ class AnimalFarm(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/api_response.py b/samples/client/petstore/python/swagger_client/models/api_response.py index dfbe253b8d9..8719ec107be 100644 --- a/samples/client/petstore/python/swagger_client/models/api_response.py +++ b/samples/client/petstore/python/swagger_client/models/api_response.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -77,7 +77,7 @@ class ApiResponse(object): :param code: The code of this ApiResponse. :type: int """ - + self._code = code @property @@ -100,7 +100,7 @@ class ApiResponse(object): :param type: The type of this ApiResponse. :type: str """ - + self._type = type @property @@ -123,7 +123,7 @@ class ApiResponse(object): :param message: The message of this ApiResponse. :type: str """ - + self._message = message def to_dict(self): @@ -175,4 +175,3 @@ class ApiResponse(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/array_test.py b/samples/client/petstore/python/swagger_client/models/array_test.py index def23e7cd5e..c0006207649 100644 --- a/samples/client/petstore/python/swagger_client/models/array_test.py +++ b/samples/client/petstore/python/swagger_client/models/array_test.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -77,7 +77,7 @@ class ArrayTest(object): :param array_of_string: The array_of_string of this ArrayTest. :type: list[str] """ - + self._array_of_string = array_of_string @property @@ -100,7 +100,7 @@ class ArrayTest(object): :param array_array_of_integer: The array_array_of_integer of this ArrayTest. :type: list[list[int]] """ - + self._array_array_of_integer = array_array_of_integer @property @@ -123,7 +123,7 @@ class ArrayTest(object): :param array_array_of_model: The array_array_of_model of this ArrayTest. :type: list[list[ReadOnlyFirst]] """ - + self._array_array_of_model = array_array_of_model def to_dict(self): @@ -175,4 +175,3 @@ class ArrayTest(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/cat.py b/samples/client/petstore/python/swagger_client/models/cat.py index 92fe431523c..3b44fde4ee0 100644 --- a/samples/client/petstore/python/swagger_client/models/cat.py +++ b/samples/client/petstore/python/swagger_client/models/cat.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -77,7 +77,7 @@ class Cat(object): :param class_name: The class_name of this Cat. :type: str """ - + self._class_name = class_name @property @@ -100,7 +100,7 @@ class Cat(object): :param color: The color of this Cat. :type: str """ - + self._color = color @property @@ -123,7 +123,7 @@ class Cat(object): :param declawed: The declawed of this Cat. :type: bool """ - + self._declawed = declawed def to_dict(self): @@ -175,4 +175,3 @@ class Cat(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/category.py b/samples/client/petstore/python/swagger_client/models/category.py index 6962ce3a7a5..4a88b5776f2 100644 --- a/samples/client/petstore/python/swagger_client/models/category.py +++ b/samples/client/petstore/python/swagger_client/models/category.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -74,7 +74,7 @@ class Category(object): :param id: The id of this Category. :type: int """ - + self._id = id @property @@ -97,7 +97,7 @@ class Category(object): :param name: The name of this Category. :type: str """ - + self._name = name def to_dict(self): @@ -149,4 +149,3 @@ class Category(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/dog.py b/samples/client/petstore/python/swagger_client/models/dog.py index 62b03f7a405..bf31dd37312 100644 --- a/samples/client/petstore/python/swagger_client/models/dog.py +++ b/samples/client/petstore/python/swagger_client/models/dog.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -77,7 +77,7 @@ class Dog(object): :param class_name: The class_name of this Dog. :type: str """ - + self._class_name = class_name @property @@ -100,7 +100,7 @@ class Dog(object): :param color: The color of this Dog. :type: str """ - + self._color = color @property @@ -123,7 +123,7 @@ class Dog(object): :param breed: The breed of this Dog. :type: str """ - + self._breed = breed def to_dict(self): @@ -175,4 +175,3 @@ class Dog(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/enum_class.py b/samples/client/petstore/python/swagger_client/models/enum_class.py index 1a7e9fec738..ec78827141b 100644 --- a/samples/client/petstore/python/swagger_client/models/enum_class.py +++ b/samples/client/petstore/python/swagger_client/models/enum_class.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -49,7 +49,6 @@ class EnumClass(object): } - def to_dict(self): """ Returns the model properties as a dict @@ -99,4 +98,3 @@ class EnumClass(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/enum_test.py b/samples/client/petstore/python/swagger_client/models/enum_test.py index 0f6c734a5b4..9bcaafc0501 100644 --- a/samples/client/petstore/python/swagger_client/models/enum_test.py +++ b/samples/client/petstore/python/swagger_client/models/enum_test.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -193,4 +193,3 @@ class EnumTest(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/format_test.py b/samples/client/petstore/python/swagger_client/models/format_test.py index b7aa17b3ee6..d29155be143 100644 --- a/samples/client/petstore/python/swagger_client/models/format_test.py +++ b/samples/client/petstore/python/swagger_client/models/format_test.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -107,12 +107,12 @@ class FormatTest(object): :param integer: The integer of this FormatTest. :type: int """ - + if not integer: raise ValueError("Invalid value for `integer`, must not be `None`") - if integer > 100.0: + if integer > 100.0: raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100.0`") - if integer < 10.0: + if integer < 10.0: raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10.0`") self._integer = integer @@ -137,12 +137,12 @@ class FormatTest(object): :param int32: The int32 of this FormatTest. :type: int """ - + if not int32: raise ValueError("Invalid value for `int32`, must not be `None`") - if int32 > 200.0: + if int32 > 200.0: raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200.0`") - if int32 < 20.0: + if int32 < 20.0: raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20.0`") self._int32 = int32 @@ -167,7 +167,7 @@ class FormatTest(object): :param int64: The int64 of this FormatTest. :type: int """ - + self._int64 = int64 @property @@ -190,12 +190,12 @@ class FormatTest(object): :param number: The number of this FormatTest. :type: float """ - + if not number: raise ValueError("Invalid value for `number`, must not be `None`") - if number > 543.2: + if number > 543.2: raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") - if number < 32.1: + if number < 32.1: raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") self._number = number @@ -220,12 +220,12 @@ class FormatTest(object): :param float: The float of this FormatTest. :type: float """ - + if not float: raise ValueError("Invalid value for `float`, must not be `None`") - if float > 987.6: + if float > 987.6: raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") - if float < 54.3: + if float < 54.3: raise ValueError("Invalid value for `float`, must be a value greater than or equal to `54.3`") self._float = float @@ -250,12 +250,12 @@ class FormatTest(object): :param double: The double of this FormatTest. :type: float """ - + if not double: raise ValueError("Invalid value for `double`, must not be `None`") - if double > 123.4: + if double > 123.4: raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") - if double < 67.8: + if double < 67.8: raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") self._double = double @@ -280,10 +280,10 @@ class FormatTest(object): :param string: The string of this FormatTest. :type: str """ - + if not string: raise ValueError("Invalid value for `string`, must not be `None`") - if not re.search('[a-z]', string, flags=re.IGNORECASE): + if not re.search('[a-z]', string, flags=re.IGNORECASE): raise ValueError("Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") self._string = string @@ -308,7 +308,7 @@ class FormatTest(object): :param byte: The byte of this FormatTest. :type: str """ - + self._byte = byte @property @@ -331,7 +331,7 @@ class FormatTest(object): :param binary: The binary of this FormatTest. :type: str """ - + self._binary = binary @property @@ -354,7 +354,7 @@ class FormatTest(object): :param date: The date of this FormatTest. :type: date """ - + self._date = date @property @@ -377,7 +377,7 @@ class FormatTest(object): :param date_time: The date_time of this FormatTest. :type: datetime """ - + self._date_time = date_time @property @@ -400,7 +400,7 @@ class FormatTest(object): :param uuid: The uuid of this FormatTest. :type: str """ - + self._uuid = uuid @property @@ -423,12 +423,12 @@ class FormatTest(object): :param password: The password of this FormatTest. :type: str """ - + if not password: raise ValueError("Invalid value for `password`, must not be `None`") - if len(password) > 64: + if len(password) > 64: raise ValueError("Invalid value for `password`, length must be less than `64`") - if len(password) < 10: + if len(password) < 10: raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") self._password = password @@ -482,4 +482,3 @@ class FormatTest(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/inline_response_200.py b/samples/client/petstore/python/swagger_client/models/inline_response_200.py deleted file mode 100644 index f55ff5ee4d5..00000000000 --- a/samples/client/petstore/python/swagger_client/models/inline_response_200.py +++ /dev/null @@ -1,251 +0,0 @@ -# coding: utf-8 - -""" -Copyright 2016 SmartBear Software - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen -""" - -from pprint import pformat -from six import iteritems - - -class InlineResponse200(object): - """ - NOTE: This class is auto generated by the swagger code generator program. - Do not edit the class manually. - """ - def __init__(self): - """ - InlineResponse200 - a model defined in Swagger - - :param dict swaggerTypes: The key is attribute name - and the value is attribute type. - :param dict attributeMap: The key is attribute name - and the value is json key in definition. - """ - self.swagger_types = { - 'tags': 'list[Tag]', - 'id': 'int', - 'category': 'object', - 'status': 'str', - 'name': 'str', - 'photo_urls': 'list[str]' - } - - self.attribute_map = { - 'tags': 'tags', - 'id': 'id', - 'category': 'category', - 'status': 'status', - 'name': 'name', - 'photo_urls': 'photoUrls' - } - - self._tags = None - self._id = None - self._category = None - self._status = None - self._name = None - self._photo_urls = None - - @property - def tags(self): - """ - Gets the tags of this InlineResponse200. - - - :return: The tags of this InlineResponse200. - :rtype: list[Tag] - """ - return self._tags - - @tags.setter - def tags(self, tags): - """ - Sets the tags of this InlineResponse200. - - - :param tags: The tags of this InlineResponse200. - :type: list[Tag] - """ - self._tags = tags - - @property - def id(self): - """ - Gets the id of this InlineResponse200. - - - :return: The id of this InlineResponse200. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """ - Sets the id of this InlineResponse200. - - - :param id: The id of this InlineResponse200. - :type: int - """ - self._id = id - - @property - def category(self): - """ - Gets the category of this InlineResponse200. - - - :return: The category of this InlineResponse200. - :rtype: object - """ - return self._category - - @category.setter - def category(self, category): - """ - Sets the category of this InlineResponse200. - - - :param category: The category of this InlineResponse200. - :type: object - """ - self._category = category - - @property - def status(self): - """ - Gets the status of this InlineResponse200. - pet status in the store - - :return: The status of this InlineResponse200. - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """ - Sets the status of this InlineResponse200. - pet status in the store - - :param status: The status of this InlineResponse200. - :type: str - """ - allowed_values = ["available", "pending", "sold"] - if status not in allowed_values: - raise ValueError( - "Invalid value for `status`, must be one of {0}" - .format(allowed_values) - ) - self._status = status - - @property - def name(self): - """ - Gets the name of this InlineResponse200. - - - :return: The name of this InlineResponse200. - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """ - Sets the name of this InlineResponse200. - - - :param name: The name of this InlineResponse200. - :type: str - """ - self._name = name - - @property - def photo_urls(self): - """ - Gets the photo_urls of this InlineResponse200. - - - :return: The photo_urls of this InlineResponse200. - :rtype: list[str] - """ - return self._photo_urls - - @photo_urls.setter - def photo_urls(self, photo_urls): - """ - Sets the photo_urls of this InlineResponse200. - - - :param photo_urls: The photo_urls of this InlineResponse200. - :type: list[str] - """ - self._photo_urls = photo_urls - - def to_dict(self): - """ - Returns the model properties as a dict - """ - result = {} - - for attr, _ in iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """ - Returns the string representation of the model - """ - return pformat(self.to_dict()) - - def __repr__(self): - """ - For `print` and `pprint` - """ - return self.to_str() - - def __eq__(self, other): - """ - Returns true if both objects are equal - """ - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """ - Returns true if both objects are not equal - """ - return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python/swagger_client/models/mixed_properties_and_additional_properties_class.py index 2122cabdb53..99c7c9d943c 100644 --- a/samples/client/petstore/python/swagger_client/models/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python/swagger_client/models/mixed_properties_and_additional_properties_class.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -77,7 +77,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): :param uuid: The uuid of this MixedPropertiesAndAdditionalPropertiesClass. :type: str """ - + self._uuid = uuid @property @@ -100,7 +100,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): :param date_time: The date_time of this MixedPropertiesAndAdditionalPropertiesClass. :type: datetime """ - + self._date_time = date_time @property @@ -123,7 +123,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): :param map: The map of this MixedPropertiesAndAdditionalPropertiesClass. :type: dict(str, Animal) """ - + self._map = map def to_dict(self): @@ -175,4 +175,3 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/model_200_response.py b/samples/client/petstore/python/swagger_client/models/model_200_response.py index e566d5e16cd..cd86b10e963 100644 --- a/samples/client/petstore/python/swagger_client/models/model_200_response.py +++ b/samples/client/petstore/python/swagger_client/models/model_200_response.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -71,7 +71,7 @@ class Model200Response(object): :param name: The name of this Model200Response. :type: int """ - + self._name = name def to_dict(self): @@ -123,4 +123,3 @@ class Model200Response(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/model_return.py b/samples/client/petstore/python/swagger_client/models/model_return.py index 840e64004d6..711418c3d91 100644 --- a/samples/client/petstore/python/swagger_client/models/model_return.py +++ b/samples/client/petstore/python/swagger_client/models/model_return.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -71,7 +71,7 @@ class ModelReturn(object): :param _return: The _return of this ModelReturn. :type: int """ - + self.__return = _return def to_dict(self): @@ -123,4 +123,3 @@ class ModelReturn(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/name.py b/samples/client/petstore/python/swagger_client/models/name.py index 8c66493dafa..45d7b4bd8d0 100644 --- a/samples/client/petstore/python/swagger_client/models/name.py +++ b/samples/client/petstore/python/swagger_client/models/name.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -80,7 +80,7 @@ class Name(object): :param name: The name of this Name. :type: int """ - + self._name = name @property @@ -103,7 +103,7 @@ class Name(object): :param snake_case: The snake_case of this Name. :type: int """ - + self._snake_case = snake_case @property @@ -126,7 +126,7 @@ class Name(object): :param _property: The _property of this Name. :type: str """ - + self.__property = _property @property @@ -149,7 +149,7 @@ class Name(object): :param _123_number: The _123_number of this Name. :type: int """ - + self.__123_number = _123_number def to_dict(self): @@ -201,4 +201,3 @@ class Name(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/order.py b/samples/client/petstore/python/swagger_client/models/order.py index 54c30dea04c..a15e20f924e 100644 --- a/samples/client/petstore/python/swagger_client/models/order.py +++ b/samples/client/petstore/python/swagger_client/models/order.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -86,7 +86,7 @@ class Order(object): :param id: The id of this Order. :type: int """ - + self._id = id @property @@ -109,7 +109,7 @@ class Order(object): :param pet_id: The pet_id of this Order. :type: int """ - + self._pet_id = pet_id @property @@ -132,7 +132,7 @@ class Order(object): :param quantity: The quantity of this Order. :type: int """ - + self._quantity = quantity @property @@ -155,7 +155,7 @@ class Order(object): :param ship_date: The ship_date of this Order. :type: datetime """ - + self._ship_date = ship_date @property @@ -207,7 +207,7 @@ class Order(object): :param complete: The complete of this Order. :type: bool """ - + self._complete = complete def to_dict(self): @@ -259,4 +259,3 @@ class Order(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/pet.py b/samples/client/petstore/python/swagger_client/models/pet.py index f5dc79384b5..deccb9630b7 100644 --- a/samples/client/petstore/python/swagger_client/models/pet.py +++ b/samples/client/petstore/python/swagger_client/models/pet.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -86,7 +86,7 @@ class Pet(object): :param id: The id of this Pet. :type: int """ - + self._id = id @property @@ -109,7 +109,7 @@ class Pet(object): :param category: The category of this Pet. :type: Category """ - + self._category = category @property @@ -132,7 +132,7 @@ class Pet(object): :param name: The name of this Pet. :type: str """ - + self._name = name @property @@ -155,7 +155,7 @@ class Pet(object): :param photo_urls: The photo_urls of this Pet. :type: list[str] """ - + self._photo_urls = photo_urls @property @@ -178,7 +178,7 @@ class Pet(object): :param tags: The tags of this Pet. :type: list[Tag] """ - + self._tags = tags @property @@ -259,4 +259,3 @@ class Pet(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/read_only_first.py b/samples/client/petstore/python/swagger_client/models/read_only_first.py index b4014f3a78b..4f479ae1d7f 100644 --- a/samples/client/petstore/python/swagger_client/models/read_only_first.py +++ b/samples/client/petstore/python/swagger_client/models/read_only_first.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -74,7 +74,7 @@ class ReadOnlyFirst(object): :param bar: The bar of this ReadOnlyFirst. :type: str """ - + self._bar = bar @property @@ -97,7 +97,7 @@ class ReadOnlyFirst(object): :param baz: The baz of this ReadOnlyFirst. :type: str """ - + self._baz = baz def to_dict(self): @@ -149,4 +149,3 @@ class ReadOnlyFirst(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/special_model_name.py b/samples/client/petstore/python/swagger_client/models/special_model_name.py index 9aac6ae248c..af3fb00dda7 100644 --- a/samples/client/petstore/python/swagger_client/models/special_model_name.py +++ b/samples/client/petstore/python/swagger_client/models/special_model_name.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -71,7 +71,7 @@ class SpecialModelName(object): :param special_property_name: The special_property_name of this SpecialModelName. :type: int """ - + self._special_property_name = special_property_name def to_dict(self): @@ -123,4 +123,3 @@ class SpecialModelName(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/tag.py b/samples/client/petstore/python/swagger_client/models/tag.py index 9ba29be5cd1..a91b8127d51 100644 --- a/samples/client/petstore/python/swagger_client/models/tag.py +++ b/samples/client/petstore/python/swagger_client/models/tag.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -74,7 +74,7 @@ class Tag(object): :param id: The id of this Tag. :type: int """ - + self._id = id @property @@ -97,7 +97,7 @@ class Tag(object): :param name: The name of this Tag. :type: str """ - + self._name = name def to_dict(self): @@ -149,4 +149,3 @@ class Tag(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/models/user.py b/samples/client/petstore/python/swagger_client/models/user.py index 4559387a9fe..f98a895b716 100644 --- a/samples/client/petstore/python/swagger_client/models/user.py +++ b/samples/client/petstore/python/swagger_client/models/user.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -92,7 +92,7 @@ class User(object): :param id: The id of this User. :type: int """ - + self._id = id @property @@ -115,7 +115,7 @@ class User(object): :param username: The username of this User. :type: str """ - + self._username = username @property @@ -138,7 +138,7 @@ class User(object): :param first_name: The first_name of this User. :type: str """ - + self._first_name = first_name @property @@ -161,7 +161,7 @@ class User(object): :param last_name: The last_name of this User. :type: str """ - + self._last_name = last_name @property @@ -184,7 +184,7 @@ class User(object): :param email: The email of this User. :type: str """ - + self._email = email @property @@ -207,7 +207,7 @@ class User(object): :param password: The password of this User. :type: str """ - + self._password = password @property @@ -230,7 +230,7 @@ class User(object): :param phone: The phone of this User. :type: str """ - + self._phone = phone @property @@ -253,7 +253,7 @@ class User(object): :param user_status: The user_status of this User. :type: int """ - + self._user_status = user_status def to_dict(self): @@ -305,4 +305,3 @@ class User(object): Returns true if both objects are not equal """ return not self == other - diff --git a/samples/client/petstore/python/swagger_client/rest.py b/samples/client/petstore/python/swagger_client/rest.py index de53bcacdb1..d27f1652706 100644 --- a/samples/client/petstore/python/swagger_client/rest.py +++ b/samples/client/petstore/python/swagger_client/rest.py @@ -8,13 +8,13 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/samples/client/petstore/python/test/test_additional_properties_class.py b/samples/client/petstore/python/test/test_additional_properties_class.py index 52163f2afec..f2370e4ea21 100644 --- a/samples/client/petstore/python/test/test_additional_properties_class.py +++ b/samples/client/petstore/python/test/test_additional_properties_class.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestAdditionalPropertiesClass(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_animal.py b/samples/client/petstore/python/test/test_animal.py index 279ed1850dd..83c8f872250 100644 --- a/samples/client/petstore/python/test/test_animal.py +++ b/samples/client/petstore/python/test/test_animal.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestAnimal(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_animal_farm.py b/samples/client/petstore/python/test/test_animal_farm.py index 74dd22fd3b9..637d259b1e8 100644 --- a/samples/client/petstore/python/test/test_animal_farm.py +++ b/samples/client/petstore/python/test/test_animal_farm.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestAnimalFarm(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_api_response.py b/samples/client/petstore/python/test/test_api_response.py index be73dbf373d..6ee0ef03ae9 100644 --- a/samples/client/petstore/python/test/test_api_response.py +++ b/samples/client/petstore/python/test/test_api_response.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestApiResponse(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_array_test.py b/samples/client/petstore/python/test/test_array_test.py index 494596c842f..7d2e9ff9fe9 100644 --- a/samples/client/petstore/python/test/test_array_test.py +++ b/samples/client/petstore/python/test/test_array_test.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestArrayTest(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_cat.py b/samples/client/petstore/python/test/test_cat.py index 728a824fa5b..8baccfa294d 100644 --- a/samples/client/petstore/python/test/test_cat.py +++ b/samples/client/petstore/python/test/test_cat.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestCat(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_category.py b/samples/client/petstore/python/test/test_category.py index 793fbdf41b0..ff57ffb1f7d 100644 --- a/samples/client/petstore/python/test/test_category.py +++ b/samples/client/petstore/python/test/test_category.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestCategory(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_dog.py b/samples/client/petstore/python/test/test_dog.py index 044dc5be51f..cb44931140e 100644 --- a/samples/client/petstore/python/test/test_dog.py +++ b/samples/client/petstore/python/test/test_dog.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestDog(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_enum_class.py b/samples/client/petstore/python/test/test_enum_class.py index 22e2b5ebb5c..488e8306c8f 100644 --- a/samples/client/petstore/python/test/test_enum_class.py +++ b/samples/client/petstore/python/test/test_enum_class.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestEnumClass(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_enum_test.py b/samples/client/petstore/python/test/test_enum_test.py index 49cb79e6bc3..bbe985aeeaf 100644 --- a/samples/client/petstore/python/test/test_enum_test.py +++ b/samples/client/petstore/python/test/test_enum_test.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestEnumTest(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_fake_api.py b/samples/client/petstore/python/test/test_fake_api.py index 29b71bdf81a..fb480485829 100644 --- a/samples/client/petstore/python/test/test_fake_api.py +++ b/samples/client/petstore/python/test/test_fake_api.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -42,10 +46,10 @@ class TestFakeApi(unittest.TestCase): """ Test case for test_endpoint_parameters - Fake endpoint for testing various parameters + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 """ pass if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_format_test.py b/samples/client/petstore/python/test/test_format_test.py index 11101ad52da..966a0887f0a 100644 --- a/samples/client/petstore/python/test/test_format_test.py +++ b/samples/client/petstore/python/test/test_format_test.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestFormatTest(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py index 6cea606481c..f19e0211af7 100644 --- a/samples/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestMixedPropertiesAndAdditionalPropertiesClass(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_model_200_response.py b/samples/client/petstore/python/test/test_model_200_response.py index 8328d2b9757..74519b4bac5 100644 --- a/samples/client/petstore/python/test/test_model_200_response.py +++ b/samples/client/petstore/python/test/test_model_200_response.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestModel200Response(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_model_return.py b/samples/client/petstore/python/test/test_model_return.py index 4ff3f38b2eb..54c9422545d 100644 --- a/samples/client/petstore/python/test/test_model_return.py +++ b/samples/client/petstore/python/test/test_model_return.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestModelReturn(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_name.py b/samples/client/petstore/python/test/test_name.py index c3b27897eb1..be10b1ddd78 100644 --- a/samples/client/petstore/python/test/test_name.py +++ b/samples/client/petstore/python/test/test_name.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestName(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_order.py b/samples/client/petstore/python/test/test_order.py index 23beefe346c..21c2b4830d9 100644 --- a/samples/client/petstore/python/test/test_order.py +++ b/samples/client/petstore/python/test/test_order.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestOrder(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_pet.py b/samples/client/petstore/python/test/test_pet.py index 471b7b4f67c..fc0ce0a727c 100644 --- a/samples/client/petstore/python/test/test_pet.py +++ b/samples/client/petstore/python/test/test_pet.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestPet(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_pet_api.py b/samples/client/petstore/python/test/test_pet_api.py index 81ee6c76e9c..8ea0c9c0acd 100644 --- a/samples/client/petstore/python/test/test_pet_api.py +++ b/samples/client/petstore/python/test/test_pet_api.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -104,4 +108,4 @@ class TestPetApi(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_read_only_first.py b/samples/client/petstore/python/test/test_read_only_first.py index d7073915dfe..ea7a0ad76e8 100644 --- a/samples/client/petstore/python/test/test_read_only_first.py +++ b/samples/client/petstore/python/test/test_read_only_first.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestReadOnlyFirst(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_special_model_name.py b/samples/client/petstore/python/test/test_special_model_name.py index 17c12655031..e76bc9bbf9b 100644 --- a/samples/client/petstore/python/test/test_special_model_name.py +++ b/samples/client/petstore/python/test/test_special_model_name.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestSpecialModelName(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_store_api.py b/samples/client/petstore/python/test/test_store_api.py index e8dc0a64b1c..ecce38463b5 100644 --- a/samples/client/petstore/python/test/test_store_api.py +++ b/samples/client/petstore/python/test/test_store_api.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -72,4 +76,4 @@ class TestStoreApi(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_tag.py b/samples/client/petstore/python/test/test_tag.py index 35b51e4d7d2..db35da374ae 100644 --- a/samples/client/petstore/python/test/test_tag.py +++ b/samples/client/petstore/python/test/test_tag.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestTag(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_user.py b/samples/client/petstore/python/test/test_user.py index 1aad154cbf8..e57b3600f0e 100644 --- a/samples/client/petstore/python/test/test_user.py +++ b/samples/client/petstore/python/test/test_user.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -46,4 +50,4 @@ class TestUser(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/test/test_user_api.py b/samples/client/petstore/python/test/test_user_api.py index 0205fe7383a..88c2f862983 100644 --- a/samples/client/petstore/python/test/test_user_api.py +++ b/samples/client/petstore/python/test/test_user_api.py @@ -1,21 +1,25 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Swagger Petstore - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - http://www.apache.org/licenses/LICENSE-2.0 + OpenAPI spec version: 1.0.0 + Contact: apiteam@swagger.io + Generated by: https://github.com/swagger-api/swagger-codegen.git - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - ref: https://github.com/swagger-api/swagger-codegen + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from __future__ import absolute_import @@ -104,4 +108,4 @@ class TestUserApi(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/samples/client/petstore/python/tests/test_api_exception.py b/samples/client/petstore/python/tests/test_api_exception.py index 790a18dffd0..96ca4e7bfbc 100644 --- a/samples/client/petstore/python/tests/test_api_exception.py +++ b/samples/client/petstore/python/tests/test_api_exception.py @@ -44,7 +44,7 @@ class ApiExceptionTests(unittest.TestCase): def test_404_error(self): self.pet_api.add_pet(body=self.pet) self.pet_api.delete_pet(pet_id=self.pet.id) - + with self.checkRaiseRegex(ApiException, "Pet not found"): self.pet_api.get_pet_by_id(pet_id=self.pet.id) @@ -87,4 +87,3 @@ class ApiExceptionTests(unittest.TestCase): return self.assertRegexpMatches(text, expected_regex) return self.assertRegex(text, expected_regex) - diff --git a/samples/client/petstore/python/tests/test_deserialization.py b/samples/client/petstore/python/tests/test_deserialization.py index 1eae045ff76..e1d7e250b4b 100644 --- a/samples/client/petstore/python/tests/test_deserialization.py +++ b/samples/client/petstore/python/tests/test_deserialization.py @@ -78,23 +78,23 @@ class DeserializationTests(unittest.TestCase): def test_deserialize_pet(self): """ deserialize pet """ data = { + "id": 0, + "category": { "id": 0, - "category": { + "name": "string" + }, + "name": "doggie", + "photoUrls": [ + "string" + ], + "tags": [ + { "id": 0, "name": "string" - }, - "name": "doggie", - "photoUrls": [ - "string" - ], - "tags": [ - { - "id": 0, - "name": "string" - } - ], - "status": "available" - } + } + ], + "status": "available" + } deserialized = self.deserialize(data, "Pet") self.assertTrue(isinstance(deserialized, swagger_client.Pet)) self.assertEqual(deserialized.id, 0) @@ -106,42 +106,43 @@ class DeserializationTests(unittest.TestCase): def test_deserialize_list_of_pet(self): """ deserialize list[Pet] """ - data = [{ - "id": 0, - "category": { + data = [ + { "id": 0, - "name": "string" - }, - "name": "doggie0", - "photoUrls": [ - "string" - ], - "tags": [ - { + "category": { "id": 0, "name": "string" - } - ], - "status": "available" - }, - { - "id": 1, - "category": { - "id": 0, - "name": "string" + }, + "name": "doggie0", + "photoUrls": [ + "string" + ], + "tags": [ + { + "id": 0, + "name": "string" + } + ], + "status": "available" }, - "name": "doggie1", - "photoUrls": [ - "string" - ], - "tags": [ - { + { + "id": 1, + "category": { "id": 0, "name": "string" - } - ], - "status": "available" - }] + }, + "name": "doggie1", + "photoUrls": [ + "string" + ], + "tags": [ + { + "id": 0, + "name": "string" + } + ], + "status": "available" + }] deserialized = self.deserialize(data, "list[Pet]") self.assertTrue(isinstance(deserialized, list)) self.assertTrue(isinstance(deserialized[0], swagger_client.Pet))