From a7c08e680cc244436a007f28e9db068fe887e185 Mon Sep 17 00:00:00 2001 From: wing328 Date: Sun, 23 Aug 2015 17:20:30 +0800 Subject: [PATCH] update python samples --- samples/client/petstore/python/.coverage | Bin 0 -> 3918 bytes .../petstore/python/dev-requirements.txt.log | 15 +++++++++ samples/client/petstore/python/setup.py | 6 ++-- .../python/swagger_client.egg-info/PKG-INFO | 12 ++++++++ .../swagger_client.egg-info/SOURCES.txt | 29 ++++++++++++++++++ .../dependency_links.txt | 1 + .../swagger_client.egg-info/requires.txt | 4 +++ .../swagger_client.egg-info/top_level.txt | 2 ++ .../python/swagger_client/api_client.py | 14 +++++---- .../python/swagger_client/apis/pet_api.py | 17 +++++----- .../python/swagger_client/apis/store_api.py | 9 +++--- .../python/swagger_client/apis/user_api.py | 17 +++++----- .../python/swagger_client/configuration.py | 8 +++-- .../python/swagger_client/models/category.py | 8 +++-- .../python/swagger_client/models/order.py | 8 +++-- .../python/swagger_client/models/pet.py | 8 +++-- .../python/swagger_client/models/tag.py | 8 +++-- .../python/swagger_client/models/user.py | 8 +++-- 18 files changed, 126 insertions(+), 48 deletions(-) create mode 100644 samples/client/petstore/python/.coverage create mode 100644 samples/client/petstore/python/dev-requirements.txt.log create mode 100644 samples/client/petstore/python/swagger_client.egg-info/PKG-INFO create mode 100644 samples/client/petstore/python/swagger_client.egg-info/SOURCES.txt create mode 100644 samples/client/petstore/python/swagger_client.egg-info/dependency_links.txt create mode 100644 samples/client/petstore/python/swagger_client.egg-info/requires.txt create mode 100644 samples/client/petstore/python/swagger_client.egg-info/top_level.txt diff --git a/samples/client/petstore/python/.coverage b/samples/client/petstore/python/.coverage new file mode 100644 index 0000000000000000000000000000000000000000..d58a8fe9c63feb32f3168f71e645ace0827bed20 GIT binary patch literal 3918 zcmd6qd32QJ8O8fNvI+=7WC@7SDuf`JASj@M3lNs;6^)LFGQ^mC8OA1=d@~bbz?7Y$ zfD4L%vWiNjEp4r>TU%?fh+VW=v6d=YZPnIl7cK6!&--Qu(^EXB|I9i4FFDCM-}}7x z-rs%RMcNWdQM7YavbHv;$|O^vM!Q!f=LM}D*GiK)JM{lbq%#aI#N}e25Th)r&!pz2nFbkKIn^nC`5k@#2^gDNf?SE6k`NRaSBFZG)~277>hG8 z0h2KW(=Z(~Z~-nvIik1>mt!_6P>Cy1hk7)i5%X|0u0abHVi6W&36^3RmSY9Jij`P} z)mVe;aRb)kX54~x*oe*8ify<9cj7MGjh(m$yYVf28{ffqaUZ^i@8f@oNbR<(5cUOFLEbLN*UO3J!xgUvb193@6*wmSCh^?r4n1S(s`UdXZh_ z99)5F)F6(zc9jiCA%porv?jlYO{S`Ylsj(MSlI1I$1TQif8nc8cx0o$o(hv9NoQ zOOrQwAqJQRgR=H^DwLSPCwWUxHA6c)UuMb2JEu5vD8duq1&e}=SBs5jhrc0~I z_wd*}y2-}Kg2PSIBNiT;lgCBY1=dY85GVN9ehDXe1n&!_M!JdIylIG@8S7RcA}Cf>3@zK0L+AwI&#_{5_51)&Jl2ehNGQ!b{* z2)m2jEqe-k`PBAy!DXSazi^CjtZ$0oG6?moGhFooGLs| zNa6Xy8Nv&M7Yn1pON29pmkMVIFB4uaoGpwA=LoBW)xtnnBdilP3Y&yi3+D?L2(J;g z2p0+$2^R~O2$u?%30DYL3U3hJC|oPNMYvA5Ubs=XO}JgSLwJ|)ZsFI2yM*@&?-SlH zd_ef1@FC&D!ac$lg|7);7yd=~w(yYf6XCyvp9(uGdn$V=3zP$uLzG3zVaj6VaOKI$ z5z2@L(RiLBR+X%;NyHmdm6=4c-g&ZTEbR4}CtZm+FFGd<$+FJXNQrszRKtZUkaNwG zWkx*bNmnA}mbjUgxmiASbF4_Jjeeo!YYDE!bygJXv-Pmu3StL#2GK;Grpv;+sxlMA zlc{DmUqLK9E;rx*A;CTJY~{!SuXil$^ZCFl&K6IpA+y15J~K@M*W^xuD^O)J z1RfD}|AoCKYxib@L@N+ngWqOA*zAGeI=r>Pcj4<<`nv{y;Bb5Y$eQ3YRP43Ze!+U- zCF|`!`riJN2gTd?tM&Igc-N583Jed6qlE3-z@oG8XpfApzT6K}V~B95aG0=II9ymN z94Q(f!Jx1_ z$A#;JtA%SkAdC(-dq8aPbl4=^BHWt8#2ua#cjjQRGslZZg^vk;DtuhHPxyrJN#Rq% zr-jc5pB3&GJ|}!$ctH4q=g2|fOTw3hzZbrm!^#_;EN=<_Cj5u+9pSsee|pfoCwyP{ zf$&4&N5YRicZ@ZClzo+j%Kpj$%E8JnDo<3Nq#T-KkO9c(Q{n)`k;+q)qm^TnW0m8S zaiDVHl(C|4?1DOW4kC~s1(RjyO6S8h;lRNkh%UAalQS-C~IRk=;M zJ&(}zA#JqhL@uR$V`0A|r?k{kwb#{Nh0t_2QOfLKd0tkH9}abev9SM=1.11.2 (from tox->-r dev-requirements.txt (line 2)) + Using cached virtualenv-13.1.2-py2.py3-none-any.whl +Collecting py>=1.4.17 (from tox->-r dev-requirements.txt (line 2)) + Using cached py-1.4.30-py2.py3-none-any.whl +Collecting pluggy<0.4.0,>=0.3.0 (from tox->-r dev-requirements.txt (line 2)) + Using cached pluggy-0.3.0-py2.py3-none-any.whl +Installing collected packages: nose, virtualenv, py, pluggy, tox, coverage, randomize +Successfully installed coverage-3.7.1 nose-1.3.7 pluggy-0.3.0 py-1.4.30 randomize-0.13 tox-2.1.1 virtualenv-13.1.2 diff --git a/samples/client/petstore/python/setup.py b/samples/client/petstore/python/setup.py index e66e9689343..8564466b0dd 100644 --- a/samples/client/petstore/python/setup.py +++ b/samples/client/petstore/python/setup.py @@ -8,13 +8,11 @@ VERSION = "1.0.0" -# To install the library, open a Terminal shell, then run this -# file by typing: +# To install the library, run the following # # python setup.py install # -# You need to have the setuptools module installed. -# Try reading the setuptools documentation: +# prerequisite: setuptools # http://pypi.python.org/pypi/setuptools REQUIRES = ["urllib3 >= 1.10", "six >= 1.9", "certifi", "python-dateutil"] diff --git a/samples/client/petstore/python/swagger_client.egg-info/PKG-INFO b/samples/client/petstore/python/swagger_client.egg-info/PKG-INFO new file mode 100644 index 00000000000..d4fe6f978b3 --- /dev/null +++ b/samples/client/petstore/python/swagger_client.egg-info/PKG-INFO @@ -0,0 +1,12 @@ +Metadata-Version: 1.0 +Name: swagger-client +Version: 1.0.0 +Summary: Swagger Petstore +Home-page: UNKNOWN +Author: UNKNOWN +Author-email: apiteam@swagger.io +License: UNKNOWN +Description: This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters + +Keywords: Swagger,Swagger Petstore +Platform: UNKNOWN diff --git a/samples/client/petstore/python/swagger_client.egg-info/SOURCES.txt b/samples/client/petstore/python/swagger_client.egg-info/SOURCES.txt new file mode 100644 index 00000000000..a7d91c0b8ce --- /dev/null +++ b/samples/client/petstore/python/swagger_client.egg-info/SOURCES.txt @@ -0,0 +1,29 @@ +setup.cfg +setup.py +swagger_client/__init__.py +swagger_client/api_client.py +swagger_client/configuration.py +swagger_client/rest.py +swagger_client.egg-info/PKG-INFO +swagger_client.egg-info/SOURCES.txt +swagger_client.egg-info/dependency_links.txt +swagger_client.egg-info/requires.txt +swagger_client.egg-info/top_level.txt +swagger_client/apis/__init__.py +swagger_client/apis/pet_api.py +swagger_client/apis/store_api.py +swagger_client/apis/user_api.py +swagger_client/models/__init__.py +swagger_client/models/category.py +swagger_client/models/order.py +swagger_client/models/pet.py +swagger_client/models/tag.py +swagger_client/models/user.py +tests/__init__.py +tests/test_api_client.py +tests/test_api_exception.py +tests/test_deserialization.py +tests/test_order_model.py +tests/test_pet_api.py +tests/test_pet_model.py +tests/test_store_api.py \ No newline at end of file diff --git a/samples/client/petstore/python/swagger_client.egg-info/dependency_links.txt b/samples/client/petstore/python/swagger_client.egg-info/dependency_links.txt new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/python/swagger_client.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/python/swagger_client.egg-info/requires.txt b/samples/client/petstore/python/swagger_client.egg-info/requires.txt new file mode 100644 index 00000000000..367a059209f --- /dev/null +++ b/samples/client/petstore/python/swagger_client.egg-info/requires.txt @@ -0,0 +1,4 @@ +urllib3 >= 1.10 +six >= 1.9 +certifi +python-dateutil diff --git a/samples/client/petstore/python/swagger_client.egg-info/top_level.txt b/samples/client/petstore/python/swagger_client.egg-info/top_level.txt new file mode 100644 index 00000000000..9a02a75c058 --- /dev/null +++ b/samples/client/petstore/python/swagger_client.egg-info/top_level.txt @@ -0,0 +1,2 @@ +swagger_client +tests diff --git a/samples/client/petstore/python/swagger_client/api_client.py b/samples/client/petstore/python/swagger_client/api_client.py index 02099f0ceb1..33e8acb8ba1 100644 --- a/samples/client/petstore/python/swagger_client/api_client.py +++ b/samples/client/petstore/python/swagger_client/api_client.py @@ -14,6 +14,8 @@ Copyright 2015 SmartBear Software 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 __future__ import absolute_import @@ -56,7 +58,7 @@ class ApiClient(object): templates. NOTE: This class is auto generated by the swagger code generator program. - https://github.com/swagger-api/swagger-codegen + Ref: https://github.com/swagger-api/swagger-codegen Do not edit the class manually. :param host: The base path for the server to call. @@ -75,7 +77,7 @@ class ApiClient(object): self.host = host self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Python-Swagger' + self.user_agent = 'Python-Swagger/1.0.0' @property def user_agent(self): @@ -280,7 +282,8 @@ class ApiClient(object): body=None, post_params=None, files=None, response_type=None, auth_settings=None, callback=None): """ - Makes the HTTP request and return the deserialized data. + Makes the HTTP request (synchronous) and return the deserialized data. + To make an async request, define a function for callback. :param resource_path: Path to method endpoint. :param method: Method to call. @@ -450,9 +453,8 @@ class ApiClient(object): def __deserialize_file(self, response): """ - Saves response body into a file in (the defined) temporary folder, - using the filename from the `Content-Disposition` header if provided, - otherwise a random filename. + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. :param response: RESTResponse. :return: file path. 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 fa1db5801b6..0dcdbc9ddae 100644 --- a/samples/client/petstore/python/swagger_client/apis/pet_api.py +++ b/samples/client/petstore/python/swagger_client/apis/pet_api.py @@ -33,6 +33,7 @@ class PetApi(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -49,7 +50,7 @@ class PetApi(object): Update an existing pet - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -124,7 +125,7 @@ class PetApi(object): Add a new pet to the store - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -199,7 +200,7 @@ class PetApi(object): Finds Pets by status Multiple status values can be provided with comma seperated strings - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -274,7 +275,7 @@ class PetApi(object): Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -349,7 +350,7 @@ class PetApi(object): Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -427,7 +428,7 @@ class PetApi(object): Updates a pet in the store with form data - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -511,7 +512,7 @@ class PetApi(object): Deletes a pet - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -592,7 +593,7 @@ class PetApi(object): uploads an image - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): 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 4dca0af85e2..affb76f6c8b 100644 --- a/samples/client/petstore/python/swagger_client/apis/store_api.py +++ b/samples/client/petstore/python/swagger_client/apis/store_api.py @@ -33,6 +33,7 @@ class StoreApi(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -49,7 +50,7 @@ class StoreApi(object): Returns pet inventories by status Returns a map of status codes to quantities - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -121,7 +122,7 @@ class StoreApi(object): Place an order for a pet - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -196,7 +197,7 @@ class StoreApi(object): Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -274,7 +275,7 @@ class StoreApi(object): Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): 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 4897abe8801..574379491ec 100644 --- a/samples/client/petstore/python/swagger_client/apis/user_api.py +++ b/samples/client/petstore/python/swagger_client/apis/user_api.py @@ -33,6 +33,7 @@ class UserApi(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -49,7 +50,7 @@ class UserApi(object): Create user This can only be done by the logged in user. - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -124,7 +125,7 @@ class UserApi(object): Creates list of users with given input array - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -199,7 +200,7 @@ class UserApi(object): Creates list of users with given input array - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -274,7 +275,7 @@ class UserApi(object): Logs user into the system - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -352,7 +353,7 @@ class UserApi(object): Logs out current logged in user session - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -424,7 +425,7 @@ class UserApi(object): Get user by user name - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -502,7 +503,7 @@ class UserApi(object): Updated user This can only be done by the logged in user. - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): @@ -583,7 +584,7 @@ class UserApi(object): Delete user This can only be done by the logged in user. - This method makes a synchronous HTTP request by default.To make an + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): diff --git a/samples/client/petstore/python/swagger_client/configuration.py b/samples/client/petstore/python/swagger_client/configuration.py index 6bc58c90aea..b253f561abe 100644 --- a/samples/client/petstore/python/swagger_client/configuration.py +++ b/samples/client/petstore/python/swagger_client/configuration.py @@ -14,6 +14,8 @@ Copyright 2015 SmartBear Software 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 __future__ import absolute_import @@ -44,7 +46,7 @@ def singleton(cls, *args, **kw): class Configuration(object): """ NOTE: This class is auto generated by the swagger code generator program. - https://github.com/swagger-api/swagger-codegen + Ref: https://github.com/swagger-api/swagger-codegen Do not edit the class manually. """ @@ -56,7 +58,7 @@ class Configuration(object): self.host = "http://petstore.swagger.io/v2" # Default api client self.api_client = None - # Temp file folder for download + # Temp file folder for downloading files self.temp_folder_path = None # Authentication Settings @@ -139,7 +141,7 @@ class Configuration(object): def get_basic_auth_token(self): """ - Gets basic auth header string. + Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. """ diff --git a/samples/client/petstore/python/swagger_client/models/category.py b/samples/client/petstore/python/swagger_client/models/category.py index bf70a7d10fd..06ad3b8421f 100644 --- a/samples/client/petstore/python/swagger_client/models/category.py +++ b/samples/client/petstore/python/swagger_client/models/category.py @@ -14,6 +14,8 @@ Copyright 2015 SmartBear Software 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 @@ -27,7 +29,7 @@ class Category(object): """ def __init__(self): """ - Swagger model + Category - a model defined in Swagger :param dict swaggerTypes: The key is attribute name and the value is attribute type. @@ -93,7 +95,7 @@ class Category(object): def to_dict(self): """ - Return model properties dict + Returns the model properties as a dict """ result = {} @@ -113,7 +115,7 @@ class Category(object): def to_str(self): """ - Return model properties str + Returns the string representation of the model """ return pformat(self.to_dict()) diff --git a/samples/client/petstore/python/swagger_client/models/order.py b/samples/client/petstore/python/swagger_client/models/order.py index 1a7612df190..40e4504de87 100644 --- a/samples/client/petstore/python/swagger_client/models/order.py +++ b/samples/client/petstore/python/swagger_client/models/order.py @@ -14,6 +14,8 @@ Copyright 2015 SmartBear Software 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 @@ -27,7 +29,7 @@ class Order(object): """ def __init__(self): """ - Swagger model + Order - a model defined in Swagger :param dict swaggerTypes: The key is attribute name and the value is attribute type. @@ -199,7 +201,7 @@ class Order(object): def to_dict(self): """ - Return model properties dict + Returns the model properties as a dict """ result = {} @@ -219,7 +221,7 @@ class Order(object): def to_str(self): """ - Return model properties str + Returns the string representation of the model """ return pformat(self.to_dict()) diff --git a/samples/client/petstore/python/swagger_client/models/pet.py b/samples/client/petstore/python/swagger_client/models/pet.py index cda4fa1e8cd..d8700908eb7 100644 --- a/samples/client/petstore/python/swagger_client/models/pet.py +++ b/samples/client/petstore/python/swagger_client/models/pet.py @@ -14,6 +14,8 @@ Copyright 2015 SmartBear Software 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 @@ -27,7 +29,7 @@ class Pet(object): """ def __init__(self): """ - Swagger model + Pet - a model defined in Swagger :param dict swaggerTypes: The key is attribute name and the value is attribute type. @@ -199,7 +201,7 @@ class Pet(object): def to_dict(self): """ - Return model properties dict + Returns the model properties as a dict """ result = {} @@ -219,7 +221,7 @@ class Pet(object): def to_str(self): """ - Return model properties str + Returns the string representation of the model """ return pformat(self.to_dict()) diff --git a/samples/client/petstore/python/swagger_client/models/tag.py b/samples/client/petstore/python/swagger_client/models/tag.py index 8108052aae3..262fc10f338 100644 --- a/samples/client/petstore/python/swagger_client/models/tag.py +++ b/samples/client/petstore/python/swagger_client/models/tag.py @@ -14,6 +14,8 @@ Copyright 2015 SmartBear Software 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 @@ -27,7 +29,7 @@ class Tag(object): """ def __init__(self): """ - Swagger model + Tag - a model defined in Swagger :param dict swaggerTypes: The key is attribute name and the value is attribute type. @@ -93,7 +95,7 @@ class Tag(object): def to_dict(self): """ - Return model properties dict + Returns the model properties as a dict """ result = {} @@ -113,7 +115,7 @@ class Tag(object): def to_str(self): """ - Return model properties str + Returns the string representation of the model """ return pformat(self.to_dict()) diff --git a/samples/client/petstore/python/swagger_client/models/user.py b/samples/client/petstore/python/swagger_client/models/user.py index 576473adcfa..7f74d20f3d3 100644 --- a/samples/client/petstore/python/swagger_client/models/user.py +++ b/samples/client/petstore/python/swagger_client/models/user.py @@ -14,6 +14,8 @@ Copyright 2015 SmartBear Software 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 @@ -27,7 +29,7 @@ class User(object): """ def __init__(self): """ - Swagger model + User - a model defined in Swagger :param dict swaggerTypes: The key is attribute name and the value is attribute type. @@ -243,7 +245,7 @@ class User(object): def to_dict(self): """ - Return model properties dict + Returns the model properties as a dict """ result = {} @@ -263,7 +265,7 @@ class User(object): def to_str(self): """ - Return model properties str + Returns the string representation of the model """ return pformat(self.to_dict())