[Python] Fixed docstrings in api.mustache (#6391)

* [Python] Fixed docstrings

Fixes https://github.com/swagger-api/swagger-codegen/issues/9630

* Updated generated files

* Fixed python-experimental

* Updated generated files

* Fully fixed the format of the docstrings

* Updated generated files

* Updated generated files in openapi3
This commit is contained in:
Alexey Volkov
2020-06-04 08:46:35 -07:00
committed by GitHub
parent e708cdc83e
commit 6f6c8ede79
240 changed files with 3920 additions and 1882 deletions

View File

@@ -59,6 +59,7 @@ class AnotherFakeApi(object):
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.call_123_test_special_tags(body, async_req=True)
>>> result = thread.get()

View File

@@ -65,6 +65,7 @@ class FakeApi(object):
this route creates an XmlItem # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_xml_item(xml_item, async_req=True)
>>> result = thread.get()
@@ -184,6 +185,7 @@ class FakeApi(object):
Test serialization of outer boolean types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.fake_outer_boolean_serialize(async_req=True)
>>> result = thread.get()
@@ -293,6 +295,7 @@ class FakeApi(object):
Test serialization of object with outer number type # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.fake_outer_composite_serialize(async_req=True)
>>> result = thread.get()
@@ -402,6 +405,7 @@ class FakeApi(object):
Test serialization of outer enum # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.fake_outer_enum_serialize(async_req=True)
>>> result = thread.get()
@@ -511,6 +515,7 @@ class FakeApi(object):
Test serialization of outer number types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.fake_outer_number_serialize(async_req=True)
>>> result = thread.get()
@@ -620,6 +625,7 @@ class FakeApi(object):
Test serialization of outer string types # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.fake_outer_string_serialize(async_req=True)
>>> result = thread.get()
@@ -730,6 +736,7 @@ class FakeApi(object):
For this test, the body for this request much reference a schema named `File`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_body_with_file_schema(body, async_req=True)
>>> result = thread.get()
@@ -845,6 +852,7 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_body_with_query_params(query, body, async_req=True)
>>> result = thread.get()
@@ -969,6 +977,7 @@ class FakeApi(object):
To test \"client\" model # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_client_model(body, async_req=True)
>>> result = thread.get()
@@ -1090,6 +1099,7 @@ class FakeApi(object):
This route has required values with enums of 1 # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_endpoint_enums_length_one(query_integer=3, query_string='brillig', path_string='hello', path_integer=34, header_number=1.234, async_req=True)
>>> result = thread.get()
@@ -1268,6 +1278,7 @@ class FakeApi(object):
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async_req=True)
>>> result = thread.get()
@@ -1521,6 +1532,7 @@ class FakeApi(object):
To test enum parameters # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_enum_parameters(async_req=True)
>>> result = thread.get()
@@ -1730,6 +1742,7 @@ class FakeApi(object):
Fake endpoint to test group parameters (optional) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, async_req=True)
>>> result = thread.get()
@@ -1879,6 +1892,7 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_inline_additional_properties(param, async_req=True)
>>> result = thread.get()
@@ -1994,6 +2008,7 @@ class FakeApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_json_form_data(param, param2, async_req=True)
>>> result = thread.get()

View File

@@ -59,6 +59,7 @@ class FakeClassnameTags123Api(object):
To test class name in snake case # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_classname(body, async_req=True)
>>> result = thread.get()

View File

@@ -59,6 +59,7 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_pet(body, async_req=True)
>>> result = thread.get()
@@ -176,6 +177,7 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_pet(pet_id, async_req=True)
>>> result = thread.get()
@@ -298,6 +300,7 @@ class PetApi(object):
Multiple status values can be provided with comma separated strings # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.find_pets_by_status(status, async_req=True)
>>> result = thread.get()
@@ -425,6 +428,7 @@ class PetApi(object):
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.find_pets_by_tags(tags, async_req=True)
>>> result = thread.get()
@@ -545,6 +549,7 @@ class PetApi(object):
Returns a single pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_pet_by_id(pet_id, async_req=True)
>>> result = thread.get()
@@ -663,6 +668,7 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_pet(body, async_req=True)
>>> result = thread.get()
@@ -780,6 +786,7 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_pet_with_form(pet_id, async_req=True)
>>> result = thread.get()
@@ -909,6 +916,7 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.upload_file(pet_id, async_req=True)
>>> result = thread.get()
@@ -1048,6 +1056,7 @@ class PetApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.upload_file_with_required_file(pet_id, required_file, async_req=True)
>>> result = thread.get()

View File

@@ -59,6 +59,7 @@ class StoreApi(object):
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order(order_id, async_req=True)
>>> result = thread.get()
@@ -172,6 +173,7 @@ class StoreApi(object):
Returns a map of status codes to quantities # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_inventory(async_req=True)
>>> result = thread.get()
@@ -279,6 +281,7 @@ class StoreApi(object):
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order_by_id(order_id, async_req=True)
>>> result = thread.get()
@@ -401,6 +404,7 @@ class StoreApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.place_order(body, async_req=True)
>>> result = thread.get()

View File

@@ -59,6 +59,7 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_user(body, async_req=True)
>>> result = thread.get()
@@ -171,6 +172,7 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_users_with_array_input(body, async_req=True)
>>> result = thread.get()
@@ -283,6 +285,7 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_users_with_list_input(body, async_req=True)
>>> result = thread.get()
@@ -396,6 +399,7 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_user(username, async_req=True)
>>> result = thread.get()
@@ -509,6 +513,7 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_user_by_name(username, async_req=True)
>>> result = thread.get()
@@ -626,6 +631,7 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.login_user(username, password, async_req=True)
>>> result = thread.get()
@@ -750,6 +756,7 @@ class UserApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.logout_user(async_req=True)
>>> result = thread.get()
@@ -854,6 +861,7 @@ class UserApi(object):
This can only be done by the logged in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_user(username, body, async_req=True)
>>> result = thread.get()

View File

@@ -279,6 +279,7 @@ class ApiClient(object):
({str: (bool, str, int, float, date, datetime, str, none_type)},)
:param _check_type: boolean, whether to check the types of the data
received from the server
:type _check_type: bool
:return: deserialized object.
"""
@@ -338,22 +339,28 @@ class ApiClient(object):
(float, none_type)
([int, none_type],)
({str: (bool, str, int, float, date, datetime, str, none_type)},)
:param files dict: key -> field name, value -> a list of open file
:param files: key -> field name, value -> a list of open file
objects for `multipart/form-data`.
:type files: dict
:param async_req bool: execute request asynchronously
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param collection_formats: dict of collection formats for path, query,
header, and post parameters.
:type collection_formats: dict, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _check_type: boolean describing if the data back from the server
should have its type checked.
:type _check_type: bool, optional
:return:
If async_req parameter is True,
the request will be called asynchronously.
@@ -547,9 +554,9 @@ class ApiClient(object):
:param headers: Header parameters dict to be updated.
:param querys: Query parameters tuple list to be updated.
:param auth_settings: Authentication setting identifiers list.
:resource_path: A string representation of the HTTP request resource path.
:method: A string representation of the HTTP request method.
:body: A object representing the body of the HTTP request.
:param resource_path: A string representation of the HTTP request resource path.
:param method: A string representation of the HTTP request method.
:param body: A object representing the body of the HTTP request.
The object type is the return value of sanitize_for_serialization().
"""
if not auth_settings: