forked from loafle/openapi-generator-original
Update comments of python client
This commit is contained in:
parent
ddfa713f55
commit
195c71da37
@ -50,18 +50,15 @@ class {{classname}}(object):
|
||||
{{{summary}}}
|
||||
{{{notes}}}
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.{{nickname}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
{{#allParams}}
|
||||
|
@ -48,18 +48,15 @@ class PetApi(object):
|
||||
Update an existing pet
|
||||
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.update_pet(callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param Pet body: Pet object that needs to be added to the store
|
||||
@ -127,18 +124,15 @@ class PetApi(object):
|
||||
Add a new pet to the store
|
||||
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.add_pet(callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param Pet body: Pet object that needs to be added to the store
|
||||
@ -206,18 +200,15 @@ class PetApi(object):
|
||||
Finds Pets by status
|
||||
Multiple status values can be provided with comma seperated strings
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.find_pets_by_status(callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param list[str] status: Status values that need to be considered for filter
|
||||
@ -285,18 +276,15 @@ class PetApi(object):
|
||||
Finds Pets by tags
|
||||
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.find_pets_by_tags(callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param list[str] tags: Tags to filter by
|
||||
@ -364,18 +352,15 @@ class PetApi(object):
|
||||
Find pet by ID
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.get_pet_by_id(pet_id, callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param int pet_id: ID of pet that needs to be fetched (required)
|
||||
@ -446,18 +431,15 @@ class PetApi(object):
|
||||
Updates a pet in the store with form data
|
||||
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.update_pet_with_form(pet_id, callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param str pet_id: ID of pet that needs to be updated (required)
|
||||
@ -534,18 +516,15 @@ class PetApi(object):
|
||||
Deletes a pet
|
||||
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.delete_pet(pet_id, callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param int pet_id: Pet id to delete (required)
|
||||
@ -619,18 +598,15 @@ class PetApi(object):
|
||||
uploads an image
|
||||
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.upload_file(pet_id, callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param int pet_id: ID of pet to update (required)
|
||||
|
@ -48,18 +48,15 @@ class StoreApi(object):
|
||||
Returns pet inventories by status
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.get_inventory(callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:return: dict(str, int)
|
||||
@ -124,18 +121,15 @@ class StoreApi(object):
|
||||
Place an order for a pet
|
||||
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.place_order(callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param Order body: order placed for purchasing the pet
|
||||
@ -203,18 +197,15 @@ class StoreApi(object):
|
||||
Find purchase order by ID
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.get_order_by_id(order_id, callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param str order_id: ID of pet that needs to be fetched (required)
|
||||
@ -285,18 +276,15 @@ 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
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.delete_order(order_id, callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param str order_id: ID of the order that needs to be deleted (required)
|
||||
|
@ -48,18 +48,15 @@ class UserApi(object):
|
||||
Create user
|
||||
This can only be done by the logged in user.
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.create_user(callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param User body: Created user object
|
||||
@ -127,18 +124,15 @@ class UserApi(object):
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.create_users_with_array_input(callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param list[User] body: List of user object
|
||||
@ -206,18 +200,15 @@ class UserApi(object):
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.create_users_with_list_input(callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param list[User] body: List of user object
|
||||
@ -285,18 +276,15 @@ class UserApi(object):
|
||||
Logs user into the system
|
||||
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.login_user(callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param str username: The user name for login
|
||||
@ -367,18 +355,15 @@ class UserApi(object):
|
||||
Logs out current logged in user session
|
||||
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.logout_user(callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:return: None
|
||||
@ -443,18 +428,15 @@ class UserApi(object):
|
||||
Get user by user name
|
||||
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.get_user_by_name(username, callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param str username: The name that needs to be fetched. Use user1 for testing. (required)
|
||||
@ -525,18 +507,15 @@ class UserApi(object):
|
||||
Updated user
|
||||
This can only be done by the logged in user.
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.update_user(username, callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param str username: name that need to be deleted (required)
|
||||
@ -610,18 +589,15 @@ class UserApi(object):
|
||||
Delete user
|
||||
This can only be done by the logged in user.
|
||||
|
||||
SDK also supports asynchronous requests
|
||||
in which you can define a `callback` function
|
||||
to be passed along and invoked when receiving response:
|
||||
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):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.delete_user(username, callback=callback_function)
|
||||
|
||||
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.
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param str username: The name that needs to be deleted (required)
|
||||
|
Loading…
x
Reference in New Issue
Block a user