From c9889c5baffb0f38f3ce361afb260c9f70b79b05 Mon Sep 17 00:00:00 2001 From: geekerzp Date: Sat, 18 Jul 2015 15:03:55 +0800 Subject: [PATCH] Update api template of python client --- .../src/main/resources/python/api.mustache | 2 +- .../python/swagger_client/apis/pet_api.py | 18 +++++++++--------- .../python/swagger_client/apis/store_api.py | 2 +- .../python/swagger_client/apis/user_api.py | 12 ++++++------ 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/python/api.mustache b/modules/swagger-codegen/src/main/resources/python/api.mustache index 94f5af1ffcc..5f738432c25 100644 --- a/modules/swagger-codegen/src/main/resources/python/api.mustache +++ b/modules/swagger-codegen/src/main/resources/python/api.mustache @@ -61,7 +61,7 @@ class {{classname}}(object): :param callback function: The callback function for asynchronous request. (optional) {{#allParams}} - :param {{dataType}} {{paramName}}: {{{description}}} {{#required}}(required){{/required}}{{#optional}}(optional){{/optional}} + :param {{dataType}} {{paramName}}: {{{description}}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}} {{/allParams}} :return: {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}None{{/returnType}} If the method is called asynchronously, 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 ad70dac30b3..02d9e647917 100644 --- a/samples/client/petstore/python/swagger_client/apis/pet_api.py +++ b/samples/client/petstore/python/swagger_client/apis/pet_api.py @@ -58,7 +58,7 @@ class PetApi(object): :param callback function: The callback function for asynchronous request. (optional) - :param Pet body: Pet object that needs to be added to the store + :param Pet body: Pet object that needs to be added to the store :return: None If the method is called asynchronously, returns the request thread. @@ -133,7 +133,7 @@ class PetApi(object): :param callback function: The callback function for asynchronous request. (optional) - :param Pet body: Pet object that needs to be added to the store + :param Pet body: Pet object that needs to be added to the store :return: None If the method is called asynchronously, returns the request thread. @@ -208,7 +208,7 @@ class PetApi(object): :param callback function: The callback function for asynchronous request. (optional) - :param list[str] status: Status values that need to be considered for filter + :param list[str] status: Status values that need to be considered for filter :return: list[Pet] If the method is called asynchronously, returns the request thread. @@ -283,7 +283,7 @@ class PetApi(object): :param callback function: The callback function for asynchronous request. (optional) - :param list[str] tags: Tags to filter by + :param list[str] tags: Tags to filter by :return: list[Pet] If the method is called asynchronously, returns the request thread. @@ -437,8 +437,8 @@ class PetApi(object): :param callback function: The callback function for asynchronous request. (optional) :param str pet_id: ID of pet that needs to be updated (required) - :param str name: Updated name of the pet - :param str status: Updated status of the pet + :param str name: Updated name of the pet + :param str status: Updated status of the pet :return: None If the method is called asynchronously, returns the request thread. @@ -521,7 +521,7 @@ class PetApi(object): :param callback function: The callback function for asynchronous request. (optional) :param int pet_id: Pet id to delete (required) - :param str api_key: + :param str api_key: :return: None If the method is called asynchronously, returns the request thread. @@ -602,8 +602,8 @@ class PetApi(object): :param callback function: The callback function for asynchronous request. (optional) :param int pet_id: ID of pet to update (required) - :param str additional_metadata: Additional data to pass to server - :param file file: file to upload + :param str additional_metadata: Additional data to pass to server + :param file file: file to upload :return: None If the method is called asynchronously, returns the request thread. 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 589362cdddd..40b57b0b619 100644 --- a/samples/client/petstore/python/swagger_client/apis/store_api.py +++ b/samples/client/petstore/python/swagger_client/apis/store_api.py @@ -130,7 +130,7 @@ class StoreApi(object): :param callback function: The callback function for asynchronous request. (optional) - :param Order body: order placed for purchasing the pet + :param Order body: order placed for purchasing the pet :return: Order If the method is called asynchronously, returns the request thread. 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 5d28a5419ec..fb0898cf782 100644 --- a/samples/client/petstore/python/swagger_client/apis/user_api.py +++ b/samples/client/petstore/python/swagger_client/apis/user_api.py @@ -58,7 +58,7 @@ class UserApi(object): :param callback function: The callback function for asynchronous request. (optional) - :param User body: Created user object + :param User body: Created user object :return: None If the method is called asynchronously, returns the request thread. @@ -133,7 +133,7 @@ class UserApi(object): :param callback function: The callback function for asynchronous request. (optional) - :param list[User] body: List of user object + :param list[User] body: List of user object :return: None If the method is called asynchronously, returns the request thread. @@ -208,7 +208,7 @@ class UserApi(object): :param callback function: The callback function for asynchronous request. (optional) - :param list[User] body: List of user object + :param list[User] body: List of user object :return: None If the method is called asynchronously, returns the request thread. @@ -283,8 +283,8 @@ class UserApi(object): :param callback function: The callback function for asynchronous request. (optional) - :param str username: The user name for login - :param str password: The password for login in clear text + :param str username: The user name for login + :param str password: The password for login in clear text :return: str If the method is called asynchronously, returns the request thread. @@ -512,7 +512,7 @@ class UserApi(object): :param callback function: The callback function for asynchronous request. (optional) :param str username: name that need to be deleted (required) - :param User body: Updated user object + :param User body: Updated user object :return: None If the method is called asynchronously, returns the request thread.