From 9df29d34448b5b373bc99fa7ad987562459adb2c Mon Sep 17 00:00:00 2001 From: Tomasz Prus Date: Sun, 8 Jul 2018 00:52:03 +0200 Subject: [PATCH 1/2] feat: support for python3.7 --- .../src/main/resources/python/api.mustache | 22 +- .../main/resources/python/api_client.mustache | 12 +- .../client/petstore/python-asyncio/README.md | 4 +- .../petstore/python-asyncio/docs/EnumTest.md | 1 + .../petstore/python-asyncio/docs/FakeApi.md | 59 +++- .../python-asyncio/docs/FormatTest.md | 4 +- .../petstore_api/api/another_fake_api.py | 18 +- .../petstore_api/api/fake_api.py | 285 ++++++++++++------ .../api/fake_classname_tags_123_api.py | 18 +- .../petstore_api/api/pet_api.py | 144 ++++----- .../petstore_api/api/store_api.py | 72 ++--- .../petstore_api/api/user_api.py | 144 ++++----- .../python-asyncio/petstore_api/api_client.py | 12 +- .../petstore_api/models/enum_test.py | 35 ++- .../petstore_api/models/format_test.py | 68 ++--- samples/client/petstore/python/.travis.yml | 2 + samples/client/petstore/python/README.md | 4 +- .../client/petstore/python/docs/EnumTest.md | 1 + .../client/petstore/python/docs/FakeApi.md | 59 +++- .../client/petstore/python/docs/FormatTest.md | 4 +- .../petstore_api/api/another_fake_api.py | 18 +- .../python/petstore_api/api/fake_api.py | 285 ++++++++++++------ .../api/fake_classname_tags_123_api.py | 18 +- .../python/petstore_api/api/pet_api.py | 144 ++++----- .../python/petstore_api/api/store_api.py | 72 ++--- .../python/petstore_api/api/user_api.py | 144 ++++----- .../python/petstore_api/api_client.py | 12 +- .../python/petstore_api/models/enum_test.py | 35 ++- .../python/petstore_api/models/format_test.py | 68 ++--- .../python/tests/test_deserialization.py | 2 + .../petstore/python/tests/test_pet_api.py | 14 +- 31 files changed, 1076 insertions(+), 704 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/python/api.mustache b/modules/swagger-codegen/src/main/resources/python/api.mustache index a65946f578d..878bbf69bdb 100644 --- a/modules/swagger-codegen/src/main/resources/python/api.mustache +++ b/modules/swagger-codegen/src/main/resources/python/api.mustache @@ -33,16 +33,16 @@ class {{classname}}(object): {{{notes}}} # noqa: E501 {{/notes}} This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True + asynchronous HTTP request, please pass async_req=True {{#sortParamsByRequiredFlag}} - >>> thread = api.{{operationId}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}async=True) + >>> thread = api.{{operationId}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}async_req=True) {{/sortParamsByRequiredFlag}} {{^sortParamsByRequiredFlag}} - >>> thread = api.{{operationId}}({{#allParams}}{{#required}}{{paramName}}={{paramName}}_value, {{/required}}{{/allParams}}async=True) + >>> thread = api.{{operationId}}({{#allParams}}{{#required}}{{paramName}}={{paramName}}_value, {{/required}}{{/allParams}}async_req=True) {{/sortParamsByRequiredFlag}} >>> result = thread.get() - :param async bool + :param async_req bool {{#allParams}} :param {{dataType}} {{paramName}}:{{#description}} {{{description}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}} {{/allParams}} @@ -51,7 +51,7 @@ class {{classname}}(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs) # noqa: E501 else: (data) = self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs) # noqa: E501 @@ -64,16 +64,16 @@ class {{classname}}(object): {{{notes}}} # noqa: E501 {{/notes}} This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True + asynchronous HTTP request, please pass async_req=True {{#sortParamsByRequiredFlag}} - >>> thread = api.{{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}async=True) + >>> thread = api.{{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}async_req=True) {{/sortParamsByRequiredFlag}} {{^sortParamsByRequiredFlag}} - >>> thread = api.{{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}={{paramName}}_value, {{/required}}{{/allParams}}async=True) + >>> thread = api.{{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}={{paramName}}_value, {{/required}}{{/allParams}}async_req=True) {{/sortParamsByRequiredFlag}} >>> result = thread.get() - :param async bool + :param async_req bool {{#allParams}} :param {{dataType}} {{paramName}}:{{#description}} {{{description}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/optional}} {{/allParams}} @@ -83,7 +83,7 @@ class {{classname}}(object): """ all_params = [{{#allParams}}'{{paramName}}'{{#hasMore}}, {{/hasMore}}{{/allParams}}] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -205,7 +205,7 @@ class {{classname}}(object): files=local_var_files, response_type={{#returnType}}'{{returnType}}'{{/returnType}}{{^returnType}}None{{/returnType}}, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), 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 a6df41b072a..11a88cefb28 100644 --- a/modules/swagger-codegen/src/main/resources/python/api_client.mustache +++ b/modules/swagger-codegen/src/main/resources/python/api_client.mustache @@ -280,12 +280,12 @@ class ApiClient(object): def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async=None, + response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None): """Makes the HTTP request (synchronous) and returns deserialized data. - To make an async request, set the async parameter. + To make an async request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. @@ -300,7 +300,7 @@ class ApiClient(object): :param response: Response data type. :param files dict: key -> filename, value -> filepath, for `multipart/form-data`. - :param async bool: execute request asynchronously + :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param collection_formats: dict of collection formats for path, query, @@ -313,13 +313,13 @@ class ApiClient(object): timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: - If async parameter is True, + If async_req parameter is True, the request will be called asynchronously. The method will return the request thread. - If parameter async is False or missing, + If parameter async_req is False or missing, then the method will return the response directly. """ - if not async: + if not async_req: return self.__call_api(resource_path, method, path_params, query_params, header_params, body, post_params, files, diff --git a/samples/client/petstore/python-asyncio/README.md b/samples/client/petstore/python-asyncio/README.md index a49d99c556c..cab8b4c968d 100644 --- a/samples/client/petstore/python-asyncio/README.md +++ b/samples/client/petstore/python-asyncio/README.md @@ -50,8 +50,9 @@ import time import petstore_api from petstore_api.rest import ApiException from pprint import pprint + # create an instance of the API class -api_instance = petstore_api.AnotherFakeApi() +api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration)) body = petstore_api.Client() # Client | client model try: @@ -74,6 +75,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**fake_outer_composite_serialize**](docs/FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite | *FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | *FakeApi* | [**fake_outer_string_serialize**](docs/FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | +*FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | *FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters diff --git a/samples/client/petstore/python-asyncio/docs/EnumTest.md b/samples/client/petstore/python-asyncio/docs/EnumTest.md index 94dd4864629..c4c1630250f 100644 --- a/samples/client/petstore/python-asyncio/docs/EnumTest.md +++ b/samples/client/petstore/python-asyncio/docs/EnumTest.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **enum_string** | **str** | | [optional] +**enum_string_required** | **str** | | **enum_integer** | **int** | | [optional] **enum_number** | **float** | | [optional] **outer_enum** | [**OuterEnum**](OuterEnum.md) | | [optional] diff --git a/samples/client/petstore/python-asyncio/docs/FakeApi.md b/samples/client/petstore/python-asyncio/docs/FakeApi.md index 1da84500bfe..37539a02aa6 100644 --- a/samples/client/petstore/python-asyncio/docs/FakeApi.md +++ b/samples/client/petstore/python-asyncio/docs/FakeApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**fake_outer_composite_serialize**](FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite | [**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | [**fake_outer_string_serialize**](FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | +[**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model [**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters @@ -203,6 +204,52 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_body_with_query_params** +> test_body_with_query_params(body, query) + + + +### Example +```python +from __future__ import print_function +import time +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = petstore_api.FakeApi() +body = petstore_api.User() # User | +query = 'query_example' # str | + +try: + api_instance.test_body_with_query_params(body, query) +except ApiException as e: + print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md)| | + **query** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_client_model** > Client test_client_model(body) @@ -252,7 +299,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **test_endpoint_parameters** -> test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) +> test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, _float=_float, string=string, binary=binary, _date=_date, date_time=date_time, password=password, param_callback=param_callback) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -280,17 +327,17 @@ byte = 'B' # str | None integer = 56 # int | None (optional) int32 = 56 # int | None (optional) int64 = 789 # int | None (optional) -float = 3.4 # float | None (optional) +_float = 3.4 # float | None (optional) string = 'string_example' # str | None (optional) binary = 'B' # str | None (optional) -date = '2013-10-20' # date | None (optional) +_date = '2013-10-20' # date | None (optional) date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional) password = 'password_example' # str | None (optional) param_callback = 'param_callback_example' # str | None (optional) try: # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) + api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, _float=_float, string=string, binary=binary, _date=_date, date_time=date_time, password=password, param_callback=param_callback) except ApiException as e: print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) ``` @@ -306,10 +353,10 @@ Name | Type | Description | Notes **integer** | **int**| None | [optional] **int32** | **int**| None | [optional] **int64** | **int**| None | [optional] - **float** | **float**| None | [optional] + **_float** | **float**| None | [optional] **string** | **str**| None | [optional] **binary** | **str**| None | [optional] - **date** | **date**| None | [optional] + **_date** | **date**| None | [optional] **date_time** | **datetime**| None | [optional] **password** | **str**| None | [optional] **param_callback** | **str**| None | [optional] diff --git a/samples/client/petstore/python-asyncio/docs/FormatTest.md b/samples/client/petstore/python-asyncio/docs/FormatTest.md index 3e489e863fa..2026ed877f8 100644 --- a/samples/client/petstore/python-asyncio/docs/FormatTest.md +++ b/samples/client/petstore/python-asyncio/docs/FormatTest.md @@ -7,12 +7,12 @@ Name | Type | Description | Notes **int32** | **int** | | [optional] **int64** | **int** | | [optional] **number** | **float** | | -**float** | **float** | | [optional] +**_float** | **float** | | [optional] **double** | **float** | | [optional] **string** | **str** | | [optional] **byte** | **str** | | **binary** | **str** | | [optional] -**date** | **date** | | +**_date** | **date** | | **date_time** | **datetime** | | [optional] **uuid** | **str** | | [optional] **password** | **str** | | diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py index 0096dad1a37..955369935ea 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py @@ -38,18 +38,18 @@ def test_special_tags(self, body, **kwargs): # noqa: E501 To test special tags # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_special_tags(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_special_tags(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Client body: client model (required) :return: Client If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.test_special_tags_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.test_special_tags_with_http_info(body, **kwargs) # noqa: E501 @@ -60,11 +60,11 @@ def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501 To test special tags # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_special_tags_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_special_tags_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Client body: client model (required) :return: Client If the method is called asynchronously, @@ -72,7 +72,7 @@ def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -126,7 +126,7 @@ def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py index 4c52ee51647..226d751bb2c 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py @@ -38,18 +38,18 @@ def fake_outer_boolean_serialize(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_boolean_serialize(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_boolean_serialize(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterBoolean body: Input boolean as post body :return: OuterBoolean If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 else: (data) = self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 @@ -60,11 +60,11 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_boolean_serialize_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_boolean_serialize_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterBoolean body: Input boolean as post body :return: OuterBoolean If the method is called asynchronously, @@ -72,7 +72,7 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -114,7 +114,7 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='OuterBoolean', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -125,18 +125,18 @@ def fake_outer_composite_serialize(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_composite_serialize(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_composite_serialize(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterComposite body: Input composite as post body :return: OuterComposite If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 else: (data) = self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 @@ -147,11 +147,11 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_composite_serialize_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_composite_serialize_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterComposite body: Input composite as post body :return: OuterComposite If the method is called asynchronously, @@ -159,7 +159,7 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -201,7 +201,7 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='OuterComposite', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -212,18 +212,18 @@ def fake_outer_number_serialize(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_number_serialize(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_number_serialize(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterNumber body: Input number as post body :return: OuterNumber If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 else: (data) = self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 @@ -234,11 +234,11 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_number_serialize_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_number_serialize_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterNumber body: Input number as post body :return: OuterNumber If the method is called asynchronously, @@ -246,7 +246,7 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -288,7 +288,7 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='OuterNumber', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -299,18 +299,18 @@ def fake_outer_string_serialize(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_string_serialize(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_string_serialize(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterString body: Input string as post body :return: OuterString If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 else: (data) = self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 @@ -321,11 +321,11 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_string_serialize_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_string_serialize_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterString body: Input string as post body :return: OuterString If the method is called asynchronously, @@ -333,7 +333,7 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -375,7 +375,108 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='OuterString', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def test_body_with_query_params(self, body, query, **kwargs): # noqa: E501 + """test_body_with_query_params # 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_query_params(body, query, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param User body: (required) + :param str query: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.test_body_with_query_params_with_http_info(body, query, **kwargs) # noqa: E501 + else: + (data) = self.test_body_with_query_params_with_http_info(body, query, **kwargs) # noqa: E501 + return data + + def test_body_with_query_params_with_http_info(self, body, query, **kwargs): # noqa: E501 + """test_body_with_query_params # 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_query_params_with_http_info(body, query, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param User body: (required) + :param str query: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'query'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method test_body_with_query_params" % key + ) + 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 `test_body_with_query_params`") # noqa: E501 + # verify the required parameter 'query' is set + if ('query' not in params or + params['query'] is None): + raise ValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'query' in params: + query_params.append(('query', params['query'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/fake/body-with-query-params', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -386,18 +487,18 @@ def test_client_model(self, body, **kwargs): # noqa: E501 To test \"client\" model # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_client_model(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_client_model(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Client body: client model (required) :return: Client If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.test_client_model_with_http_info(body, **kwargs) # noqa: E501 @@ -408,11 +509,11 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 To test \"client\" model # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_client_model_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_client_model_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Client body: client model (required) :return: Client If the method is called asynchronously, @@ -420,7 +521,7 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -474,7 +575,7 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -485,11 +586,11 @@ def test_endpoint_parameters(self, number, double, pattern_without_delimiter, by 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=True - >>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async=True) + 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() - :param async bool + :param async_req bool :param float number: None (required) :param float double: None (required) :param str pattern_without_delimiter: None (required) @@ -497,10 +598,10 @@ def test_endpoint_parameters(self, number, double, pattern_without_delimiter, by :param int integer: None :param int int32: None :param int int64: None - :param float float: None + :param float _float: None :param str string: None :param str binary: None - :param date date: None + :param date _date: None :param datetime date_time: None :param str password: None :param str param_callback: None @@ -509,7 +610,7 @@ def test_endpoint_parameters(self, number, double, pattern_without_delimiter, by returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 else: (data) = self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 @@ -520,11 +621,11 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou 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=True - >>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param float number: None (required) :param float double: None (required) :param str pattern_without_delimiter: None (required) @@ -532,10 +633,10 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou :param int integer: None :param int int32: None :param int int64: None - :param float float: None + :param float _float: None :param str string: None :param str binary: None - :param date date: None + :param date _date: None :param datetime date_time: None :param str password: None :param str param_callback: None @@ -544,8 +645,8 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou returns the request thread. """ - all_params = ['number', 'double', 'pattern_without_delimiter', 'byte', 'integer', 'int32', 'int64', 'float', 'string', 'binary', 'date', 'date_time', 'password', 'param_callback'] # noqa: E501 - all_params.append('async') + all_params = ['number', 'double', 'pattern_without_delimiter', 'byte', 'integer', 'int32', 'int64', '_float', 'string', 'binary', '_date', 'date_time', 'password', 'param_callback'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -594,8 +695,8 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501 if 'int32' in params and params['int32'] < 20: # noqa: E501 raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`") # noqa: E501 - if 'float' in params and params['float'] > 987.6: # noqa: E501 - raise ValueError("Invalid value for parameter `float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501 + if '_float' in params and params['_float'] > 987.6: # noqa: E501 + raise ValueError("Invalid value for parameter `_float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501 if 'string' in params and not re.search('[a-z]', params['string'], flags=re.IGNORECASE): # noqa: E501 raise ValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") # noqa: E501 if ('password' in params and @@ -622,8 +723,8 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou form_params.append(('int64', params['int64'])) # noqa: E501 if 'number' in params: form_params.append(('number', params['number'])) # noqa: E501 - if 'float' in params: - form_params.append(('float', params['float'])) # noqa: E501 + if '_float' in params: + form_params.append(('float', params['_float'])) # noqa: E501 if 'double' in params: form_params.append(('double', params['double'])) # noqa: E501 if 'string' in params: @@ -634,8 +735,8 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou form_params.append(('byte', params['byte'])) # noqa: E501 if 'binary' in params: form_params.append(('binary', params['binary'])) # noqa: E501 - if 'date' in params: - form_params.append(('date', params['date'])) # noqa: E501 + if '_date' in params: + form_params.append(('date', params['_date'])) # noqa: E501 if 'date_time' in params: form_params.append(('dateTime', params['date_time'])) # noqa: E501 if 'password' in params: @@ -665,7 +766,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -676,11 +777,11 @@ def test_enum_parameters(self, **kwargs): # noqa: E501 To test enum parameters # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_enum_parameters(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_enum_parameters(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[str] enum_form_string_array: Form parameter enum test (string array) :param str enum_form_string: Form parameter enum test (string) :param list[str] enum_header_string_array: Header parameter enum test (string array) @@ -694,7 +795,7 @@ def test_enum_parameters(self, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 else: (data) = self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 @@ -705,11 +806,11 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 To test enum parameters # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_enum_parameters_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_enum_parameters_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[str] enum_form_string_array: Form parameter enum test (string array) :param str enum_form_string: Form parameter enum test (string) :param list[str] enum_header_string_array: Header parameter enum test (string array) @@ -724,7 +825,7 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 """ all_params = ['enum_form_string_array', 'enum_form_string', 'enum_header_string_array', 'enum_header_string', 'enum_query_string_array', 'enum_query_string', 'enum_query_integer', 'enum_query_double'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -791,7 +892,7 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -802,18 +903,18 @@ def test_inline_additional_properties(self, param, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_inline_additional_properties(param, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_inline_additional_properties(param, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param object param: request body (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501 else: (data) = self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501 @@ -824,11 +925,11 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_inline_additional_properties_with_http_info(param, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_inline_additional_properties_with_http_info(param, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param object param: request body (required) :return: None If the method is called asynchronously, @@ -836,7 +937,7 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # """ all_params = ['param'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -886,7 +987,7 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -897,11 +998,11 @@ def test_json_form_data(self, param, param2, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_json_form_data(param, param2, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_json_form_data(param, param2, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str param: field1 (required) :param str param2: field2 (required) :return: None @@ -909,7 +1010,7 @@ def test_json_form_data(self, param, param2, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 else: (data) = self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 @@ -920,11 +1021,11 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_json_form_data_with_http_info(param, param2, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_json_form_data_with_http_info(param, param2, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str param: field1 (required) :param str param2: field2 (required) :return: None @@ -933,7 +1034,7 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: """ all_params = ['param', 'param2'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -989,7 +1090,7 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py index 230aa5ec4fc..8aa93d8dc32 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py @@ -38,18 +38,18 @@ def test_classname(self, body, **kwargs): # noqa: E501 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=True - >>> thread = api.test_classname(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_classname(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Client body: client model (required) :return: Client If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.test_classname_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.test_classname_with_http_info(body, **kwargs) # noqa: E501 @@ -60,11 +60,11 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 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=True - >>> thread = api.test_classname_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_classname_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Client body: client model (required) :return: Client If the method is called asynchronously, @@ -72,7 +72,7 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -126,7 +126,7 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py index ff1026f3fae..bf71e96eab6 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py @@ -38,18 +38,18 @@ def add_pet(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.add_pet(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_pet(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Pet body: Pet object that needs to be added to the store (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.add_pet_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.add_pet_with_http_info(body, **kwargs) # noqa: E501 @@ -60,11 +60,11 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.add_pet_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_pet_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Pet body: Pet object that needs to be added to the store (required) :return: None If the method is called asynchronously, @@ -72,7 +72,7 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -126,7 +126,7 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -137,11 +137,11 @@ def delete_pet(self, pet_id, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_pet(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_pet(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int pet_id: Pet id to delete (required) :param str api_key: :return: None @@ -149,7 +149,7 @@ def delete_pet(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 else: (data) = self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 @@ -160,11 +160,11 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_pet_with_http_info(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_pet_with_http_info(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int pet_id: Pet id to delete (required) :param str api_key: :return: None @@ -173,7 +173,7 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 """ all_params = ['pet_id', 'api_key'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -225,7 +225,7 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -236,18 +236,18 @@ def find_pets_by_status(self, status, **kwargs): # noqa: E501 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=True - >>> thread = api.find_pets_by_status(status, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_pets_by_status(status, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[str] status: Status values that need to be considered for filter (required) :return: list[Pet] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 else: (data) = self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 @@ -258,11 +258,11 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 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=True - >>> thread = api.find_pets_by_status_with_http_info(status, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_pets_by_status_with_http_info(status, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[str] status: Status values that need to be considered for filter (required) :return: list[Pet] If the method is called asynchronously, @@ -270,7 +270,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 """ all_params = ['status'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -321,7 +321,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 files=local_var_files, response_type='list[Pet]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -332,18 +332,18 @@ def find_pets_by_tags(self, tags, **kwargs): # noqa: E501 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=True - >>> thread = api.find_pets_by_tags(tags, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_pets_by_tags(tags, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[str] tags: Tags to filter by (required) :return: list[Pet] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 else: (data) = self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 @@ -354,11 +354,11 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 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=True - >>> thread = api.find_pets_by_tags_with_http_info(tags, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_pets_by_tags_with_http_info(tags, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[str] tags: Tags to filter by (required) :return: list[Pet] If the method is called asynchronously, @@ -366,7 +366,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 """ all_params = ['tags'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -417,7 +417,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 files=local_var_files, response_type='list[Pet]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -428,18 +428,18 @@ def get_pet_by_id(self, pet_id, **kwargs): # noqa: E501 Returns a single pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_pet_by_id(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_pet_by_id(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int pet_id: ID of pet to return (required) :return: Pet If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 else: (data) = self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 @@ -450,11 +450,11 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 Returns a single pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_pet_by_id_with_http_info(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_pet_by_id_with_http_info(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int pet_id: ID of pet to return (required) :return: Pet If the method is called asynchronously, @@ -462,7 +462,7 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 """ all_params = ['pet_id'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -512,7 +512,7 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type='Pet', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -523,18 +523,18 @@ def update_pet(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_pet(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_pet(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Pet body: Pet object that needs to be added to the store (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.update_pet_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.update_pet_with_http_info(body, **kwargs) # noqa: E501 @@ -545,11 +545,11 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_pet_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_pet_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Pet body: Pet object that needs to be added to the store (required) :return: None If the method is called asynchronously, @@ -557,7 +557,7 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -611,7 +611,7 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -622,11 +622,11 @@ def update_pet_with_form(self, pet_id, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_pet_with_form(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_pet_with_form(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int 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 @@ -635,7 +635,7 @@ def update_pet_with_form(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 else: (data) = self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 @@ -646,11 +646,11 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_pet_with_form_with_http_info(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_pet_with_form_with_http_info(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int 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 @@ -660,7 +660,7 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 """ all_params = ['pet_id', 'name', 'status'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -718,7 +718,7 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -729,11 +729,11 @@ def upload_file(self, pet_id, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.upload_file(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.upload_file(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :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 @@ -742,7 +742,7 @@ def upload_file(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 else: (data) = self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 @@ -753,11 +753,11 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.upload_file_with_http_info(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.upload_file_with_http_info(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :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 @@ -767,7 +767,7 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 """ all_params = ['pet_id', 'additional_metadata', 'file'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -825,7 +825,7 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type='ApiResponse', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py index ebb9a4eb27a..27e1f770192 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py @@ -38,18 +38,18 @@ def delete_order(self, order_id, **kwargs): # noqa: E501 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=True - >>> thread = api.delete_order(order_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_order(order_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str order_id: ID of the order that needs to be deleted (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 else: (data) = self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 @@ -60,11 +60,11 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 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=True - >>> thread = api.delete_order_with_http_info(order_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_order_with_http_info(order_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str order_id: ID of the order that needs to be deleted (required) :return: None If the method is called asynchronously, @@ -72,7 +72,7 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 """ all_params = ['order_id'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -122,7 +122,7 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -133,17 +133,17 @@ def get_inventory(self, **kwargs): # noqa: E501 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=True - >>> thread = api.get_inventory(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inventory(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :return: dict(str, int) If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_inventory_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_inventory_with_http_info(**kwargs) # noqa: E501 @@ -154,18 +154,18 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 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=True - >>> thread = api.get_inventory_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inventory_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :return: dict(str, int) If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -209,7 +209,7 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='dict(str, int)', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -220,18 +220,18 @@ def get_order_by_id(self, order_id, **kwargs): # noqa: E501 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=True - >>> thread = api.get_order_by_id(order_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_order_by_id(order_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int order_id: ID of pet that needs to be fetched (required) :return: Order If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 else: (data) = self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 @@ -242,11 +242,11 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 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=True - >>> thread = api.get_order_by_id_with_http_info(order_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_order_by_id_with_http_info(order_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int order_id: ID of pet that needs to be fetched (required) :return: Order If the method is called asynchronously, @@ -254,7 +254,7 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 """ all_params = ['order_id'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -308,7 +308,7 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 files=local_var_files, response_type='Order', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -319,18 +319,18 @@ def place_order(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.place_order(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.place_order(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Order body: order placed for purchasing the pet (required) :return: Order If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.place_order_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.place_order_with_http_info(body, **kwargs) # noqa: E501 @@ -341,11 +341,11 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.place_order_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.place_order_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Order body: order placed for purchasing the pet (required) :return: Order If the method is called asynchronously, @@ -353,7 +353,7 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -403,7 +403,7 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type='Order', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py index 1de89f28bb0..62a87f2e418 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py @@ -38,18 +38,18 @@ def create_user(self, body, **kwargs): # noqa: E501 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=True - >>> thread = api.create_user(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_user(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param User body: Created user object (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.create_user_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.create_user_with_http_info(body, **kwargs) # noqa: E501 @@ -60,11 +60,11 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 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=True - >>> thread = api.create_user_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_user_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param User body: Created user object (required) :return: None If the method is called asynchronously, @@ -72,7 +72,7 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -122,7 +122,7 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -133,18 +133,18 @@ def create_users_with_array_input(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_users_with_array_input(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_users_with_array_input(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[User] body: List of user object (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501 @@ -155,11 +155,11 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_users_with_array_input_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_users_with_array_input_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[User] body: List of user object (required) :return: None If the method is called asynchronously, @@ -167,7 +167,7 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -217,7 +217,7 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -228,18 +228,18 @@ def create_users_with_list_input(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_users_with_list_input(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_users_with_list_input(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[User] body: List of user object (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501 @@ -250,11 +250,11 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_users_with_list_input_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_users_with_list_input_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[User] body: List of user object (required) :return: None If the method is called asynchronously, @@ -262,7 +262,7 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -312,7 +312,7 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -323,18 +323,18 @@ def delete_user(self, username, **kwargs): # noqa: E501 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=True - >>> thread = api.delete_user(username, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user(username, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: The name that needs to be deleted (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.delete_user_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.delete_user_with_http_info(username, **kwargs) # noqa: E501 @@ -345,11 +345,11 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 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=True - >>> thread = api.delete_user_with_http_info(username, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_with_http_info(username, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: The name that needs to be deleted (required) :return: None If the method is called asynchronously, @@ -357,7 +357,7 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 """ all_params = ['username'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -407,7 +407,7 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -418,18 +418,18 @@ def get_user_by_name(self, username, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_user_by_name(username, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_by_name(username, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: The name that needs to be fetched. Use user1 for testing. (required) :return: User If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 @@ -440,11 +440,11 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_user_by_name_with_http_info(username, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_by_name_with_http_info(username, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: The name that needs to be fetched. Use user1 for testing. (required) :return: User If the method is called asynchronously, @@ -452,7 +452,7 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 """ all_params = ['username'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -502,7 +502,7 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 files=local_var_files, response_type='User', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -513,11 +513,11 @@ def login_user(self, username, password, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.login_user(username, password, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.login_user(username, password, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: The user name for login (required) :param str password: The password for login in clear text (required) :return: str @@ -525,7 +525,7 @@ def login_user(self, username, password, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 else: (data) = self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 @@ -536,11 +536,11 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.login_user_with_http_info(username, password, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.login_user_with_http_info(username, password, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: The user name for login (required) :param str password: The password for login in clear text (required) :return: str @@ -549,7 +549,7 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 """ all_params = ['username', 'password'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -605,7 +605,7 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -616,17 +616,17 @@ def logout_user(self, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.logout_user(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.logout_user(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.logout_user_with_http_info(**kwargs) # noqa: E501 else: (data) = self.logout_user_with_http_info(**kwargs) # noqa: E501 @@ -637,18 +637,18 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.logout_user_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.logout_user_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :return: None If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -692,7 +692,7 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -703,11 +703,11 @@ def update_user(self, username, body, **kwargs): # noqa: E501 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=True - >>> thread = api.update_user(username, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user(username, body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: name that need to be deleted (required) :param User body: Updated user object (required) :return: None @@ -715,7 +715,7 @@ def update_user(self, username, body, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501 else: (data) = self.update_user_with_http_info(username, body, **kwargs) # noqa: E501 @@ -726,11 +726,11 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 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=True - >>> thread = api.update_user_with_http_info(username, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_with_http_info(username, body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: name that need to be deleted (required) :param User body: Updated user object (required) :return: None @@ -739,7 +739,7 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 """ all_params = ['username', 'body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -795,7 +795,7 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), diff --git a/samples/client/petstore/python-asyncio/petstore_api/api_client.py b/samples/client/petstore/python-asyncio/petstore_api/api_client.py index 0a362e40039..23c38d6d15e 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api_client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api_client.py @@ -274,12 +274,12 @@ def __deserialize(self, data, klass): def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async=None, + response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None): """Makes the HTTP request (synchronous) and returns deserialized data. - To make an async request, set the async parameter. + To make an async request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. @@ -294,7 +294,7 @@ def call_api(self, resource_path, method, :param response: Response data type. :param files dict: key -> filename, value -> filepath, for `multipart/form-data`. - :param async bool: execute request asynchronously + :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param collection_formats: dict of collection formats for path, query, @@ -307,13 +307,13 @@ def call_api(self, resource_path, method, timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: - If async parameter is True, + If async_req parameter is True, the request will be called asynchronously. The method will return the request thread. - If parameter async is False or missing, + If parameter async_req is False or missing, then the method will return the response directly. """ - if not async: + if not async_req: return self.__call_api(resource_path, method, path_params, query_params, header_params, body, post_params, files, diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py index 1bb234764ab..565975d725c 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py @@ -34,6 +34,7 @@ class EnumTest(object): """ swagger_types = { 'enum_string': 'str', + 'enum_string_required': 'str', 'enum_integer': 'int', 'enum_number': 'float', 'outer_enum': 'OuterEnum' @@ -41,15 +42,17 @@ class EnumTest(object): attribute_map = { 'enum_string': 'enum_string', + 'enum_string_required': 'enum_string_required', 'enum_integer': 'enum_integer', 'enum_number': 'enum_number', 'outer_enum': 'outerEnum' } - def __init__(self, enum_string=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501 + def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501 """EnumTest - a model defined in Swagger""" # noqa: E501 self._enum_string = None + self._enum_string_required = None self._enum_integer = None self._enum_number = None self._outer_enum = None @@ -57,6 +60,7 @@ def __init__(self, enum_string=None, enum_integer=None, enum_number=None, outer_ if enum_string is not None: self.enum_string = enum_string + self.enum_string_required = enum_string_required if enum_integer is not None: self.enum_integer = enum_integer if enum_number is not None: @@ -91,6 +95,35 @@ def enum_string(self, enum_string): self._enum_string = enum_string + @property + def enum_string_required(self): + """Gets the enum_string_required of this EnumTest. # noqa: E501 + + + :return: The enum_string_required of this EnumTest. # noqa: E501 + :rtype: str + """ + return self._enum_string_required + + @enum_string_required.setter + def enum_string_required(self, enum_string_required): + """Sets the enum_string_required of this EnumTest. + + + :param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501 + :type: str + """ + if enum_string_required is None: + raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501 + allowed_values = ["UPPER", "lower", ""] # noqa: E501 + if enum_string_required not in allowed_values: + raise ValueError( + "Invalid value for `enum_string_required` ({0}), must be one of {1}" # noqa: E501 + .format(enum_string_required, allowed_values) + ) + + self._enum_string_required = enum_string_required + @property def enum_integer(self): """Gets the enum_integer of this EnumTest. # noqa: E501 diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py index 7974d732fda..467b4a2573d 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py @@ -35,12 +35,12 @@ class FormatTest(object): 'int32': 'int', 'int64': 'int', 'number': 'float', - 'float': 'float', + '_float': 'float', 'double': 'float', 'string': 'str', 'byte': 'str', 'binary': 'str', - 'date': 'date', + '_date': 'date', 'date_time': 'datetime', 'uuid': 'str', 'password': 'str' @@ -51,30 +51,30 @@ class FormatTest(object): 'int32': 'int32', 'int64': 'int64', 'number': 'number', - 'float': 'float', + '_float': 'float', 'double': 'double', 'string': 'string', 'byte': 'byte', 'binary': 'binary', - 'date': 'date', + '_date': 'date', 'date_time': 'dateTime', 'uuid': 'uuid', 'password': 'password' } - def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None): # noqa: E501 + def __init__(self, integer=None, int32=None, int64=None, number=None, _float=None, double=None, string=None, byte=None, binary=None, _date=None, date_time=None, uuid=None, password=None): # noqa: E501 """FormatTest - a model defined in Swagger""" # noqa: E501 self._integer = None self._int32 = None self._int64 = None self._number = None - self._float = None + self.__float = None self._double = None self._string = None self._byte = None self._binary = None - self._date = None + self.__date = None self._date_time = None self._uuid = None self._password = None @@ -87,8 +87,8 @@ def __init__(self, integer=None, int32=None, int64=None, number=None, float=None if int64 is not None: self.int64 = int64 self.number = number - if float is not None: - self.float = float + if _float is not None: + self._float = _float if double is not None: self.double = double if string is not None: @@ -96,7 +96,7 @@ def __init__(self, integer=None, int32=None, int64=None, number=None, float=None self.byte = byte if binary is not None: self.binary = binary - self.date = date + self._date = _date if date_time is not None: self.date_time = date_time if uuid is not None: @@ -202,29 +202,29 @@ def number(self, number): self._number = number @property - def float(self): - """Gets the float of this FormatTest. # noqa: E501 + def _float(self): + """Gets the _float of this FormatTest. # noqa: E501 - :return: The float of this FormatTest. # noqa: E501 + :return: The _float of this FormatTest. # noqa: E501 :rtype: float """ - return self._float + return self.__float - @float.setter - def float(self, float): - """Sets the float of this FormatTest. + @_float.setter + def _float(self, _float): + """Sets the _float of this FormatTest. - :param float: The float of this FormatTest. # noqa: E501 + :param _float: The _float of this FormatTest. # noqa: E501 :type: float """ - if float is not None and float > 987.6: # noqa: E501 - raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501 - if float is not None and float < 54.3: # noqa: E501 - raise ValueError("Invalid value for `float`, must be a value greater than or equal to `54.3`") # noqa: E501 + if _float is not None and _float > 987.6: # noqa: E501 + raise ValueError("Invalid value for `_float`, must be a value less than or equal to `987.6`") # noqa: E501 + if _float is not None and _float < 54.3: # noqa: E501 + raise ValueError("Invalid value for `_float`, must be a value greater than or equal to `54.3`") # noqa: E501 - self._float = float + self.__float = _float @property def double(self): @@ -321,27 +321,27 @@ def binary(self, binary): self._binary = binary @property - def date(self): - """Gets the date of this FormatTest. # noqa: E501 + def _date(self): + """Gets the _date of this FormatTest. # noqa: E501 - :return: The date of this FormatTest. # noqa: E501 + :return: The _date of this FormatTest. # noqa: E501 :rtype: date """ - return self._date + return self.__date - @date.setter - def date(self, date): - """Sets the date of this FormatTest. + @_date.setter + def _date(self, _date): + """Sets the _date of this FormatTest. - :param date: The date of this FormatTest. # noqa: E501 + :param _date: The _date of this FormatTest. # noqa: E501 :type: date """ - if date is None: - raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 + if _date is None: + raise ValueError("Invalid value for `_date`, must not be `None`") # noqa: E501 - self._date = date + self.__date = _date @property def date_time(self): diff --git a/samples/client/petstore/python/.travis.yml b/samples/client/petstore/python/.travis.yml index 86211e2d4a2..00887b6fb78 100644 --- a/samples/client/petstore/python/.travis.yml +++ b/samples/client/petstore/python/.travis.yml @@ -6,6 +6,8 @@ python: - "3.3" - "3.4" - "3.5" + - "3.6" + - "3.7" #- "3.5-dev" # 3.5 development branch #- "nightly" # points to the latest development branch e.g. 3.6-dev # command to install dependencies diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index a49d99c556c..cab8b4c968d 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -50,8 +50,9 @@ import time import petstore_api from petstore_api.rest import ApiException from pprint import pprint + # create an instance of the API class -api_instance = petstore_api.AnotherFakeApi() +api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration)) body = petstore_api.Client() # Client | client model try: @@ -74,6 +75,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**fake_outer_composite_serialize**](docs/FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite | *FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | *FakeApi* | [**fake_outer_string_serialize**](docs/FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | +*FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | *FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters diff --git a/samples/client/petstore/python/docs/EnumTest.md b/samples/client/petstore/python/docs/EnumTest.md index 94dd4864629..c4c1630250f 100644 --- a/samples/client/petstore/python/docs/EnumTest.md +++ b/samples/client/petstore/python/docs/EnumTest.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **enum_string** | **str** | | [optional] +**enum_string_required** | **str** | | **enum_integer** | **int** | | [optional] **enum_number** | **float** | | [optional] **outer_enum** | [**OuterEnum**](OuterEnum.md) | | [optional] diff --git a/samples/client/petstore/python/docs/FakeApi.md b/samples/client/petstore/python/docs/FakeApi.md index 1da84500bfe..37539a02aa6 100644 --- a/samples/client/petstore/python/docs/FakeApi.md +++ b/samples/client/petstore/python/docs/FakeApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**fake_outer_composite_serialize**](FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite | [**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | [**fake_outer_string_serialize**](FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | +[**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model [**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters @@ -203,6 +204,52 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_body_with_query_params** +> test_body_with_query_params(body, query) + + + +### Example +```python +from __future__ import print_function +import time +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = petstore_api.FakeApi() +body = petstore_api.User() # User | +query = 'query_example' # str | + +try: + api_instance.test_body_with_query_params(body, query) +except ApiException as e: + print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md)| | + **query** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_client_model** > Client test_client_model(body) @@ -252,7 +299,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **test_endpoint_parameters** -> test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) +> test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, _float=_float, string=string, binary=binary, _date=_date, date_time=date_time, password=password, param_callback=param_callback) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -280,17 +327,17 @@ byte = 'B' # str | None integer = 56 # int | None (optional) int32 = 56 # int | None (optional) int64 = 789 # int | None (optional) -float = 3.4 # float | None (optional) +_float = 3.4 # float | None (optional) string = 'string_example' # str | None (optional) binary = 'B' # str | None (optional) -date = '2013-10-20' # date | None (optional) +_date = '2013-10-20' # date | None (optional) date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional) password = 'password_example' # str | None (optional) param_callback = 'param_callback_example' # str | None (optional) try: # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) + api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, _float=_float, string=string, binary=binary, _date=_date, date_time=date_time, password=password, param_callback=param_callback) except ApiException as e: print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) ``` @@ -306,10 +353,10 @@ Name | Type | Description | Notes **integer** | **int**| None | [optional] **int32** | **int**| None | [optional] **int64** | **int**| None | [optional] - **float** | **float**| None | [optional] + **_float** | **float**| None | [optional] **string** | **str**| None | [optional] **binary** | **str**| None | [optional] - **date** | **date**| None | [optional] + **_date** | **date**| None | [optional] **date_time** | **datetime**| None | [optional] **password** | **str**| None | [optional] **param_callback** | **str**| None | [optional] diff --git a/samples/client/petstore/python/docs/FormatTest.md b/samples/client/petstore/python/docs/FormatTest.md index 3e489e863fa..2026ed877f8 100644 --- a/samples/client/petstore/python/docs/FormatTest.md +++ b/samples/client/petstore/python/docs/FormatTest.md @@ -7,12 +7,12 @@ Name | Type | Description | Notes **int32** | **int** | | [optional] **int64** | **int** | | [optional] **number** | **float** | | -**float** | **float** | | [optional] +**_float** | **float** | | [optional] **double** | **float** | | [optional] **string** | **str** | | [optional] **byte** | **str** | | **binary** | **str** | | [optional] -**date** | **date** | | +**_date** | **date** | | **date_time** | **datetime** | | [optional] **uuid** | **str** | | [optional] **password** | **str** | | diff --git a/samples/client/petstore/python/petstore_api/api/another_fake_api.py b/samples/client/petstore/python/petstore_api/api/another_fake_api.py index 0096dad1a37..955369935ea 100644 --- a/samples/client/petstore/python/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/another_fake_api.py @@ -38,18 +38,18 @@ def test_special_tags(self, body, **kwargs): # noqa: E501 To test special tags # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_special_tags(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_special_tags(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Client body: client model (required) :return: Client If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.test_special_tags_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.test_special_tags_with_http_info(body, **kwargs) # noqa: E501 @@ -60,11 +60,11 @@ def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501 To test special tags # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_special_tags_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_special_tags_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Client body: client model (required) :return: Client If the method is called asynchronously, @@ -72,7 +72,7 @@ def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -126,7 +126,7 @@ def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), diff --git a/samples/client/petstore/python/petstore_api/api/fake_api.py b/samples/client/petstore/python/petstore_api/api/fake_api.py index 4c52ee51647..226d751bb2c 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_api.py @@ -38,18 +38,18 @@ def fake_outer_boolean_serialize(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_boolean_serialize(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_boolean_serialize(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterBoolean body: Input boolean as post body :return: OuterBoolean If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 else: (data) = self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 @@ -60,11 +60,11 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_boolean_serialize_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_boolean_serialize_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterBoolean body: Input boolean as post body :return: OuterBoolean If the method is called asynchronously, @@ -72,7 +72,7 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -114,7 +114,7 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='OuterBoolean', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -125,18 +125,18 @@ def fake_outer_composite_serialize(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_composite_serialize(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_composite_serialize(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterComposite body: Input composite as post body :return: OuterComposite If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 else: (data) = self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 @@ -147,11 +147,11 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_composite_serialize_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_composite_serialize_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterComposite body: Input composite as post body :return: OuterComposite If the method is called asynchronously, @@ -159,7 +159,7 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -201,7 +201,7 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='OuterComposite', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -212,18 +212,18 @@ def fake_outer_number_serialize(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_number_serialize(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_number_serialize(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterNumber body: Input number as post body :return: OuterNumber If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 else: (data) = self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 @@ -234,11 +234,11 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_number_serialize_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_number_serialize_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterNumber body: Input number as post body :return: OuterNumber If the method is called asynchronously, @@ -246,7 +246,7 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -288,7 +288,7 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='OuterNumber', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -299,18 +299,18 @@ def fake_outer_string_serialize(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_string_serialize(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_string_serialize(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterString body: Input string as post body :return: OuterString If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 else: (data) = self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 @@ -321,11 +321,11 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 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=True - >>> thread = api.fake_outer_string_serialize_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fake_outer_string_serialize_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param OuterString body: Input string as post body :return: OuterString If the method is called asynchronously, @@ -333,7 +333,7 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -375,7 +375,108 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='OuterString', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def test_body_with_query_params(self, body, query, **kwargs): # noqa: E501 + """test_body_with_query_params # 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_query_params(body, query, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param User body: (required) + :param str query: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.test_body_with_query_params_with_http_info(body, query, **kwargs) # noqa: E501 + else: + (data) = self.test_body_with_query_params_with_http_info(body, query, **kwargs) # noqa: E501 + return data + + def test_body_with_query_params_with_http_info(self, body, query, **kwargs): # noqa: E501 + """test_body_with_query_params # 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_query_params_with_http_info(body, query, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param User body: (required) + :param str query: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'query'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method test_body_with_query_params" % key + ) + 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 `test_body_with_query_params`") # noqa: E501 + # verify the required parameter 'query' is set + if ('query' not in params or + params['query'] is None): + raise ValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'query' in params: + query_params.append(('query', params['query'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/fake/body-with-query-params', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -386,18 +487,18 @@ def test_client_model(self, body, **kwargs): # noqa: E501 To test \"client\" model # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_client_model(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_client_model(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Client body: client model (required) :return: Client If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.test_client_model_with_http_info(body, **kwargs) # noqa: E501 @@ -408,11 +509,11 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 To test \"client\" model # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_client_model_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_client_model_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Client body: client model (required) :return: Client If the method is called asynchronously, @@ -420,7 +521,7 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -474,7 +575,7 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -485,11 +586,11 @@ def test_endpoint_parameters(self, number, double, pattern_without_delimiter, by 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=True - >>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async=True) + 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() - :param async bool + :param async_req bool :param float number: None (required) :param float double: None (required) :param str pattern_without_delimiter: None (required) @@ -497,10 +598,10 @@ def test_endpoint_parameters(self, number, double, pattern_without_delimiter, by :param int integer: None :param int int32: None :param int int64: None - :param float float: None + :param float _float: None :param str string: None :param str binary: None - :param date date: None + :param date _date: None :param datetime date_time: None :param str password: None :param str param_callback: None @@ -509,7 +610,7 @@ def test_endpoint_parameters(self, number, double, pattern_without_delimiter, by returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 else: (data) = self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 @@ -520,11 +621,11 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou 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=True - >>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param float number: None (required) :param float double: None (required) :param str pattern_without_delimiter: None (required) @@ -532,10 +633,10 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou :param int integer: None :param int int32: None :param int int64: None - :param float float: None + :param float _float: None :param str string: None :param str binary: None - :param date date: None + :param date _date: None :param datetime date_time: None :param str password: None :param str param_callback: None @@ -544,8 +645,8 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou returns the request thread. """ - all_params = ['number', 'double', 'pattern_without_delimiter', 'byte', 'integer', 'int32', 'int64', 'float', 'string', 'binary', 'date', 'date_time', 'password', 'param_callback'] # noqa: E501 - all_params.append('async') + all_params = ['number', 'double', 'pattern_without_delimiter', 'byte', 'integer', 'int32', 'int64', '_float', 'string', 'binary', '_date', 'date_time', 'password', 'param_callback'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -594,8 +695,8 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501 if 'int32' in params and params['int32'] < 20: # noqa: E501 raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`") # noqa: E501 - if 'float' in params and params['float'] > 987.6: # noqa: E501 - raise ValueError("Invalid value for parameter `float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501 + if '_float' in params and params['_float'] > 987.6: # noqa: E501 + raise ValueError("Invalid value for parameter `_float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501 if 'string' in params and not re.search('[a-z]', params['string'], flags=re.IGNORECASE): # noqa: E501 raise ValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") # noqa: E501 if ('password' in params and @@ -622,8 +723,8 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou form_params.append(('int64', params['int64'])) # noqa: E501 if 'number' in params: form_params.append(('number', params['number'])) # noqa: E501 - if 'float' in params: - form_params.append(('float', params['float'])) # noqa: E501 + if '_float' in params: + form_params.append(('float', params['_float'])) # noqa: E501 if 'double' in params: form_params.append(('double', params['double'])) # noqa: E501 if 'string' in params: @@ -634,8 +735,8 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou form_params.append(('byte', params['byte'])) # noqa: E501 if 'binary' in params: form_params.append(('binary', params['binary'])) # noqa: E501 - if 'date' in params: - form_params.append(('date', params['date'])) # noqa: E501 + if '_date' in params: + form_params.append(('date', params['_date'])) # noqa: E501 if 'date_time' in params: form_params.append(('dateTime', params['date_time'])) # noqa: E501 if 'password' in params: @@ -665,7 +766,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -676,11 +777,11 @@ def test_enum_parameters(self, **kwargs): # noqa: E501 To test enum parameters # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_enum_parameters(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_enum_parameters(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[str] enum_form_string_array: Form parameter enum test (string array) :param str enum_form_string: Form parameter enum test (string) :param list[str] enum_header_string_array: Header parameter enum test (string array) @@ -694,7 +795,7 @@ def test_enum_parameters(self, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 else: (data) = self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 @@ -705,11 +806,11 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 To test enum parameters # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_enum_parameters_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_enum_parameters_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[str] enum_form_string_array: Form parameter enum test (string array) :param str enum_form_string: Form parameter enum test (string) :param list[str] enum_header_string_array: Header parameter enum test (string array) @@ -724,7 +825,7 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 """ all_params = ['enum_form_string_array', 'enum_form_string', 'enum_header_string_array', 'enum_header_string', 'enum_query_string_array', 'enum_query_string', 'enum_query_integer', 'enum_query_double'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -791,7 +892,7 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -802,18 +903,18 @@ def test_inline_additional_properties(self, param, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_inline_additional_properties(param, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_inline_additional_properties(param, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param object param: request body (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501 else: (data) = self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501 @@ -824,11 +925,11 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_inline_additional_properties_with_http_info(param, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_inline_additional_properties_with_http_info(param, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param object param: request body (required) :return: None If the method is called asynchronously, @@ -836,7 +937,7 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # """ all_params = ['param'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -886,7 +987,7 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -897,11 +998,11 @@ def test_json_form_data(self, param, param2, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_json_form_data(param, param2, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_json_form_data(param, param2, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str param: field1 (required) :param str param2: field2 (required) :return: None @@ -909,7 +1010,7 @@ def test_json_form_data(self, param, param2, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 else: (data) = self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 @@ -920,11 +1021,11 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_json_form_data_with_http_info(param, param2, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_json_form_data_with_http_info(param, param2, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str param: field1 (required) :param str param2: field2 (required) :return: None @@ -933,7 +1034,7 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: """ all_params = ['param', 'param2'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -989,7 +1090,7 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), diff --git a/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py index 230aa5ec4fc..8aa93d8dc32 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py @@ -38,18 +38,18 @@ def test_classname(self, body, **kwargs): # noqa: E501 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=True - >>> thread = api.test_classname(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_classname(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Client body: client model (required) :return: Client If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.test_classname_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.test_classname_with_http_info(body, **kwargs) # noqa: E501 @@ -60,11 +60,11 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 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=True - >>> thread = api.test_classname_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_classname_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Client body: client model (required) :return: Client If the method is called asynchronously, @@ -72,7 +72,7 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -126,7 +126,7 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), diff --git a/samples/client/petstore/python/petstore_api/api/pet_api.py b/samples/client/petstore/python/petstore_api/api/pet_api.py index ff1026f3fae..bf71e96eab6 100644 --- a/samples/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python/petstore_api/api/pet_api.py @@ -38,18 +38,18 @@ def add_pet(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.add_pet(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_pet(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Pet body: Pet object that needs to be added to the store (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.add_pet_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.add_pet_with_http_info(body, **kwargs) # noqa: E501 @@ -60,11 +60,11 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.add_pet_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_pet_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Pet body: Pet object that needs to be added to the store (required) :return: None If the method is called asynchronously, @@ -72,7 +72,7 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -126,7 +126,7 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -137,11 +137,11 @@ def delete_pet(self, pet_id, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_pet(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_pet(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int pet_id: Pet id to delete (required) :param str api_key: :return: None @@ -149,7 +149,7 @@ def delete_pet(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 else: (data) = self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 @@ -160,11 +160,11 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_pet_with_http_info(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_pet_with_http_info(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int pet_id: Pet id to delete (required) :param str api_key: :return: None @@ -173,7 +173,7 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 """ all_params = ['pet_id', 'api_key'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -225,7 +225,7 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -236,18 +236,18 @@ def find_pets_by_status(self, status, **kwargs): # noqa: E501 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=True - >>> thread = api.find_pets_by_status(status, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_pets_by_status(status, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[str] status: Status values that need to be considered for filter (required) :return: list[Pet] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 else: (data) = self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 @@ -258,11 +258,11 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 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=True - >>> thread = api.find_pets_by_status_with_http_info(status, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_pets_by_status_with_http_info(status, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[str] status: Status values that need to be considered for filter (required) :return: list[Pet] If the method is called asynchronously, @@ -270,7 +270,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 """ all_params = ['status'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -321,7 +321,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 files=local_var_files, response_type='list[Pet]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -332,18 +332,18 @@ def find_pets_by_tags(self, tags, **kwargs): # noqa: E501 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=True - >>> thread = api.find_pets_by_tags(tags, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_pets_by_tags(tags, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[str] tags: Tags to filter by (required) :return: list[Pet] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 else: (data) = self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 @@ -354,11 +354,11 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 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=True - >>> thread = api.find_pets_by_tags_with_http_info(tags, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_pets_by_tags_with_http_info(tags, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[str] tags: Tags to filter by (required) :return: list[Pet] If the method is called asynchronously, @@ -366,7 +366,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 """ all_params = ['tags'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -417,7 +417,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 files=local_var_files, response_type='list[Pet]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -428,18 +428,18 @@ def get_pet_by_id(self, pet_id, **kwargs): # noqa: E501 Returns a single pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_pet_by_id(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_pet_by_id(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int pet_id: ID of pet to return (required) :return: Pet If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 else: (data) = self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 @@ -450,11 +450,11 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 Returns a single pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_pet_by_id_with_http_info(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_pet_by_id_with_http_info(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int pet_id: ID of pet to return (required) :return: Pet If the method is called asynchronously, @@ -462,7 +462,7 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 """ all_params = ['pet_id'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -512,7 +512,7 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type='Pet', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -523,18 +523,18 @@ def update_pet(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_pet(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_pet(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Pet body: Pet object that needs to be added to the store (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.update_pet_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.update_pet_with_http_info(body, **kwargs) # noqa: E501 @@ -545,11 +545,11 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_pet_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_pet_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Pet body: Pet object that needs to be added to the store (required) :return: None If the method is called asynchronously, @@ -557,7 +557,7 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -611,7 +611,7 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -622,11 +622,11 @@ def update_pet_with_form(self, pet_id, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_pet_with_form(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_pet_with_form(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int 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 @@ -635,7 +635,7 @@ def update_pet_with_form(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 else: (data) = self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 @@ -646,11 +646,11 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_pet_with_form_with_http_info(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_pet_with_form_with_http_info(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int 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 @@ -660,7 +660,7 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 """ all_params = ['pet_id', 'name', 'status'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -718,7 +718,7 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -729,11 +729,11 @@ def upload_file(self, pet_id, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.upload_file(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.upload_file(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :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 @@ -742,7 +742,7 @@ def upload_file(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 else: (data) = self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 @@ -753,11 +753,11 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.upload_file_with_http_info(pet_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.upload_file_with_http_info(pet_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :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 @@ -767,7 +767,7 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 """ all_params = ['pet_id', 'additional_metadata', 'file'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -825,7 +825,7 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type='ApiResponse', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), diff --git a/samples/client/petstore/python/petstore_api/api/store_api.py b/samples/client/petstore/python/petstore_api/api/store_api.py index ebb9a4eb27a..27e1f770192 100644 --- a/samples/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/client/petstore/python/petstore_api/api/store_api.py @@ -38,18 +38,18 @@ def delete_order(self, order_id, **kwargs): # noqa: E501 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=True - >>> thread = api.delete_order(order_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_order(order_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str order_id: ID of the order that needs to be deleted (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 else: (data) = self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 @@ -60,11 +60,11 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 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=True - >>> thread = api.delete_order_with_http_info(order_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_order_with_http_info(order_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str order_id: ID of the order that needs to be deleted (required) :return: None If the method is called asynchronously, @@ -72,7 +72,7 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 """ all_params = ['order_id'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -122,7 +122,7 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -133,17 +133,17 @@ def get_inventory(self, **kwargs): # noqa: E501 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=True - >>> thread = api.get_inventory(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inventory(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :return: dict(str, int) If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_inventory_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_inventory_with_http_info(**kwargs) # noqa: E501 @@ -154,18 +154,18 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 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=True - >>> thread = api.get_inventory_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inventory_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :return: dict(str, int) If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -209,7 +209,7 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='dict(str, int)', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -220,18 +220,18 @@ def get_order_by_id(self, order_id, **kwargs): # noqa: E501 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=True - >>> thread = api.get_order_by_id(order_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_order_by_id(order_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int order_id: ID of pet that needs to be fetched (required) :return: Order If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 else: (data) = self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 @@ -242,11 +242,11 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 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=True - >>> thread = api.get_order_by_id_with_http_info(order_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_order_by_id_with_http_info(order_id, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param int order_id: ID of pet that needs to be fetched (required) :return: Order If the method is called asynchronously, @@ -254,7 +254,7 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 """ all_params = ['order_id'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -308,7 +308,7 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 files=local_var_files, response_type='Order', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -319,18 +319,18 @@ def place_order(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.place_order(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.place_order(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Order body: order placed for purchasing the pet (required) :return: Order If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.place_order_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.place_order_with_http_info(body, **kwargs) # noqa: E501 @@ -341,11 +341,11 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.place_order_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.place_order_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param Order body: order placed for purchasing the pet (required) :return: Order If the method is called asynchronously, @@ -353,7 +353,7 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -403,7 +403,7 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type='Order', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), diff --git a/samples/client/petstore/python/petstore_api/api/user_api.py b/samples/client/petstore/python/petstore_api/api/user_api.py index 1de89f28bb0..62a87f2e418 100644 --- a/samples/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/client/petstore/python/petstore_api/api/user_api.py @@ -38,18 +38,18 @@ def create_user(self, body, **kwargs): # noqa: E501 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=True - >>> thread = api.create_user(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_user(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param User body: Created user object (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.create_user_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.create_user_with_http_info(body, **kwargs) # noqa: E501 @@ -60,11 +60,11 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 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=True - >>> thread = api.create_user_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_user_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param User body: Created user object (required) :return: None If the method is called asynchronously, @@ -72,7 +72,7 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -122,7 +122,7 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -133,18 +133,18 @@ def create_users_with_array_input(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_users_with_array_input(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_users_with_array_input(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[User] body: List of user object (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501 @@ -155,11 +155,11 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_users_with_array_input_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_users_with_array_input_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[User] body: List of user object (required) :return: None If the method is called asynchronously, @@ -167,7 +167,7 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -217,7 +217,7 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -228,18 +228,18 @@ def create_users_with_list_input(self, body, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_users_with_list_input(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_users_with_list_input(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[User] body: List of user object (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501 @@ -250,11 +250,11 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_users_with_list_input_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_users_with_list_input_with_http_info(body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param list[User] body: List of user object (required) :return: None If the method is called asynchronously, @@ -262,7 +262,7 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: """ all_params = ['body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -312,7 +312,7 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -323,18 +323,18 @@ def delete_user(self, username, **kwargs): # noqa: E501 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=True - >>> thread = api.delete_user(username, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user(username, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: The name that needs to be deleted (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.delete_user_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.delete_user_with_http_info(username, **kwargs) # noqa: E501 @@ -345,11 +345,11 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 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=True - >>> thread = api.delete_user_with_http_info(username, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_with_http_info(username, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: The name that needs to be deleted (required) :return: None If the method is called asynchronously, @@ -357,7 +357,7 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 """ all_params = ['username'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -407,7 +407,7 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -418,18 +418,18 @@ def get_user_by_name(self, username, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_user_by_name(username, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_by_name(username, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: The name that needs to be fetched. Use user1 for testing. (required) :return: User If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 else: (data) = self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 @@ -440,11 +440,11 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_user_by_name_with_http_info(username, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_by_name_with_http_info(username, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: The name that needs to be fetched. Use user1 for testing. (required) :return: User If the method is called asynchronously, @@ -452,7 +452,7 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 """ all_params = ['username'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -502,7 +502,7 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 files=local_var_files, response_type='User', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -513,11 +513,11 @@ def login_user(self, username, password, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.login_user(username, password, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.login_user(username, password, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: The user name for login (required) :param str password: The password for login in clear text (required) :return: str @@ -525,7 +525,7 @@ def login_user(self, username, password, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 else: (data) = self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 @@ -536,11 +536,11 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.login_user_with_http_info(username, password, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.login_user_with_http_info(username, password, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: The user name for login (required) :param str password: The password for login in clear text (required) :return: str @@ -549,7 +549,7 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 """ all_params = ['username', 'password'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -605,7 +605,7 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -616,17 +616,17 @@ def logout_user(self, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.logout_user(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.logout_user(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.logout_user_with_http_info(**kwargs) # noqa: E501 else: (data) = self.logout_user_with_http_info(**kwargs) # noqa: E501 @@ -637,18 +637,18 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.logout_user_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.logout_user_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :return: None If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -692,7 +692,7 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), @@ -703,11 +703,11 @@ def update_user(self, username, body, **kwargs): # noqa: E501 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=True - >>> thread = api.update_user(username, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user(username, body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: name that need to be deleted (required) :param User body: Updated user object (required) :return: None @@ -715,7 +715,7 @@ def update_user(self, username, body, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501 else: (data) = self.update_user_with_http_info(username, body, **kwargs) # noqa: E501 @@ -726,11 +726,11 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 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=True - >>> thread = api.update_user_with_http_info(username, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_with_http_info(username, body, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str username: name that need to be deleted (required) :param User body: Updated user object (required) :return: None @@ -739,7 +739,7 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 """ all_params = ['username', 'body'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') @@ -795,7 +795,7 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), + async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index 28f65e75fcf..d022f023045 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -274,12 +274,12 @@ def __deserialize(self, data, klass): def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async=None, + response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None): """Makes the HTTP request (synchronous) and returns deserialized data. - To make an async request, set the async parameter. + To make an async request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. @@ -294,7 +294,7 @@ def call_api(self, resource_path, method, :param response: Response data type. :param files dict: key -> filename, value -> filepath, for `multipart/form-data`. - :param async bool: execute request asynchronously + :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param collection_formats: dict of collection formats for path, query, @@ -307,13 +307,13 @@ def call_api(self, resource_path, method, timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: - If async parameter is True, + If async_req parameter is True, the request will be called asynchronously. The method will return the request thread. - If parameter async is False or missing, + If parameter async_req is False or missing, then the method will return the response directly. """ - if not async: + if not async_req: return self.__call_api(resource_path, method, path_params, query_params, header_params, body, post_params, files, diff --git a/samples/client/petstore/python/petstore_api/models/enum_test.py b/samples/client/petstore/python/petstore_api/models/enum_test.py index 1bb234764ab..565975d725c 100644 --- a/samples/client/petstore/python/petstore_api/models/enum_test.py +++ b/samples/client/petstore/python/petstore_api/models/enum_test.py @@ -34,6 +34,7 @@ class EnumTest(object): """ swagger_types = { 'enum_string': 'str', + 'enum_string_required': 'str', 'enum_integer': 'int', 'enum_number': 'float', 'outer_enum': 'OuterEnum' @@ -41,15 +42,17 @@ class EnumTest(object): attribute_map = { 'enum_string': 'enum_string', + 'enum_string_required': 'enum_string_required', 'enum_integer': 'enum_integer', 'enum_number': 'enum_number', 'outer_enum': 'outerEnum' } - def __init__(self, enum_string=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501 + def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501 """EnumTest - a model defined in Swagger""" # noqa: E501 self._enum_string = None + self._enum_string_required = None self._enum_integer = None self._enum_number = None self._outer_enum = None @@ -57,6 +60,7 @@ def __init__(self, enum_string=None, enum_integer=None, enum_number=None, outer_ if enum_string is not None: self.enum_string = enum_string + self.enum_string_required = enum_string_required if enum_integer is not None: self.enum_integer = enum_integer if enum_number is not None: @@ -91,6 +95,35 @@ def enum_string(self, enum_string): self._enum_string = enum_string + @property + def enum_string_required(self): + """Gets the enum_string_required of this EnumTest. # noqa: E501 + + + :return: The enum_string_required of this EnumTest. # noqa: E501 + :rtype: str + """ + return self._enum_string_required + + @enum_string_required.setter + def enum_string_required(self, enum_string_required): + """Sets the enum_string_required of this EnumTest. + + + :param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501 + :type: str + """ + if enum_string_required is None: + raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501 + allowed_values = ["UPPER", "lower", ""] # noqa: E501 + if enum_string_required not in allowed_values: + raise ValueError( + "Invalid value for `enum_string_required` ({0}), must be one of {1}" # noqa: E501 + .format(enum_string_required, allowed_values) + ) + + self._enum_string_required = enum_string_required + @property def enum_integer(self): """Gets the enum_integer of this EnumTest. # noqa: E501 diff --git a/samples/client/petstore/python/petstore_api/models/format_test.py b/samples/client/petstore/python/petstore_api/models/format_test.py index 7974d732fda..467b4a2573d 100644 --- a/samples/client/petstore/python/petstore_api/models/format_test.py +++ b/samples/client/petstore/python/petstore_api/models/format_test.py @@ -35,12 +35,12 @@ class FormatTest(object): 'int32': 'int', 'int64': 'int', 'number': 'float', - 'float': 'float', + '_float': 'float', 'double': 'float', 'string': 'str', 'byte': 'str', 'binary': 'str', - 'date': 'date', + '_date': 'date', 'date_time': 'datetime', 'uuid': 'str', 'password': 'str' @@ -51,30 +51,30 @@ class FormatTest(object): 'int32': 'int32', 'int64': 'int64', 'number': 'number', - 'float': 'float', + '_float': 'float', 'double': 'double', 'string': 'string', 'byte': 'byte', 'binary': 'binary', - 'date': 'date', + '_date': 'date', 'date_time': 'dateTime', 'uuid': 'uuid', 'password': 'password' } - def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None): # noqa: E501 + def __init__(self, integer=None, int32=None, int64=None, number=None, _float=None, double=None, string=None, byte=None, binary=None, _date=None, date_time=None, uuid=None, password=None): # noqa: E501 """FormatTest - a model defined in Swagger""" # noqa: E501 self._integer = None self._int32 = None self._int64 = None self._number = None - self._float = None + self.__float = None self._double = None self._string = None self._byte = None self._binary = None - self._date = None + self.__date = None self._date_time = None self._uuid = None self._password = None @@ -87,8 +87,8 @@ def __init__(self, integer=None, int32=None, int64=None, number=None, float=None if int64 is not None: self.int64 = int64 self.number = number - if float is not None: - self.float = float + if _float is not None: + self._float = _float if double is not None: self.double = double if string is not None: @@ -96,7 +96,7 @@ def __init__(self, integer=None, int32=None, int64=None, number=None, float=None self.byte = byte if binary is not None: self.binary = binary - self.date = date + self._date = _date if date_time is not None: self.date_time = date_time if uuid is not None: @@ -202,29 +202,29 @@ def number(self, number): self._number = number @property - def float(self): - """Gets the float of this FormatTest. # noqa: E501 + def _float(self): + """Gets the _float of this FormatTest. # noqa: E501 - :return: The float of this FormatTest. # noqa: E501 + :return: The _float of this FormatTest. # noqa: E501 :rtype: float """ - return self._float + return self.__float - @float.setter - def float(self, float): - """Sets the float of this FormatTest. + @_float.setter + def _float(self, _float): + """Sets the _float of this FormatTest. - :param float: The float of this FormatTest. # noqa: E501 + :param _float: The _float of this FormatTest. # noqa: E501 :type: float """ - if float is not None and float > 987.6: # noqa: E501 - raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501 - if float is not None and float < 54.3: # noqa: E501 - raise ValueError("Invalid value for `float`, must be a value greater than or equal to `54.3`") # noqa: E501 + if _float is not None and _float > 987.6: # noqa: E501 + raise ValueError("Invalid value for `_float`, must be a value less than or equal to `987.6`") # noqa: E501 + if _float is not None and _float < 54.3: # noqa: E501 + raise ValueError("Invalid value for `_float`, must be a value greater than or equal to `54.3`") # noqa: E501 - self._float = float + self.__float = _float @property def double(self): @@ -321,27 +321,27 @@ def binary(self, binary): self._binary = binary @property - def date(self): - """Gets the date of this FormatTest. # noqa: E501 + def _date(self): + """Gets the _date of this FormatTest. # noqa: E501 - :return: The date of this FormatTest. # noqa: E501 + :return: The _date of this FormatTest. # noqa: E501 :rtype: date """ - return self._date + return self.__date - @date.setter - def date(self, date): - """Sets the date of this FormatTest. + @_date.setter + def _date(self, _date): + """Sets the _date of this FormatTest. - :param date: The date of this FormatTest. # noqa: E501 + :param _date: The _date of this FormatTest. # noqa: E501 :type: date """ - if date is None: - raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 + if _date is None: + raise ValueError("Invalid value for `_date`, must not be `None`") # noqa: E501 - self._date = date + self.__date = _date @property def date_time(self): diff --git a/samples/client/petstore/python/tests/test_deserialization.py b/samples/client/petstore/python/tests/test_deserialization.py index 97d047563df..d7429dea416 100644 --- a/samples/client/petstore/python/tests/test_deserialization.py +++ b/samples/client/petstore/python/tests/test_deserialization.py @@ -27,6 +27,7 @@ def test_enum_test(self): data = { 'enum_test': { "enum_string": "UPPER", + "enum_string_required": "lower", "enum_integer": 1, "enum_number": 1.1, "outerEnum": "placed" @@ -38,6 +39,7 @@ def test_enum_test(self): self.assertTrue(isinstance(deserialized['enum_test'], petstore_api.EnumTest)) self.assertEqual(deserialized['enum_test'], petstore_api.EnumTest(enum_string="UPPER", + enum_string_required="lower", enum_integer=1, enum_number=1.1, outer_enum=petstore_api.OuterEnum.PLACED)) diff --git a/samples/client/petstore/python/tests/test_pet_api.py b/samples/client/petstore/python/tests/test_pet_api.py index f987f38eb8c..aae22b4d438 100644 --- a/samples/client/petstore/python/tests/test_pet_api.py +++ b/samples/client/petstore/python/tests/test_pet_api.py @@ -142,19 +142,19 @@ def test_separate_default_config_instances(self): self.assertNotEqual(pet_api.api_client.configuration.host, pet_api2.api_client.configuration.host) def test_async_request(self): - thread = self.pet_api.add_pet(body=self.pet, async=True) + thread = self.pet_api.add_pet(body=self.pet, async_req=True) response = thread.get() self.assertIsNone(response) - thread = self.pet_api.get_pet_by_id(self.pet.id, async=True) + thread = self.pet_api.get_pet_by_id(self.pet.id, async_req=True) result = thread.get() self.assertIsInstance(result, petstore_api.Pet) def test_async_with_result(self): - self.pet_api.add_pet(body=self.pet, async=False) + self.pet_api.add_pet(body=self.pet, async_req=False) - thread = self.pet_api.get_pet_by_id(self.pet.id, async=True) - thread2 = self.pet_api.get_pet_by_id(self.pet.id, async=True) + thread = self.pet_api.get_pet_by_id(self.pet.id, async_req=True) + thread2 = self.pet_api.get_pet_by_id(self.pet.id, async_req=True) response = thread.get() response2 = thread2.get() @@ -165,7 +165,7 @@ def test_async_with_result(self): def test_async_with_http_info(self): self.pet_api.add_pet(body=self.pet) - thread = self.pet_api.get_pet_by_id_with_http_info(self.pet.id, async=True) + thread = self.pet_api.get_pet_by_id_with_http_info(self.pet.id, async_req=True) data, status, headers = thread.get() self.assertIsInstance(data, petstore_api.Pet) @@ -174,7 +174,7 @@ def test_async_with_http_info(self): def test_async_exception(self): self.pet_api.add_pet(body=self.pet) - thread = self.pet_api.get_pet_by_id("-9999999999999", async=True) + thread = self.pet_api.get_pet_by_id("-9999999999999", async_req=True) exception = None try: From 9f2d16d3180cb95a3d2dbecd79075f1ab923377d Mon Sep 17 00:00:00 2001 From: Tomasz Prus Date: Sat, 25 Aug 2018 23:36:00 +0200 Subject: [PATCH 2/2] fix tests after merge --- .../client/petstore/python-tornado/setup.py | 2 +- .../python/petstore_api/api/fake_api.py | 101 ------------------ 2 files changed, 1 insertion(+), 102 deletions(-) diff --git a/samples/client/petstore/python-tornado/setup.py b/samples/client/petstore/python-tornado/setup.py index ea0a40a1b06..5e542baf523 100644 --- a/samples/client/petstore/python-tornado/setup.py +++ b/samples/client/petstore/python-tornado/setup.py @@ -23,7 +23,7 @@ # http://pypi.python.org/pypi/setuptools REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] -REQUIRES.append("tornado") +REQUIRES.append("tornado < 5.0") setup( name=NAME, diff --git a/samples/client/petstore/python/petstore_api/api/fake_api.py b/samples/client/petstore/python/petstore_api/api/fake_api.py index 6ff5703281a..226d751bb2c 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_api.py @@ -482,107 +482,6 @@ def test_body_with_query_params_with_http_info(self, body, query, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def test_body_with_query_params(self, body, query, **kwargs): # noqa: E501 - """test_body_with_query_params # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_body_with_query_params(body, query, async=True) - >>> result = thread.get() - - :param async bool - :param User body: (required) - :param str query: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.test_body_with_query_params_with_http_info(body, query, **kwargs) # noqa: E501 - else: - (data) = self.test_body_with_query_params_with_http_info(body, query, **kwargs) # noqa: E501 - return data - - def test_body_with_query_params_with_http_info(self, body, query, **kwargs): # noqa: E501 - """test_body_with_query_params # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.test_body_with_query_params_with_http_info(body, query, async=True) - >>> result = thread.get() - - :param async bool - :param User body: (required) - :param str query: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'query'] # noqa: E501 - all_params.append('async') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method test_body_with_query_params" % key - ) - 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 `test_body_with_query_params`") # noqa: E501 - # verify the required parameter 'query' is set - if ('query' not in params or - params['query'] is None): - raise ValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'query' in params: - query_params.append(('query', params['query'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/fake/body-with-query-params', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - def test_client_model(self, body, **kwargs): # noqa: E501 """To test \"client\" model # noqa: E501