diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
index a81a5f0a35a2..96b69aa09a46 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
@@ -81,6 +81,8 @@ public PythonClientCodegen() {
languageSpecificPrimitives.add("datetime");
languageSpecificPrimitives.add("date");
languageSpecificPrimitives.add("object");
+ // TODO file and binary is mapped as `file`
+ languageSpecificPrimitives.add("file");
typeMapping.clear();
typeMapping.put("integer", "int");
diff --git a/modules/openapi-generator/src/main/resources/python/setup.mustache b/modules/openapi-generator/src/main/resources/python/setup.mustache
index e7107e9be94a..597136a8d156 100644
--- a/modules/openapi-generator/src/main/resources/python/setup.mustache
+++ b/modules/openapi-generator/src/main/resources/python/setup.mustache
@@ -21,7 +21,7 @@ REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"]
REQUIRES.append("aiohttp")
{{/asyncio}}
{{#tornado}}
-REQUIRES.append("tornado")
+REQUIRES.append("tornado>=4.2,<5")
{{/tornado}}
setup(
diff --git a/pom.xml b/pom.xml
index da644b08715d..6066ebdda368 100644
--- a/pom.xml
+++ b/pom.xml
@@ -838,7 +838,7 @@
samples/client/petstore/akka-scala
samples/client/petstore/javascript
samples/client/petstore/python
-
+ samples/client/petstore/python-tornado
samples/client/petstore/python-asyncio
samples/client/petstore/typescript-fetch/builds/default
samples/client/petstore/typescript-fetch/builds/es6-target
diff --git a/samples/client/petstore/python-asyncio/.swagger-codegen/VERSION b/samples/client/petstore/python-asyncio/.swagger-codegen/VERSION
index 855ff9501eb8..096bf47efe31 100644
--- a/samples/client/petstore/python-asyncio/.swagger-codegen/VERSION
+++ b/samples/client/petstore/python-asyncio/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.4.0-SNAPSHOT
\ No newline at end of file
+3.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/python-asyncio/README.md b/samples/client/petstore/python-asyncio/README.md
index a49d99c556cd..68b2fc8aa78e 100644
--- a/samples/client/petstore/python-asyncio/README.md
+++ b/samples/client/petstore/python-asyncio/README.md
@@ -5,7 +5,7 @@ This Python package is automatically generated by the [Swagger Codegen](https://
- API version: 1.0.0
- Package version: 1.0.0
-- Build package: io.swagger.codegen.languages.PythonClientCodegen
+- Build package: org.openapitools.codegen.languages.PythonClientCodegen
## Requirements.
@@ -52,11 +52,11 @@ from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.AnotherFakeApi()
-body = petstore_api.Client() # Client | client model
+client = petstore_api.Client() # Client | client model
try:
# To test special tags
- api_response = api_instance.test_special_tags(body)
+ api_response = api_instance.test_special_tags(client)
pprint(api_response)
except ApiException as e:
print("Exception when calling AnotherFakeApi->test_special_tags: %s\n" % e)
@@ -74,6 +74,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
@@ -112,9 +113,11 @@ Class | Method | HTTP request | Description
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [ArrayTest](docs/ArrayTest.md)
- [Capitalization](docs/Capitalization.md)
+ - [Cat](docs/Cat.md)
- [Category](docs/Category.md)
- [ClassModel](docs/ClassModel.md)
- [Client](docs/Client.md)
+ - [Dog](docs/Dog.md)
- [EnumArrays](docs/EnumArrays.md)
- [EnumClass](docs/EnumClass.md)
- [EnumTest](docs/EnumTest.md)
@@ -138,8 +141,6 @@ Class | Method | HTTP request | Description
- [SpecialModelName](docs/SpecialModelName.md)
- [Tag](docs/Tag.md)
- [User](docs/User.md)
- - [Cat](docs/Cat.md)
- - [Dog](docs/Dog.md)
## Documentation For Authorization
diff --git a/samples/client/petstore/python-asyncio/docs/AnotherFakeApi.md b/samples/client/petstore/python-asyncio/docs/AnotherFakeApi.md
index 3d70f7a28756..32d4fa0696c7 100644
--- a/samples/client/petstore/python-asyncio/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/python-asyncio/docs/AnotherFakeApi.md
@@ -8,7 +8,7 @@ Method | HTTP request | Description
# **test_special_tags**
-> Client test_special_tags(body)
+> Client test_special_tags(client)
To test special tags
@@ -24,11 +24,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.AnotherFakeApi()
-body = petstore_api.Client() # Client | client model
+client = petstore_api.Client() # Client | client model
try:
# To test special tags
- api_response = api_instance.test_special_tags(body)
+ api_response = api_instance.test_special_tags(client)
pprint(api_response)
except ApiException as e:
print("Exception when calling AnotherFakeApi->test_special_tags: %s\n" % e)
@@ -38,7 +38,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
diff --git a/samples/client/petstore/python-asyncio/docs/EnumTest.md b/samples/client/petstore/python-asyncio/docs/EnumTest.md
index 94dd48646294..c4c1630250ff 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 1da84500bfef..9a8f12b0c501 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
@@ -16,7 +17,7 @@ Method | HTTP request | Description
# **fake_outer_boolean_serialize**
-> OuterBoolean fake_outer_boolean_serialize(body=body)
+> OuterBoolean fake_outer_boolean_serialize(boolean_post_body=boolean_post_body)
@@ -32,10 +33,10 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.OuterBoolean() # OuterBoolean | Input boolean as post body (optional)
+boolean_post_body = True # bool | Input boolean as post body (optional)
try:
- api_response = api_instance.fake_outer_boolean_serialize(body=body)
+ api_response = api_instance.fake_outer_boolean_serialize(boolean_post_body=boolean_post_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e)
@@ -45,7 +46,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OuterBoolean**](OuterBoolean.md)| Input boolean as post body | [optional]
+ **boolean_post_body** | **bool**| Input boolean as post body | [optional]
### Return type
@@ -58,12 +59,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
[[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)
# **fake_outer_composite_serialize**
-> OuterComposite fake_outer_composite_serialize(body=body)
+> OuterComposite fake_outer_composite_serialize(outer_composite=outer_composite)
@@ -79,10 +80,10 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
+outer_composite = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
try:
- api_response = api_instance.fake_outer_composite_serialize(body=body)
+ api_response = api_instance.fake_outer_composite_serialize(outer_composite=outer_composite)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e)
@@ -92,7 +93,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
+ **outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@@ -105,7 +106,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
[[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)
@@ -126,7 +127,7 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.OuterNumber() # OuterNumber | Input number as post body (optional)
+body = 3.4 # float | Input number as post body (optional)
try:
api_response = api_instance.fake_outer_number_serialize(body=body)
@@ -139,7 +140,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OuterNumber**](OuterNumber.md)| Input number as post body | [optional]
+ **body** | **float**| Input number as post body | [optional]
### Return type
@@ -152,7 +153,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
[[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)
@@ -173,7 +174,7 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.OuterString() # OuterString | Input string as post body (optional)
+body = 'body_example' # str | Input string as post body (optional)
try:
api_response = api_instance.fake_outer_string_serialize(body=body)
@@ -186,7 +187,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OuterString**](OuterString.md)| Input string as post body | [optional]
+ **body** | **str**| Input string as post body | [optional]
### Return type
@@ -199,12 +200,58 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
+ - **Accept**: */*
+
+[[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(query, user)
+
+
+
+### 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()
+query = 'query_example' # str |
+user = petstore_api.User() # User |
+
+try:
+ api_instance.test_body_with_query_params(query, user)
+except ApiException as e:
+ print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **query** | **str**| |
+ **user** | [**User**](User.md)| |
+
+### 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)
+> Client test_client_model(client)
To test \"client\" model
@@ -220,11 +267,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.Client() # Client | client model
+client = petstore_api.Client() # Client | client model
try:
# To test \"client\" model
- api_response = api_instance.test_client_model(body)
+ api_response = api_instance.test_client_model(client)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeApi->test_client_model: %s\n" % e)
@@ -234,7 +281,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
@@ -273,16 +320,16 @@ configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration))
-number = 8.14 # float | None
-double = 1.2 # float | None
+number = 3.4 # float | None
+double = 3.4 # float | None
pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None
-byte = 'B' # str | None
+byte = 'byte_example' # str | None
integer = 56 # int | None (optional)
int32 = 56 # int | None (optional)
-int64 = 789 # int | None (optional)
+int64 = 56 # int | None (optional)
float = 3.4 # float | None (optional)
string = 'string_example' # str | None (optional)
-binary = 'B' # str | None (optional)
+binary = '/path/to/file' # file | 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)
@@ -308,7 +355,7 @@ Name | Type | Description | Notes
**int64** | **int**| None | [optional]
**float** | **float**| None | [optional]
**string** | **str**| None | [optional]
- **binary** | **str**| None | [optional]
+ **binary** | **file**| None | [optional]
**date** | **date**| None | [optional]
**date_time** | **datetime**| None | [optional]
**password** | **str**| None | [optional]
@@ -324,13 +371,13 @@ void (empty response body)
### HTTP request headers
- - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8
- - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **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_enum_parameters**
-> test_enum_parameters(enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string, enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double)
+> test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string)
To test enum parameters
@@ -346,18 +393,18 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-enum_form_string_array = ['enum_form_string_array_example'] # list[str] | Form parameter enum test (string array) (optional)
-enum_form_string = '-efg' # str | Form parameter enum test (string) (optional) (default to -efg)
enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional)
enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to -efg)
enum_query_string_array = ['enum_query_string_array_example'] # list[str] | Query parameter enum test (string array) (optional)
enum_query_string = '-efg' # str | Query parameter enum test (string) (optional) (default to -efg)
enum_query_integer = 56 # int | Query parameter enum test (double) (optional)
-enum_query_double = 1.2 # float | Query parameter enum test (double) (optional)
+enum_query_double = 3.4 # float | Query parameter enum test (double) (optional)
+enum_form_string_array = NULL # list[str] | Form parameter enum test (string array) (optional)
+enum_form_string = 'enum_form_string_example' # str | Form parameter enum test (string) (optional)
try:
# To test enum parameters
- api_instance.test_enum_parameters(enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string, enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double)
+ api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string)
except ApiException as e:
print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e)
```
@@ -366,14 +413,14 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **enum_form_string_array** | [**list[str]**](str.md)| Form parameter enum test (string array) | [optional]
- **enum_form_string** | **str**| Form parameter enum test (string) | [optional] [default to -efg]
**enum_header_string_array** | [**list[str]**](str.md)| Header parameter enum test (string array) | [optional]
**enum_header_string** | **str**| Header parameter enum test (string) | [optional] [default to -efg]
**enum_query_string_array** | [**list[str]**](str.md)| Query parameter enum test (string array) | [optional]
**enum_query_string** | **str**| Query parameter enum test (string) | [optional] [default to -efg]
**enum_query_integer** | **int**| Query parameter enum test (double) | [optional]
**enum_query_double** | **float**| Query parameter enum test (double) | [optional]
+ **enum_form_string_array** | [**list[str]**](list.md)| Form parameter enum test (string array) | [optional]
+ **enum_form_string** | **str**| Form parameter enum test (string) | [optional]
### Return type
@@ -385,18 +432,16 @@ No authorization required
### HTTP request headers
- - **Content-Type**: */*
- - **Accept**: */*
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **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_inline_additional_properties**
-> test_inline_additional_properties(param)
+> test_inline_additional_properties(request_body)
test inline additionalProperties
-
-
### Example
```python
from __future__ import print_function
@@ -407,11 +452,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-param = NULL # object | request body
+request_body = {'key': 'request_body_example'} # str | request body
try:
# test inline additionalProperties
- api_instance.test_inline_additional_properties(param)
+ api_instance.test_inline_additional_properties(request_body)
except ApiException as e:
print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e)
```
@@ -420,7 +465,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **param** | **object**| request body |
+ **request_body** | [**str**](str.md)| request body |
### Return type
@@ -442,8 +487,6 @@ No authorization required
test json serialization of form data
-
-
### Example
```python
from __future__ import print_function
@@ -481,7 +524,7 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: application/x-www-form-urlencoded
- **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)
diff --git a/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md
index 8d11d05085a3..34d44991ff9a 100644
--- a/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md
+++ b/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md
@@ -8,7 +8,7 @@ Method | HTTP request | Description
# **test_classname**
-> Client test_classname(body)
+> Client test_classname(client)
To test class name in snake case
@@ -30,11 +30,11 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
# create an instance of the API class
api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration))
-body = petstore_api.Client() # Client | client model
+client = petstore_api.Client() # Client | client model
try:
# To test class name in snake case
- api_response = api_instance.test_classname(body)
+ api_response = api_instance.test_classname(client)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e)
@@ -44,7 +44,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
diff --git a/samples/client/petstore/python-asyncio/docs/FormatTest.md b/samples/client/petstore/python-asyncio/docs/FormatTest.md
index 3e489e863fa0..95d191f11c8a 100644
--- a/samples/client/petstore/python-asyncio/docs/FormatTest.md
+++ b/samples/client/petstore/python-asyncio/docs/FormatTest.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**double** | **float** | | [optional]
**string** | **str** | | [optional]
**byte** | **str** | |
-**binary** | **str** | | [optional]
+**binary** | [**file**](file.md) | | [optional]
**date** | **date** | |
**date_time** | **datetime** | | [optional]
**uuid** | **str** | | [optional]
diff --git a/samples/client/petstore/python-asyncio/docs/PetApi.md b/samples/client/petstore/python-asyncio/docs/PetApi.md
index 53b9158e6995..748cf407ea45 100644
--- a/samples/client/petstore/python-asyncio/docs/PetApi.md
+++ b/samples/client/petstore/python-asyncio/docs/PetApi.md
@@ -15,12 +15,10 @@ Method | HTTP request | Description
# **add_pet**
-> add_pet(body)
+> add_pet(pet)
Add a new pet to the store
-
-
### Example
```python
from __future__ import print_function
@@ -35,11 +33,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
+pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
try:
# Add a new pet to the store
- api_instance.add_pet(body)
+ api_instance.add_pet(pet)
except ApiException as e:
print("Exception when calling PetApi->add_pet: %s\n" % e)
```
@@ -48,7 +46,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -61,7 +59,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- - **Accept**: application/xml, 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)
@@ -70,8 +68,6 @@ void (empty response body)
Deletes a pet
-
-
### Example
```python
from __future__ import print_function
@@ -86,7 +82,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet_id = 789 # int | Pet id to delete
+pet_id = 56 # int | Pet id to delete
api_key = 'api_key_example' # str | (optional)
try:
@@ -114,7 +110,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
@@ -245,7 +241,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet_id = 789 # int | ID of pet to return
+pet_id = 56 # int | ID of pet to return
try:
# Find pet by ID
@@ -277,12 +273,10 @@ Name | Type | Description | Notes
[[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)
# **update_pet**
-> update_pet(body)
+> update_pet(pet)
Update an existing pet
-
-
### Example
```python
from __future__ import print_function
@@ -297,11 +291,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
+pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
try:
# Update an existing pet
- api_instance.update_pet(body)
+ api_instance.update_pet(pet)
except ApiException as e:
print("Exception when calling PetApi->update_pet: %s\n" % e)
```
@@ -310,7 +304,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -323,7 +317,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- - **Accept**: application/xml, 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)
@@ -332,8 +326,6 @@ void (empty response body)
Updates a pet in the store with form data
-
-
### Example
```python
from __future__ import print_function
@@ -348,7 +340,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet_id = 789 # int | ID of pet that needs to be updated
+pet_id = 56 # int | ID of pet that needs to be updated
name = 'name_example' # str | Updated name of the pet (optional)
status = 'status_example' # str | Updated status of the pet (optional)
@@ -378,7 +370,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- - **Accept**: application/xml, 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)
@@ -387,8 +379,6 @@ void (empty response body)
uploads an image
-
-
### Example
```python
from __future__ import print_function
@@ -403,9 +393,9 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet_id = 789 # int | ID of pet to update
+pet_id = 56 # int | ID of pet to update
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
-file = '/path/to/file.txt' # file | file to upload (optional)
+file = '/path/to/file' # file | file to upload (optional)
try:
# uploads an image
diff --git a/samples/client/petstore/python-asyncio/docs/StoreApi.md b/samples/client/petstore/python-asyncio/docs/StoreApi.md
index 6cbb6b451453..e4d6a7a88859 100644
--- a/samples/client/petstore/python-asyncio/docs/StoreApi.md
+++ b/samples/client/petstore/python-asyncio/docs/StoreApi.md
@@ -53,7 +53,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
@@ -124,7 +124,7 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.StoreApi()
-order_id = 789 # int | ID of pet that needs to be fetched
+order_id = 56 # int | ID of pet that needs to be fetched
try:
# Find purchase order by ID
@@ -156,12 +156,10 @@ 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)
# **place_order**
-> Order place_order(body)
+> Order place_order(order)
Place an order for a pet
-
-
### Example
```python
from __future__ import print_function
@@ -172,11 +170,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.StoreApi()
-body = petstore_api.Order() # Order | order placed for purchasing the pet
+order = petstore_api.Order() # Order | order placed for purchasing the pet
try:
# Place an order for a pet
- api_response = api_instance.place_order(body)
+ api_response = api_instance.place_order(order)
pprint(api_response)
except ApiException as e:
print("Exception when calling StoreApi->place_order: %s\n" % e)
@@ -186,7 +184,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Order**](Order.md)| order placed for purchasing the pet |
+ **order** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
diff --git a/samples/client/petstore/python-asyncio/docs/UserApi.md b/samples/client/petstore/python-asyncio/docs/UserApi.md
index e9ec08e24bbd..c7cc8b64d663 100644
--- a/samples/client/petstore/python-asyncio/docs/UserApi.md
+++ b/samples/client/petstore/python-asyncio/docs/UserApi.md
@@ -15,7 +15,7 @@ Method | HTTP request | Description
# **create_user**
-> create_user(body)
+> create_user(user)
Create user
@@ -31,11 +31,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-body = petstore_api.User() # User | Created user object
+user = petstore_api.User() # User | Created user object
try:
# Create user
- api_instance.create_user(body)
+ api_instance.create_user(user)
except ApiException as e:
print("Exception when calling UserApi->create_user: %s\n" % e)
```
@@ -44,7 +44,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**User**](User.md)| Created user object |
+ **user** | [**User**](User.md)| Created user object |
### Return type
@@ -57,17 +57,15 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
# **create_users_with_array_input**
-> create_users_with_array_input(body)
+> create_users_with_array_input(user)
Creates list of users with given input array
-
-
### Example
```python
from __future__ import print_function
@@ -78,11 +76,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-body = [petstore_api.User()] # list[User] | List of user object
+user = NULL # list[User] | List of user object
try:
# Creates list of users with given input array
- api_instance.create_users_with_array_input(body)
+ api_instance.create_users_with_array_input(user)
except ApiException as e:
print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e)
```
@@ -91,7 +89,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**list[User]**](User.md)| List of user object |
+ **user** | [**list[User]**](list.md)| List of user object |
### Return type
@@ -104,17 +102,15 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
# **create_users_with_list_input**
-> create_users_with_list_input(body)
+> create_users_with_list_input(user)
Creates list of users with given input array
-
-
### Example
```python
from __future__ import print_function
@@ -125,11 +121,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-body = [petstore_api.User()] # list[User] | List of user object
+user = NULL # list[User] | List of user object
try:
# Creates list of users with given input array
- api_instance.create_users_with_list_input(body)
+ api_instance.create_users_with_list_input(user)
except ApiException as e:
print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e)
```
@@ -138,7 +134,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**list[User]**](User.md)| List of user object |
+ **user** | [**list[User]**](list.md)| List of user object |
### Return type
@@ -151,7 +147,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
@@ -198,7 +194,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
@@ -207,8 +203,6 @@ No authorization required
Get user by user name
-
-
### Example
```python
from __future__ import print_function
@@ -255,8 +249,6 @@ No authorization required
Logs user into the system
-
-
### Example
```python
from __future__ import print_function
@@ -305,8 +297,6 @@ No authorization required
Logs out current logged in user session
-
-
### Example
```python
from __future__ import print_function
@@ -339,12 +329,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
# **update_user**
-> update_user(username, body)
+> update_user(username, user)
Updated user
@@ -361,11 +351,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | name that need to be deleted
-body = petstore_api.User() # User | Updated user object
+user = petstore_api.User() # User | Updated user object
try:
# Updated user
- api_instance.update_user(username, body)
+ api_instance.update_user(username, user)
except ApiException as e:
print("Exception when calling UserApi->update_user: %s\n" % e)
```
@@ -375,7 +365,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| name that need to be deleted |
- **body** | [**User**](User.md)| Updated user object |
+ **user** | [**User**](User.md)| Updated user object |
### Return type
@@ -388,7 +378,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
diff --git a/samples/client/petstore/python-asyncio/petstore_api/__init__.py b/samples/client/petstore/python-asyncio/petstore_api/__init__.py
index 8bf367cc5b81..96f34b3da498 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/__init__.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/__init__.py
@@ -35,9 +35,11 @@
from petstore_api.models.array_of_number_only import ArrayOfNumberOnly
from petstore_api.models.array_test import ArrayTest
from petstore_api.models.capitalization import Capitalization
+from petstore_api.models.cat import Cat
from petstore_api.models.category import Category
from petstore_api.models.class_model import ClassModel
from petstore_api.models.client import Client
+from petstore_api.models.dog import Dog
from petstore_api.models.enum_arrays import EnumArrays
from petstore_api.models.enum_class import EnumClass
from petstore_api.models.enum_test import EnumTest
@@ -61,5 +63,3 @@
from petstore_api.models.special_model_name import SpecialModelName
from petstore_api.models.tag import Tag
from petstore_api.models.user import User
-from petstore_api.models.cat import Cat
-from petstore_api.models.dog import Dog
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 0096dad1a37a..bc8552682cc6 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
@@ -33,45 +33,45 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def test_special_tags(self, body, **kwargs): # noqa: E501
+ def test_special_tags(self, client, **kwargs): # noqa: E501
"""To test special tags # 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)
+ >>> thread = api.test_special_tags(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: 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'):
- return self.test_special_tags_with_http_info(body, **kwargs) # noqa: E501
+ return self.test_special_tags_with_http_info(client, **kwargs) # noqa: E501
else:
- (data) = self.test_special_tags_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.test_special_tags_with_http_info(client, **kwargs) # noqa: E501
return data
- def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501
+ def test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501
"""To test special tags # 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)
+ >>> thread = api.test_special_tags_with_http_info(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['client'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501
)
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_special_tags`") # noqa: E501
+ # verify the required parameter 'client' is set
+ if ('client' not in params or
+ params['client'] is None):
+ raise ValueError("Missing the required parameter `client` when calling `test_special_tags`") # noqa: E501
collection_formats = {}
@@ -103,8 +103,8 @@ def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'client' in params:
+ body_params = params['client']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
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 4c52ee51647d..850af1f38e00 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
@@ -43,7 +43,7 @@ def fake_outer_boolean_serialize(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterBoolean body: Input boolean as post body
+ :param bool boolean_post_body: Input boolean as post body
:return: OuterBoolean
If the method is called asynchronously,
returns the request thread.
@@ -65,13 +65,13 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterBoolean body: Input boolean as post body
+ :param bool boolean_post_body: Input boolean as post body
:return: OuterBoolean
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['boolean_post_body'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -99,8 +99,12 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'boolean_post_body' in params:
+ body_params = params['boolean_post_body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['*/*']) # noqa: E501
+
# Authentication setting
auth_settings = [] # noqa: E501
@@ -130,7 +134,7 @@ def fake_outer_composite_serialize(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterComposite body: Input composite as post body
+ :param OuterComposite outer_composite: Input composite as post body
:return: OuterComposite
If the method is called asynchronously,
returns the request thread.
@@ -152,13 +156,13 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterComposite body: Input composite as post body
+ :param OuterComposite outer_composite: Input composite as post body
:return: OuterComposite
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['outer_composite'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -186,8 +190,12 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'outer_composite' in params:
+ body_params = params['outer_composite']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['*/*']) # noqa: E501
+
# Authentication setting
auth_settings = [] # noqa: E501
@@ -217,7 +225,7 @@ def fake_outer_number_serialize(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterNumber body: Input number as post body
+ :param float body: Input number as post body
:return: OuterNumber
If the method is called asynchronously,
returns the request thread.
@@ -239,7 +247,7 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterNumber body: Input number as post body
+ :param float body: Input number as post body
:return: OuterNumber
If the method is called asynchronously,
returns the request thread.
@@ -275,6 +283,10 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501
body_params = None
if 'body' in params:
body_params = params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['*/*']) # noqa: E501
+
# Authentication setting
auth_settings = [] # noqa: E501
@@ -304,7 +316,7 @@ def fake_outer_string_serialize(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterString body: Input string as post body
+ :param str body: Input string as post body
:return: OuterString
If the method is called asynchronously,
returns the request thread.
@@ -326,7 +338,7 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterString body: Input string as post body
+ :param str body: Input string as post body
:return: OuterString
If the method is called asynchronously,
returns the request thread.
@@ -362,6 +374,10 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501
body_params = None
if 'body' in params:
body_params = params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['*/*']) # noqa: E501
+
# Authentication setting
auth_settings = [] # noqa: E501
@@ -381,45 +397,146 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def test_client_model(self, body, **kwargs): # noqa: E501
+ def test_body_with_query_params(self, query, user, **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(query, user, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str query: (required)
+ :param User user: (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(query, user, **kwargs) # noqa: E501
+ else:
+ (data) = self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501
+ return data
+
+ def test_body_with_query_params_with_http_info(self, query, user, **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(query, user, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str query: (required)
+ :param User user: (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['query', 'user'] # 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 '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
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` 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 'user' in params:
+ body_params = params['user']
+ # 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, client, **kwargs): # noqa: E501
"""To test \"client\" model # 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)
+ >>> thread = api.test_client_model(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: 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'):
- return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501
+ return self.test_client_model_with_http_info(client, **kwargs) # noqa: E501
else:
- (data) = self.test_client_model_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.test_client_model_with_http_info(client, **kwargs) # noqa: E501
return data
- def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501
+ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501
"""To test \"client\" model # 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)
+ >>> thread = api.test_client_model_with_http_info(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['client'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -434,10 +551,10 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501
)
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_client_model`") # noqa: E501
+ # verify the required parameter 'client' is set
+ if ('client' not in params or
+ params['client'] is None):
+ raise ValueError("Missing the required parameter `client` when calling `test_client_model`") # noqa: E501
collection_formats = {}
@@ -451,8 +568,8 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'client' in params:
+ body_params = params['client']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
@@ -499,7 +616,7 @@ def test_endpoint_parameters(self, number, double, pattern_without_delimiter, by
:param int int64: None
:param float float: None
:param str string: None
- :param str binary: None
+ :param file binary: None
:param date date: None
:param datetime date_time: None
:param str password: None
@@ -534,7 +651,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou
:param int int64: None
:param float float: None
:param str string: None
- :param str binary: None
+ :param file binary: None
:param date date: None
:param datetime date_time: None
:param str password: None
@@ -584,7 +701,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou
raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") # noqa: E501
if 'double' in params and params['double'] < 67.8: # noqa: E501
raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") # noqa: E501
- if 'pattern_without_delimiter' in params and not re.search('^[A-Z].*', params['pattern_without_delimiter']): # noqa: E501
+ if 'pattern_without_delimiter' in params and not re.search('', params['pattern_without_delimiter']): # noqa: E501
raise ValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`") # noqa: E501
if 'integer' in params and params['integer'] > 100: # noqa: E501
raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501
@@ -596,7 +713,7 @@ 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 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 'string' in params and not re.search('[a-z]', params['string'], flags=re.IGNORECASE): # noqa: E501
+ if 'string' in params and not re.search('', params['string']): # 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
len(params['password']) > 64):
@@ -633,7 +750,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou
if 'byte' in params:
form_params.append(('byte', params['byte'])) # noqa: E501
if 'binary' in params:
- form_params.append(('binary', params['binary'])) # noqa: E501
+ local_var_files['binary'] = params['binary'] # noqa: E501
if 'date' in params:
form_params.append(('date', params['date'])) # noqa: E501
if 'date_time' in params:
@@ -644,13 +761,9 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou
form_params.append(('callback', params['param_callback'])) # noqa: E501
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml; charset=utf-8', 'application/json; charset=utf-8']) # noqa: E501
-
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/xml; charset=utf-8', 'application/json; charset=utf-8']) # noqa: E501
+ ['application/x-www-form-urlencoded']) # noqa: E501
# Authentication setting
auth_settings = ['http_basic_test'] # noqa: E501
@@ -681,14 +794,14 @@ def test_enum_parameters(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async 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)
:param str enum_header_string: Header parameter enum test (string)
:param list[str] enum_query_string_array: Query parameter enum test (string array)
:param str enum_query_string: Query parameter enum test (string)
:param int enum_query_integer: Query parameter enum test (double)
:param float enum_query_double: Query parameter enum test (double)
+ :param list[str] enum_form_string_array: Form parameter enum test (string array)
+ :param str enum_form_string: Form parameter enum test (string)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -710,20 +823,20 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async 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)
:param str enum_header_string: Header parameter enum test (string)
:param list[str] enum_query_string_array: Query parameter enum test (string array)
:param str enum_query_string: Query parameter enum test (string)
:param int enum_query_integer: Query parameter enum test (double)
:param float enum_query_double: Query parameter enum test (double)
+ :param list[str] enum_form_string_array: Form parameter enum test (string array)
+ :param str enum_form_string: Form parameter enum test (string)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- 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 = ['enum_header_string_array', 'enum_header_string', 'enum_query_string_array', 'enum_query_string', 'enum_query_integer', 'enum_query_double', 'enum_form_string_array', 'enum_form_string'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -746,16 +859,18 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501
query_params = []
if 'enum_query_string_array' in params:
query_params.append(('enum_query_string_array', params['enum_query_string_array'])) # noqa: E501
- collection_formats['enum_query_string_array'] = 'csv' # noqa: E501
+ collection_formats['enum_query_string_array'] = '' # noqa: E501
if 'enum_query_string' in params:
query_params.append(('enum_query_string', params['enum_query_string'])) # noqa: E501
if 'enum_query_integer' in params:
query_params.append(('enum_query_integer', params['enum_query_integer'])) # noqa: E501
+ if 'enum_query_double' in params:
+ query_params.append(('enum_query_double', params['enum_query_double'])) # noqa: E501
header_params = {}
if 'enum_header_string_array' in params:
header_params['enum_header_string_array'] = params['enum_header_string_array'] # noqa: E501
- collection_formats['enum_header_string_array'] = 'csv' # noqa: E501
+ collection_formats['enum_header_string_array'] = '' # noqa: E501
if 'enum_header_string' in params:
header_params['enum_header_string'] = params['enum_header_string'] # noqa: E501
@@ -763,20 +878,13 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
if 'enum_form_string_array' in params:
form_params.append(('enum_form_string_array', params['enum_form_string_array'])) # noqa: E501
- collection_formats['enum_form_string_array'] = 'csv' # noqa: E501
if 'enum_form_string' in params:
form_params.append(('enum_form_string', params['enum_form_string'])) # noqa: E501
- if 'enum_query_double' in params:
- form_params.append(('enum_query_double', params['enum_query_double'])) # noqa: E501
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['*/*']) # noqa: E501
-
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['*/*']) # noqa: E501
+ ['application/x-www-form-urlencoded']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
@@ -797,45 +905,43 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def test_inline_additional_properties(self, param, **kwargs): # noqa: E501
+ def test_inline_additional_properties(self, request_body, **kwargs): # noqa: E501
"""test inline additionalProperties # 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)
+ >>> thread = api.test_inline_additional_properties(request_body, async=True)
>>> result = thread.get()
:param async bool
- :param object param: request body (required)
+ :param str request_body: 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'):
- return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501
+ return self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501
else:
- (data) = self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501
+ (data) = self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501
return data
- def test_inline_additional_properties_with_http_info(self, param, **kwargs): # noqa: E501
+ def test_inline_additional_properties_with_http_info(self, request_body, **kwargs): # noqa: E501
"""test inline additionalProperties # 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_with_http_info(param, async=True)
+ >>> thread = api.test_inline_additional_properties_with_http_info(request_body, async=True)
>>> result = thread.get()
:param async bool
- :param object param: request body (required)
+ :param str request_body: request body (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['param'] # noqa: E501
+ all_params = ['request_body'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -850,10 +956,10 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): #
)
params[key] = val
del params['kwargs']
- # verify the required parameter 'param' is set
- if ('param' not in params or
- params['param'] is None):
- raise ValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501
+ # verify the required parameter 'request_body' is set
+ if ('request_body' not in params or
+ params['request_body'] is None):
+ raise ValueError("Missing the required parameter `request_body` when calling `test_inline_additional_properties`") # noqa: E501
collection_formats = {}
@@ -867,8 +973,8 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): #
local_var_files = {}
body_params = None
- if 'param' in params:
- body_params = params['param']
+ if 'request_body' in params:
+ body_params = params['request_body']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
@@ -895,7 +1001,6 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): #
def test_json_form_data(self, param, param2, **kwargs): # noqa: E501
"""test json serialization of form data # 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)
@@ -918,7 +1023,6 @@ def test_json_form_data(self, param, param2, **kwargs): # noqa: E501
def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: E501
"""test json serialization of form data # 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_with_http_info(param, param2, async=True)
@@ -974,7 +1078,7 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa:
body_params = None
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
+ ['application/x-www-form-urlencoded']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
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 230aa5ec4fca..6b812b5a3fa8 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
@@ -33,45 +33,45 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def test_classname(self, body, **kwargs): # noqa: E501
+ def test_classname(self, client, **kwargs): # noqa: E501
"""To test class name in snake case # 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)
+ >>> thread = api.test_classname(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: 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'):
- return self.test_classname_with_http_info(body, **kwargs) # noqa: E501
+ return self.test_classname_with_http_info(client, **kwargs) # noqa: E501
else:
- (data) = self.test_classname_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.test_classname_with_http_info(client, **kwargs) # noqa: E501
return data
- def test_classname_with_http_info(self, body, **kwargs): # noqa: E501
+ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501
"""To test class name in snake case # 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)
+ >>> thread = api.test_classname_with_http_info(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['client'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501
)
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_classname`") # noqa: E501
+ # verify the required parameter 'client' is set
+ if ('client' not in params or
+ params['client'] is None):
+ raise ValueError("Missing the required parameter `client` when calling `test_classname`") # noqa: E501
collection_formats = {}
@@ -103,8 +103,8 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'client' in params:
+ body_params = params['client']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
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 ff1026f3fae1..33dddbdf7aac 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
@@ -33,45 +33,43 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def add_pet(self, body, **kwargs): # noqa: E501
+ def add_pet(self, pet, **kwargs): # noqa: E501
"""Add a new pet to the store # 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)
+ >>> thread = api.add_pet(pet, async=True)
>>> result = thread.get()
:param async bool
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param Pet pet: 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'):
- return self.add_pet_with_http_info(body, **kwargs) # noqa: E501
+ return self.add_pet_with_http_info(pet, **kwargs) # noqa: E501
else:
- (data) = self.add_pet_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.add_pet_with_http_info(pet, **kwargs) # noqa: E501
return data
- def add_pet_with_http_info(self, body, **kwargs): # noqa: E501
+ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501
"""Add a new pet to the store # 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)
+ >>> thread = api.add_pet_with_http_info(pet, async=True)
>>> result = thread.get()
:param async bool
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param Pet pet: Pet object that needs to be added to the store (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['pet'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +84,10 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501
)
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 `add_pet`") # noqa: E501
+ # verify the required parameter 'pet' is set
+ if ('pet' not in params or
+ params['pet'] is None):
+ raise ValueError("Missing the required parameter `pet` when calling `add_pet`") # noqa: E501
collection_formats = {}
@@ -103,12 +101,8 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'pet' in params:
+ body_params = params['pet']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json', 'application/xml']) # noqa: E501
@@ -135,7 +129,6 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501
def delete_pet(self, pet_id, **kwargs): # noqa: E501
"""Deletes a pet # 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)
@@ -158,7 +151,6 @@ def delete_pet(self, pet_id, **kwargs): # noqa: E501
def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501
"""Deletes a pet # 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)
@@ -208,10 +200,6 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# Authentication setting
auth_settings = ['petstore_auth'] # noqa: E501
@@ -296,7 +284,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501
query_params = []
if 'status' in params:
query_params.append(('status', params['status'])) # noqa: E501
- collection_formats['status'] = 'csv' # noqa: E501
+ collection_formats['status'] = '' # noqa: E501
header_params = {}
@@ -392,7 +380,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501
query_params = []
if 'tags' in params:
query_params.append(('tags', params['tags'])) # noqa: E501
- collection_formats['tags'] = 'csv' # noqa: E501
+ collection_formats['tags'] = '' # noqa: E501
header_params = {}
@@ -518,45 +506,43 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def update_pet(self, body, **kwargs): # noqa: E501
+ def update_pet(self, pet, **kwargs): # noqa: E501
"""Update an existing pet # 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)
+ >>> thread = api.update_pet(pet, async=True)
>>> result = thread.get()
:param async bool
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param Pet pet: 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'):
- return self.update_pet_with_http_info(body, **kwargs) # noqa: E501
+ return self.update_pet_with_http_info(pet, **kwargs) # noqa: E501
else:
- (data) = self.update_pet_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.update_pet_with_http_info(pet, **kwargs) # noqa: E501
return data
- def update_pet_with_http_info(self, body, **kwargs): # noqa: E501
+ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501
"""Update an existing pet # 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)
+ >>> thread = api.update_pet_with_http_info(pet, async=True)
>>> result = thread.get()
:param async bool
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param Pet pet: Pet object that needs to be added to the store (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['pet'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -571,10 +557,10 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501
)
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 `update_pet`") # noqa: E501
+ # verify the required parameter 'pet' is set
+ if ('pet' not in params or
+ params['pet'] is None):
+ raise ValueError("Missing the required parameter `pet` when calling `update_pet`") # noqa: E501
collection_formats = {}
@@ -588,12 +574,8 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'pet' in params:
+ body_params = params['pet']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json', 'application/xml']) # noqa: E501
@@ -620,7 +602,6 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501
def update_pet_with_form(self, pet_id, **kwargs): # noqa: E501
"""Updates a pet in the store with form data # 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)
@@ -644,7 +625,6 @@ def update_pet_with_form(self, pet_id, **kwargs): # noqa: E501
def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501
"""Updates a pet in the store with form data # 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)
@@ -697,10 +677,6 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501
form_params.append(('status', params['status'])) # noqa: E501
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/x-www-form-urlencoded']) # noqa: E501
@@ -727,7 +703,6 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501
def upload_file(self, pet_id, **kwargs): # noqa: E501
"""uploads an image # 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)
@@ -751,7 +726,6 @@ def upload_file(self, pet_id, **kwargs): # noqa: E501
def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501
"""uploads an image # 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)
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 ebb9a4eb27a4..2af59b2e3300 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
@@ -105,10 +105,6 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# Authentication setting
auth_settings = [] # noqa: E501
@@ -314,45 +310,43 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def place_order(self, body, **kwargs): # noqa: E501
+ def place_order(self, order, **kwargs): # noqa: E501
"""Place an order for a pet # 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)
+ >>> thread = api.place_order(order, async=True)
>>> result = thread.get()
:param async bool
- :param Order body: order placed for purchasing the pet (required)
+ :param Order order: 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'):
- return self.place_order_with_http_info(body, **kwargs) # noqa: E501
+ return self.place_order_with_http_info(order, **kwargs) # noqa: E501
else:
- (data) = self.place_order_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.place_order_with_http_info(order, **kwargs) # noqa: E501
return data
- def place_order_with_http_info(self, body, **kwargs): # noqa: E501
+ def place_order_with_http_info(self, order, **kwargs): # noqa: E501
"""Place an order for a pet # 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)
+ >>> thread = api.place_order_with_http_info(order, async=True)
>>> result = thread.get()
:param async bool
- :param Order body: order placed for purchasing the pet (required)
+ :param Order order: order placed for purchasing the pet (required)
:return: Order
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['order'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -367,10 +361,10 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501
)
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 `place_order`") # noqa: E501
+ # verify the required parameter 'order' is set
+ if ('order' not in params or
+ params['order'] is None):
+ raise ValueError("Missing the required parameter `order` when calling `place_order`") # noqa: E501
collection_formats = {}
@@ -384,8 +378,8 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'order' in params:
+ body_params = params['order']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/xml', 'application/json']) # noqa: E501
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 1de89f28bb0e..834ab65aad46 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
@@ -33,45 +33,45 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def create_user(self, body, **kwargs): # noqa: E501
+ def create_user(self, user, **kwargs): # noqa: E501
"""Create user # 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)
+ >>> thread = api.create_user(user, async=True)
>>> result = thread.get()
:param async bool
- :param User body: Created user object (required)
+ :param User user: 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'):
- return self.create_user_with_http_info(body, **kwargs) # noqa: E501
+ return self.create_user_with_http_info(user, **kwargs) # noqa: E501
else:
- (data) = self.create_user_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.create_user_with_http_info(user, **kwargs) # noqa: E501
return data
- def create_user_with_http_info(self, body, **kwargs): # noqa: E501
+ def create_user_with_http_info(self, user, **kwargs): # noqa: E501
"""Create user # 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)
+ >>> thread = api.create_user_with_http_info(user, async=True)
>>> result = thread.get()
:param async bool
- :param User body: Created user object (required)
+ :param User user: Created user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['user'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501
)
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 `create_user`") # noqa: E501
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `create_user`") # noqa: E501
collection_formats = {}
@@ -103,12 +103,8 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'user' in params:
+ body_params = params['user']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -128,45 +124,43 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def create_users_with_array_input(self, body, **kwargs): # noqa: E501
+ def create_users_with_array_input(self, user, **kwargs): # noqa: E501
"""Creates list of users with given input array # 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)
+ >>> thread = api.create_users_with_array_input(user, async=True)
>>> result = thread.get()
:param async bool
- :param list[User] body: List of user object (required)
+ :param list[User] user: 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'):
- return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501
+ return self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501
else:
- (data) = self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501
return data
- def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: E501
+ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: E501
"""Creates list of users with given input array # 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_with_http_info(body, async=True)
+ >>> thread = api.create_users_with_array_input_with_http_info(user, async=True)
>>> result = thread.get()
:param async bool
- :param list[User] body: List of user object (required)
+ :param list[User] user: List of user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['user'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -181,10 +175,10 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa:
)
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 `create_users_with_array_input`") # noqa: E501
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `create_users_with_array_input`") # noqa: E501
collection_formats = {}
@@ -198,12 +192,8 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa:
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'user' in params:
+ body_params = params['user']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -223,45 +213,43 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa:
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def create_users_with_list_input(self, body, **kwargs): # noqa: E501
+ def create_users_with_list_input(self, user, **kwargs): # noqa: E501
"""Creates list of users with given input array # 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)
+ >>> thread = api.create_users_with_list_input(user, async=True)
>>> result = thread.get()
:param async bool
- :param list[User] body: List of user object (required)
+ :param list[User] user: 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'):
- return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501
+ return self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501
else:
- (data) = self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501
return data
- def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: E501
+ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: E501
"""Creates list of users with given input array # 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_with_http_info(body, async=True)
+ >>> thread = api.create_users_with_list_input_with_http_info(user, async=True)
>>> result = thread.get()
:param async bool
- :param list[User] body: List of user object (required)
+ :param list[User] user: List of user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['user'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -276,10 +264,10 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa:
)
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 `create_users_with_list_input`") # noqa: E501
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `create_users_with_list_input`") # noqa: E501
collection_formats = {}
@@ -293,12 +281,8 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa:
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'user' in params:
+ body_params = params['user']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -390,10 +374,6 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# Authentication setting
auth_settings = [] # noqa: E501
@@ -416,7 +396,6 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501
def get_user_by_name(self, username, **kwargs): # noqa: E501
"""Get user by user name # 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)
@@ -438,7 +417,6 @@ def get_user_by_name(self, username, **kwargs): # noqa: E501
def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501
"""Get user by user name # 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)
@@ -511,7 +489,6 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501
def login_user(self, username, password, **kwargs): # noqa: E501
"""Logs user into the system # 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)
@@ -534,7 +511,6 @@ def login_user(self, username, password, **kwargs): # noqa: E501
def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501
"""Logs user into the system # 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)
@@ -614,7 +590,6 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501
def logout_user(self, **kwargs): # noqa: E501
"""Logs out current logged in user session # 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)
@@ -635,7 +610,6 @@ def logout_user(self, **kwargs): # noqa: E501
def logout_user_with_http_info(self, **kwargs): # noqa: E501
"""Logs out current logged in user session # 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)
@@ -675,10 +649,6 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# Authentication setting
auth_settings = [] # noqa: E501
@@ -698,47 +668,47 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def update_user(self, username, body, **kwargs): # noqa: E501
+ def update_user(self, username, user, **kwargs): # noqa: E501
"""Updated user # 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)
+ >>> thread = api.update_user(username, user, async=True)
>>> result = thread.get()
:param async bool
:param str username: name that need to be deleted (required)
- :param User body: Updated user object (required)
+ :param User user: Updated 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'):
- return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501
+ return self.update_user_with_http_info(username, user, **kwargs) # noqa: E501
else:
- (data) = self.update_user_with_http_info(username, body, **kwargs) # noqa: E501
+ (data) = self.update_user_with_http_info(username, user, **kwargs) # noqa: E501
return data
- def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501
+ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501
"""Updated user # 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)
+ >>> thread = api.update_user_with_http_info(username, user, async=True)
>>> result = thread.get()
:param async bool
:param str username: name that need to be deleted (required)
- :param User body: Updated user object (required)
+ :param User user: Updated user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['username', 'body'] # noqa: E501
+ all_params = ['username', 'user'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -757,10 +727,10 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501
if ('username' not in params or
params['username'] is None):
raise ValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501
- # 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 `update_user`") # noqa: E501
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `update_user`") # noqa: E501
collection_formats = {}
@@ -776,12 +746,8 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'user' in params:
+ body_params = params['user']
# Authentication setting
auth_settings = [] # noqa: E501
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/__init__.py b/samples/client/petstore/python-asyncio/petstore_api/models/__init__.py
index c5ae381c40f0..a21d11f481c4 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/__init__.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/__init__.py
@@ -23,9 +23,11 @@
from petstore_api.models.array_of_number_only import ArrayOfNumberOnly
from petstore_api.models.array_test import ArrayTest
from petstore_api.models.capitalization import Capitalization
+from petstore_api.models.cat import Cat
from petstore_api.models.category import Category
from petstore_api.models.class_model import ClassModel
from petstore_api.models.client import Client
+from petstore_api.models.dog import Dog
from petstore_api.models.enum_arrays import EnumArrays
from petstore_api.models.enum_class import EnumClass
from petstore_api.models.enum_test import EnumTest
@@ -49,5 +51,3 @@
from petstore_api.models.special_model_name import SpecialModelName
from petstore_api.models.tag import Tag
from petstore_api.models.user import User
-from petstore_api.models.cat import Cat
-from petstore_api.models.dog import Dog
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 1bb234764abb..565975d725c8 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 7974d732fda9..02c4c7722e0e 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
@@ -39,7 +39,7 @@ class FormatTest(object):
'double': 'float',
'string': 'str',
'byte': 'str',
- 'binary': 'str',
+ 'binary': 'file',
'date': 'date',
'date_time': 'datetime',
'uuid': 'str',
@@ -305,7 +305,7 @@ def binary(self):
:return: The binary of this FormatTest. # noqa: E501
- :rtype: str
+ :rtype: file
"""
return self._binary
@@ -315,7 +315,7 @@ def binary(self, binary):
:param binary: The binary of this FormatTest. # noqa: E501
- :type: str
+ :type: file
"""
self._binary = binary
diff --git a/samples/client/petstore/python-asyncio/tests/test_pet_api.py b/samples/client/petstore/python-asyncio/tests/test_pet_api.py
index ad143e246fa2..b11762d33570 100644
--- a/samples/client/petstore/python-asyncio/tests/test_pet_api.py
+++ b/samples/client/petstore/python-asyncio/tests/test_pet_api.py
@@ -86,7 +86,7 @@ def test_separate_default_config_instances(self):
@async_test
async def test_async_with_result(self):
- await self.pet_api.add_pet(body=self.pet)
+ await self.pet_api.add_pet(self.pet)
calls = [self.pet_api.get_pet_by_id(self.pet.id),
self.pet_api.get_pet_by_id(self.pet.id)]
@@ -98,7 +98,7 @@ async def test_async_with_result(self):
@async_test
async def test_exception(self):
- await self.pet_api.add_pet(body=self.pet)
+ await self.pet_api.add_pet(self.pet)
try:
await self.pet_api.get_pet_by_id("-9999999999999")
@@ -110,7 +110,7 @@ async def test_exception(self):
@async_test
async def test_add_pet_and_get_pet_by_id(self):
- await self.pet_api.add_pet(body=self.pet)
+ await self.pet_api.add_pet(self.pet)
fetched = await self.pet_api.get_pet_by_id(pet_id=self.pet.id)
self.assertIsNotNone(fetched)
@@ -120,7 +120,7 @@ async def test_add_pet_and_get_pet_by_id(self):
@async_test
async def test_add_pet_and_get_pet_by_id_with_http_info(self):
- await self.pet_api.add_pet(body=self.pet)
+ await self.pet_api.add_pet(self.pet)
fetched = await self.pet_api.get_pet_by_id_with_http_info(pet_id=self.pet.id)
self.assertIsNotNone(fetched)
@@ -131,7 +131,7 @@ async def test_add_pet_and_get_pet_by_id_with_http_info(self):
@async_test
async def test_update_pet(self):
self.pet.name = "hello kity with updated"
- await self.pet_api.update_pet(body=self.pet)
+ await self.pet_api.update_pet(self.pet)
fetched = await self.pet_api.get_pet_by_id(pet_id=self.pet.id)
self.assertIsNotNone(fetched)
@@ -142,7 +142,7 @@ async def test_update_pet(self):
@async_test
async def test_find_pets_by_status(self):
- await self.pet_api.add_pet(body=self.pet)
+ await self.pet_api.add_pet(self.pet)
pets = await self.pet_api.find_pets_by_status(status=[self.pet.status])
self.assertIn(
self.pet.id,
@@ -151,7 +151,7 @@ async def test_find_pets_by_status(self):
@async_test
async def test_find_pets_by_tags(self):
- await self.pet_api.add_pet(body=self.pet)
+ await self.pet_api.add_pet(self.pet)
pets = await self.pet_api.find_pets_by_tags(tags=[self.tag.name])
self.assertIn(
self.pet.id,
@@ -160,7 +160,7 @@ async def test_find_pets_by_tags(self):
@async_test
async def test_update_pet_with_form(self):
- await self.pet_api.add_pet(body=self.pet)
+ await self.pet_api.add_pet(self.pet)
name = "hello kity with form updated"
status = "pending"
@@ -192,7 +192,7 @@ async def test_upload_file(self):
@async_test
async def test_delete_pet(self):
- await self.pet_api.add_pet(body=self.pet)
+ await self.pet_api.add_pet(self.pet)
await self.pet_api.delete_pet(pet_id=self.pet.id, api_key="special-key")
try:
diff --git a/samples/client/petstore/python-tornado/.swagger-codegen/VERSION b/samples/client/petstore/python-tornado/.swagger-codegen/VERSION
index 855ff9501eb8..096bf47efe31 100644
--- a/samples/client/petstore/python-tornado/.swagger-codegen/VERSION
+++ b/samples/client/petstore/python-tornado/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.4.0-SNAPSHOT
\ No newline at end of file
+3.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/python-tornado/README.md b/samples/client/petstore/python-tornado/README.md
index a49d99c556cd..68b2fc8aa78e 100644
--- a/samples/client/petstore/python-tornado/README.md
+++ b/samples/client/petstore/python-tornado/README.md
@@ -5,7 +5,7 @@ This Python package is automatically generated by the [Swagger Codegen](https://
- API version: 1.0.0
- Package version: 1.0.0
-- Build package: io.swagger.codegen.languages.PythonClientCodegen
+- Build package: org.openapitools.codegen.languages.PythonClientCodegen
## Requirements.
@@ -52,11 +52,11 @@ from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.AnotherFakeApi()
-body = petstore_api.Client() # Client | client model
+client = petstore_api.Client() # Client | client model
try:
# To test special tags
- api_response = api_instance.test_special_tags(body)
+ api_response = api_instance.test_special_tags(client)
pprint(api_response)
except ApiException as e:
print("Exception when calling AnotherFakeApi->test_special_tags: %s\n" % e)
@@ -74,6 +74,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
@@ -112,9 +113,11 @@ Class | Method | HTTP request | Description
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [ArrayTest](docs/ArrayTest.md)
- [Capitalization](docs/Capitalization.md)
+ - [Cat](docs/Cat.md)
- [Category](docs/Category.md)
- [ClassModel](docs/ClassModel.md)
- [Client](docs/Client.md)
+ - [Dog](docs/Dog.md)
- [EnumArrays](docs/EnumArrays.md)
- [EnumClass](docs/EnumClass.md)
- [EnumTest](docs/EnumTest.md)
@@ -138,8 +141,6 @@ Class | Method | HTTP request | Description
- [SpecialModelName](docs/SpecialModelName.md)
- [Tag](docs/Tag.md)
- [User](docs/User.md)
- - [Cat](docs/Cat.md)
- - [Dog](docs/Dog.md)
## Documentation For Authorization
diff --git a/samples/client/petstore/python-tornado/docs/AnotherFakeApi.md b/samples/client/petstore/python-tornado/docs/AnotherFakeApi.md
index 3d70f7a28756..32d4fa0696c7 100644
--- a/samples/client/petstore/python-tornado/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/python-tornado/docs/AnotherFakeApi.md
@@ -8,7 +8,7 @@ Method | HTTP request | Description
# **test_special_tags**
-> Client test_special_tags(body)
+> Client test_special_tags(client)
To test special tags
@@ -24,11 +24,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.AnotherFakeApi()
-body = petstore_api.Client() # Client | client model
+client = petstore_api.Client() # Client | client model
try:
# To test special tags
- api_response = api_instance.test_special_tags(body)
+ api_response = api_instance.test_special_tags(client)
pprint(api_response)
except ApiException as e:
print("Exception when calling AnotherFakeApi->test_special_tags: %s\n" % e)
@@ -38,7 +38,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
diff --git a/samples/client/petstore/python-tornado/docs/EnumTest.md b/samples/client/petstore/python-tornado/docs/EnumTest.md
index 94dd48646294..c4c1630250ff 100644
--- a/samples/client/petstore/python-tornado/docs/EnumTest.md
+++ b/samples/client/petstore/python-tornado/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-tornado/docs/FakeApi.md b/samples/client/petstore/python-tornado/docs/FakeApi.md
index 1da84500bfef..9a8f12b0c501 100644
--- a/samples/client/petstore/python-tornado/docs/FakeApi.md
+++ b/samples/client/petstore/python-tornado/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
@@ -16,7 +17,7 @@ Method | HTTP request | Description
# **fake_outer_boolean_serialize**
-> OuterBoolean fake_outer_boolean_serialize(body=body)
+> OuterBoolean fake_outer_boolean_serialize(boolean_post_body=boolean_post_body)
@@ -32,10 +33,10 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.OuterBoolean() # OuterBoolean | Input boolean as post body (optional)
+boolean_post_body = True # bool | Input boolean as post body (optional)
try:
- api_response = api_instance.fake_outer_boolean_serialize(body=body)
+ api_response = api_instance.fake_outer_boolean_serialize(boolean_post_body=boolean_post_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e)
@@ -45,7 +46,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OuterBoolean**](OuterBoolean.md)| Input boolean as post body | [optional]
+ **boolean_post_body** | **bool**| Input boolean as post body | [optional]
### Return type
@@ -58,12 +59,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
[[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)
# **fake_outer_composite_serialize**
-> OuterComposite fake_outer_composite_serialize(body=body)
+> OuterComposite fake_outer_composite_serialize(outer_composite=outer_composite)
@@ -79,10 +80,10 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
+outer_composite = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
try:
- api_response = api_instance.fake_outer_composite_serialize(body=body)
+ api_response = api_instance.fake_outer_composite_serialize(outer_composite=outer_composite)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e)
@@ -92,7 +93,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
+ **outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@@ -105,7 +106,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
[[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)
@@ -126,7 +127,7 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.OuterNumber() # OuterNumber | Input number as post body (optional)
+body = 3.4 # float | Input number as post body (optional)
try:
api_response = api_instance.fake_outer_number_serialize(body=body)
@@ -139,7 +140,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OuterNumber**](OuterNumber.md)| Input number as post body | [optional]
+ **body** | **float**| Input number as post body | [optional]
### Return type
@@ -152,7 +153,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
[[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)
@@ -173,7 +174,7 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.OuterString() # OuterString | Input string as post body (optional)
+body = 'body_example' # str | Input string as post body (optional)
try:
api_response = api_instance.fake_outer_string_serialize(body=body)
@@ -186,7 +187,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OuterString**](OuterString.md)| Input string as post body | [optional]
+ **body** | **str**| Input string as post body | [optional]
### Return type
@@ -199,12 +200,58 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
+ - **Accept**: */*
+
+[[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(query, user)
+
+
+
+### 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()
+query = 'query_example' # str |
+user = petstore_api.User() # User |
+
+try:
+ api_instance.test_body_with_query_params(query, user)
+except ApiException as e:
+ print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **query** | **str**| |
+ **user** | [**User**](User.md)| |
+
+### 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)
+> Client test_client_model(client)
To test \"client\" model
@@ -220,11 +267,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.Client() # Client | client model
+client = petstore_api.Client() # Client | client model
try:
# To test \"client\" model
- api_response = api_instance.test_client_model(body)
+ api_response = api_instance.test_client_model(client)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeApi->test_client_model: %s\n" % e)
@@ -234,7 +281,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
@@ -273,16 +320,16 @@ configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration))
-number = 8.14 # float | None
-double = 1.2 # float | None
+number = 3.4 # float | None
+double = 3.4 # float | None
pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None
-byte = 'B' # str | None
+byte = 'byte_example' # str | None
integer = 56 # int | None (optional)
int32 = 56 # int | None (optional)
-int64 = 789 # int | None (optional)
+int64 = 56 # int | None (optional)
float = 3.4 # float | None (optional)
string = 'string_example' # str | None (optional)
-binary = 'B' # str | None (optional)
+binary = '/path/to/file' # file | 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)
@@ -308,7 +355,7 @@ Name | Type | Description | Notes
**int64** | **int**| None | [optional]
**float** | **float**| None | [optional]
**string** | **str**| None | [optional]
- **binary** | **str**| None | [optional]
+ **binary** | **file**| None | [optional]
**date** | **date**| None | [optional]
**date_time** | **datetime**| None | [optional]
**password** | **str**| None | [optional]
@@ -324,13 +371,13 @@ void (empty response body)
### HTTP request headers
- - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8
- - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **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_enum_parameters**
-> test_enum_parameters(enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string, enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double)
+> test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string)
To test enum parameters
@@ -346,18 +393,18 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-enum_form_string_array = ['enum_form_string_array_example'] # list[str] | Form parameter enum test (string array) (optional)
-enum_form_string = '-efg' # str | Form parameter enum test (string) (optional) (default to -efg)
enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional)
enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to -efg)
enum_query_string_array = ['enum_query_string_array_example'] # list[str] | Query parameter enum test (string array) (optional)
enum_query_string = '-efg' # str | Query parameter enum test (string) (optional) (default to -efg)
enum_query_integer = 56 # int | Query parameter enum test (double) (optional)
-enum_query_double = 1.2 # float | Query parameter enum test (double) (optional)
+enum_query_double = 3.4 # float | Query parameter enum test (double) (optional)
+enum_form_string_array = NULL # list[str] | Form parameter enum test (string array) (optional)
+enum_form_string = 'enum_form_string_example' # str | Form parameter enum test (string) (optional)
try:
# To test enum parameters
- api_instance.test_enum_parameters(enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string, enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double)
+ api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string)
except ApiException as e:
print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e)
```
@@ -366,14 +413,14 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **enum_form_string_array** | [**list[str]**](str.md)| Form parameter enum test (string array) | [optional]
- **enum_form_string** | **str**| Form parameter enum test (string) | [optional] [default to -efg]
**enum_header_string_array** | [**list[str]**](str.md)| Header parameter enum test (string array) | [optional]
**enum_header_string** | **str**| Header parameter enum test (string) | [optional] [default to -efg]
**enum_query_string_array** | [**list[str]**](str.md)| Query parameter enum test (string array) | [optional]
**enum_query_string** | **str**| Query parameter enum test (string) | [optional] [default to -efg]
**enum_query_integer** | **int**| Query parameter enum test (double) | [optional]
**enum_query_double** | **float**| Query parameter enum test (double) | [optional]
+ **enum_form_string_array** | [**list[str]**](list.md)| Form parameter enum test (string array) | [optional]
+ **enum_form_string** | **str**| Form parameter enum test (string) | [optional]
### Return type
@@ -385,18 +432,16 @@ No authorization required
### HTTP request headers
- - **Content-Type**: */*
- - **Accept**: */*
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **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_inline_additional_properties**
-> test_inline_additional_properties(param)
+> test_inline_additional_properties(request_body)
test inline additionalProperties
-
-
### Example
```python
from __future__ import print_function
@@ -407,11 +452,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-param = NULL # object | request body
+request_body = {'key': 'request_body_example'} # str | request body
try:
# test inline additionalProperties
- api_instance.test_inline_additional_properties(param)
+ api_instance.test_inline_additional_properties(request_body)
except ApiException as e:
print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e)
```
@@ -420,7 +465,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **param** | **object**| request body |
+ **request_body** | [**str**](str.md)| request body |
### Return type
@@ -442,8 +487,6 @@ No authorization required
test json serialization of form data
-
-
### Example
```python
from __future__ import print_function
@@ -481,7 +524,7 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: application/x-www-form-urlencoded
- **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)
diff --git a/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md
index 8d11d05085a3..34d44991ff9a 100644
--- a/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md
+++ b/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md
@@ -8,7 +8,7 @@ Method | HTTP request | Description
# **test_classname**
-> Client test_classname(body)
+> Client test_classname(client)
To test class name in snake case
@@ -30,11 +30,11 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
# create an instance of the API class
api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration))
-body = petstore_api.Client() # Client | client model
+client = petstore_api.Client() # Client | client model
try:
# To test class name in snake case
- api_response = api_instance.test_classname(body)
+ api_response = api_instance.test_classname(client)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e)
@@ -44,7 +44,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
diff --git a/samples/client/petstore/python-tornado/docs/FormatTest.md b/samples/client/petstore/python-tornado/docs/FormatTest.md
index 3e489e863fa0..95d191f11c8a 100644
--- a/samples/client/petstore/python-tornado/docs/FormatTest.md
+++ b/samples/client/petstore/python-tornado/docs/FormatTest.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**double** | **float** | | [optional]
**string** | **str** | | [optional]
**byte** | **str** | |
-**binary** | **str** | | [optional]
+**binary** | [**file**](file.md) | | [optional]
**date** | **date** | |
**date_time** | **datetime** | | [optional]
**uuid** | **str** | | [optional]
diff --git a/samples/client/petstore/python-tornado/docs/PetApi.md b/samples/client/petstore/python-tornado/docs/PetApi.md
index 53b9158e6995..748cf407ea45 100644
--- a/samples/client/petstore/python-tornado/docs/PetApi.md
+++ b/samples/client/petstore/python-tornado/docs/PetApi.md
@@ -15,12 +15,10 @@ Method | HTTP request | Description
# **add_pet**
-> add_pet(body)
+> add_pet(pet)
Add a new pet to the store
-
-
### Example
```python
from __future__ import print_function
@@ -35,11 +33,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
+pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
try:
# Add a new pet to the store
- api_instance.add_pet(body)
+ api_instance.add_pet(pet)
except ApiException as e:
print("Exception when calling PetApi->add_pet: %s\n" % e)
```
@@ -48,7 +46,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -61,7 +59,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- - **Accept**: application/xml, 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)
@@ -70,8 +68,6 @@ void (empty response body)
Deletes a pet
-
-
### Example
```python
from __future__ import print_function
@@ -86,7 +82,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet_id = 789 # int | Pet id to delete
+pet_id = 56 # int | Pet id to delete
api_key = 'api_key_example' # str | (optional)
try:
@@ -114,7 +110,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
@@ -245,7 +241,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet_id = 789 # int | ID of pet to return
+pet_id = 56 # int | ID of pet to return
try:
# Find pet by ID
@@ -277,12 +273,10 @@ Name | Type | Description | Notes
[[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)
# **update_pet**
-> update_pet(body)
+> update_pet(pet)
Update an existing pet
-
-
### Example
```python
from __future__ import print_function
@@ -297,11 +291,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
+pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
try:
# Update an existing pet
- api_instance.update_pet(body)
+ api_instance.update_pet(pet)
except ApiException as e:
print("Exception when calling PetApi->update_pet: %s\n" % e)
```
@@ -310,7 +304,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -323,7 +317,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- - **Accept**: application/xml, 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)
@@ -332,8 +326,6 @@ void (empty response body)
Updates a pet in the store with form data
-
-
### Example
```python
from __future__ import print_function
@@ -348,7 +340,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet_id = 789 # int | ID of pet that needs to be updated
+pet_id = 56 # int | ID of pet that needs to be updated
name = 'name_example' # str | Updated name of the pet (optional)
status = 'status_example' # str | Updated status of the pet (optional)
@@ -378,7 +370,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- - **Accept**: application/xml, 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)
@@ -387,8 +379,6 @@ void (empty response body)
uploads an image
-
-
### Example
```python
from __future__ import print_function
@@ -403,9 +393,9 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet_id = 789 # int | ID of pet to update
+pet_id = 56 # int | ID of pet to update
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
-file = '/path/to/file.txt' # file | file to upload (optional)
+file = '/path/to/file' # file | file to upload (optional)
try:
# uploads an image
diff --git a/samples/client/petstore/python-tornado/docs/StoreApi.md b/samples/client/petstore/python-tornado/docs/StoreApi.md
index 6cbb6b451453..e4d6a7a88859 100644
--- a/samples/client/petstore/python-tornado/docs/StoreApi.md
+++ b/samples/client/petstore/python-tornado/docs/StoreApi.md
@@ -53,7 +53,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
@@ -124,7 +124,7 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.StoreApi()
-order_id = 789 # int | ID of pet that needs to be fetched
+order_id = 56 # int | ID of pet that needs to be fetched
try:
# Find purchase order by ID
@@ -156,12 +156,10 @@ 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)
# **place_order**
-> Order place_order(body)
+> Order place_order(order)
Place an order for a pet
-
-
### Example
```python
from __future__ import print_function
@@ -172,11 +170,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.StoreApi()
-body = petstore_api.Order() # Order | order placed for purchasing the pet
+order = petstore_api.Order() # Order | order placed for purchasing the pet
try:
# Place an order for a pet
- api_response = api_instance.place_order(body)
+ api_response = api_instance.place_order(order)
pprint(api_response)
except ApiException as e:
print("Exception when calling StoreApi->place_order: %s\n" % e)
@@ -186,7 +184,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Order**](Order.md)| order placed for purchasing the pet |
+ **order** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
diff --git a/samples/client/petstore/python-tornado/docs/UserApi.md b/samples/client/petstore/python-tornado/docs/UserApi.md
index e9ec08e24bbd..c7cc8b64d663 100644
--- a/samples/client/petstore/python-tornado/docs/UserApi.md
+++ b/samples/client/petstore/python-tornado/docs/UserApi.md
@@ -15,7 +15,7 @@ Method | HTTP request | Description
# **create_user**
-> create_user(body)
+> create_user(user)
Create user
@@ -31,11 +31,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-body = petstore_api.User() # User | Created user object
+user = petstore_api.User() # User | Created user object
try:
# Create user
- api_instance.create_user(body)
+ api_instance.create_user(user)
except ApiException as e:
print("Exception when calling UserApi->create_user: %s\n" % e)
```
@@ -44,7 +44,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**User**](User.md)| Created user object |
+ **user** | [**User**](User.md)| Created user object |
### Return type
@@ -57,17 +57,15 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
# **create_users_with_array_input**
-> create_users_with_array_input(body)
+> create_users_with_array_input(user)
Creates list of users with given input array
-
-
### Example
```python
from __future__ import print_function
@@ -78,11 +76,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-body = [petstore_api.User()] # list[User] | List of user object
+user = NULL # list[User] | List of user object
try:
# Creates list of users with given input array
- api_instance.create_users_with_array_input(body)
+ api_instance.create_users_with_array_input(user)
except ApiException as e:
print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e)
```
@@ -91,7 +89,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**list[User]**](User.md)| List of user object |
+ **user** | [**list[User]**](list.md)| List of user object |
### Return type
@@ -104,17 +102,15 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
# **create_users_with_list_input**
-> create_users_with_list_input(body)
+> create_users_with_list_input(user)
Creates list of users with given input array
-
-
### Example
```python
from __future__ import print_function
@@ -125,11 +121,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-body = [petstore_api.User()] # list[User] | List of user object
+user = NULL # list[User] | List of user object
try:
# Creates list of users with given input array
- api_instance.create_users_with_list_input(body)
+ api_instance.create_users_with_list_input(user)
except ApiException as e:
print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e)
```
@@ -138,7 +134,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**list[User]**](User.md)| List of user object |
+ **user** | [**list[User]**](list.md)| List of user object |
### Return type
@@ -151,7 +147,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
@@ -198,7 +194,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
@@ -207,8 +203,6 @@ No authorization required
Get user by user name
-
-
### Example
```python
from __future__ import print_function
@@ -255,8 +249,6 @@ No authorization required
Logs user into the system
-
-
### Example
```python
from __future__ import print_function
@@ -305,8 +297,6 @@ No authorization required
Logs out current logged in user session
-
-
### Example
```python
from __future__ import print_function
@@ -339,12 +329,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
# **update_user**
-> update_user(username, body)
+> update_user(username, user)
Updated user
@@ -361,11 +351,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | name that need to be deleted
-body = petstore_api.User() # User | Updated user object
+user = petstore_api.User() # User | Updated user object
try:
# Updated user
- api_instance.update_user(username, body)
+ api_instance.update_user(username, user)
except ApiException as e:
print("Exception when calling UserApi->update_user: %s\n" % e)
```
@@ -375,7 +365,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| name that need to be deleted |
- **body** | [**User**](User.md)| Updated user object |
+ **user** | [**User**](User.md)| Updated user object |
### Return type
@@ -388,7 +378,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
diff --git a/samples/client/petstore/python-tornado/petstore_api/__init__.py b/samples/client/petstore/python-tornado/petstore_api/__init__.py
index 8bf367cc5b81..96f34b3da498 100644
--- a/samples/client/petstore/python-tornado/petstore_api/__init__.py
+++ b/samples/client/petstore/python-tornado/petstore_api/__init__.py
@@ -35,9 +35,11 @@
from petstore_api.models.array_of_number_only import ArrayOfNumberOnly
from petstore_api.models.array_test import ArrayTest
from petstore_api.models.capitalization import Capitalization
+from petstore_api.models.cat import Cat
from petstore_api.models.category import Category
from petstore_api.models.class_model import ClassModel
from petstore_api.models.client import Client
+from petstore_api.models.dog import Dog
from petstore_api.models.enum_arrays import EnumArrays
from petstore_api.models.enum_class import EnumClass
from petstore_api.models.enum_test import EnumTest
@@ -61,5 +63,3 @@
from petstore_api.models.special_model_name import SpecialModelName
from petstore_api.models.tag import Tag
from petstore_api.models.user import User
-from petstore_api.models.cat import Cat
-from petstore_api.models.dog import Dog
diff --git a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py
index 0096dad1a37a..bc8552682cc6 100644
--- a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py
+++ b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py
@@ -33,45 +33,45 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def test_special_tags(self, body, **kwargs): # noqa: E501
+ def test_special_tags(self, client, **kwargs): # noqa: E501
"""To test special tags # 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)
+ >>> thread = api.test_special_tags(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: 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'):
- return self.test_special_tags_with_http_info(body, **kwargs) # noqa: E501
+ return self.test_special_tags_with_http_info(client, **kwargs) # noqa: E501
else:
- (data) = self.test_special_tags_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.test_special_tags_with_http_info(client, **kwargs) # noqa: E501
return data
- def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501
+ def test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501
"""To test special tags # 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)
+ >>> thread = api.test_special_tags_with_http_info(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['client'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501
)
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_special_tags`") # noqa: E501
+ # verify the required parameter 'client' is set
+ if ('client' not in params or
+ params['client'] is None):
+ raise ValueError("Missing the required parameter `client` when calling `test_special_tags`") # noqa: E501
collection_formats = {}
@@ -103,8 +103,8 @@ def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'client' in params:
+ body_params = params['client']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py
index 4c52ee51647d..850af1f38e00 100644
--- a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py
+++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py
@@ -43,7 +43,7 @@ def fake_outer_boolean_serialize(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterBoolean body: Input boolean as post body
+ :param bool boolean_post_body: Input boolean as post body
:return: OuterBoolean
If the method is called asynchronously,
returns the request thread.
@@ -65,13 +65,13 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterBoolean body: Input boolean as post body
+ :param bool boolean_post_body: Input boolean as post body
:return: OuterBoolean
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['boolean_post_body'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -99,8 +99,12 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'boolean_post_body' in params:
+ body_params = params['boolean_post_body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['*/*']) # noqa: E501
+
# Authentication setting
auth_settings = [] # noqa: E501
@@ -130,7 +134,7 @@ def fake_outer_composite_serialize(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterComposite body: Input composite as post body
+ :param OuterComposite outer_composite: Input composite as post body
:return: OuterComposite
If the method is called asynchronously,
returns the request thread.
@@ -152,13 +156,13 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterComposite body: Input composite as post body
+ :param OuterComposite outer_composite: Input composite as post body
:return: OuterComposite
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['outer_composite'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -186,8 +190,12 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'outer_composite' in params:
+ body_params = params['outer_composite']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['*/*']) # noqa: E501
+
# Authentication setting
auth_settings = [] # noqa: E501
@@ -217,7 +225,7 @@ def fake_outer_number_serialize(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterNumber body: Input number as post body
+ :param float body: Input number as post body
:return: OuterNumber
If the method is called asynchronously,
returns the request thread.
@@ -239,7 +247,7 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterNumber body: Input number as post body
+ :param float body: Input number as post body
:return: OuterNumber
If the method is called asynchronously,
returns the request thread.
@@ -275,6 +283,10 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501
body_params = None
if 'body' in params:
body_params = params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['*/*']) # noqa: E501
+
# Authentication setting
auth_settings = [] # noqa: E501
@@ -304,7 +316,7 @@ def fake_outer_string_serialize(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterString body: Input string as post body
+ :param str body: Input string as post body
:return: OuterString
If the method is called asynchronously,
returns the request thread.
@@ -326,7 +338,7 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterString body: Input string as post body
+ :param str body: Input string as post body
:return: OuterString
If the method is called asynchronously,
returns the request thread.
@@ -362,6 +374,10 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501
body_params = None
if 'body' in params:
body_params = params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['*/*']) # noqa: E501
+
# Authentication setting
auth_settings = [] # noqa: E501
@@ -381,45 +397,146 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def test_client_model(self, body, **kwargs): # noqa: E501
+ def test_body_with_query_params(self, query, user, **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(query, user, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str query: (required)
+ :param User user: (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(query, user, **kwargs) # noqa: E501
+ else:
+ (data) = self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501
+ return data
+
+ def test_body_with_query_params_with_http_info(self, query, user, **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(query, user, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str query: (required)
+ :param User user: (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['query', 'user'] # 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 '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
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` 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 'user' in params:
+ body_params = params['user']
+ # 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, client, **kwargs): # noqa: E501
"""To test \"client\" model # 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)
+ >>> thread = api.test_client_model(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: 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'):
- return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501
+ return self.test_client_model_with_http_info(client, **kwargs) # noqa: E501
else:
- (data) = self.test_client_model_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.test_client_model_with_http_info(client, **kwargs) # noqa: E501
return data
- def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501
+ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501
"""To test \"client\" model # 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)
+ >>> thread = api.test_client_model_with_http_info(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['client'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -434,10 +551,10 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501
)
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_client_model`") # noqa: E501
+ # verify the required parameter 'client' is set
+ if ('client' not in params or
+ params['client'] is None):
+ raise ValueError("Missing the required parameter `client` when calling `test_client_model`") # noqa: E501
collection_formats = {}
@@ -451,8 +568,8 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'client' in params:
+ body_params = params['client']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
@@ -499,7 +616,7 @@ def test_endpoint_parameters(self, number, double, pattern_without_delimiter, by
:param int int64: None
:param float float: None
:param str string: None
- :param str binary: None
+ :param file binary: None
:param date date: None
:param datetime date_time: None
:param str password: None
@@ -534,7 +651,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou
:param int int64: None
:param float float: None
:param str string: None
- :param str binary: None
+ :param file binary: None
:param date date: None
:param datetime date_time: None
:param str password: None
@@ -584,7 +701,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou
raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") # noqa: E501
if 'double' in params and params['double'] < 67.8: # noqa: E501
raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") # noqa: E501
- if 'pattern_without_delimiter' in params and not re.search('^[A-Z].*', params['pattern_without_delimiter']): # noqa: E501
+ if 'pattern_without_delimiter' in params and not re.search('', params['pattern_without_delimiter']): # noqa: E501
raise ValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`") # noqa: E501
if 'integer' in params and params['integer'] > 100: # noqa: E501
raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501
@@ -596,7 +713,7 @@ 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 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 'string' in params and not re.search('[a-z]', params['string'], flags=re.IGNORECASE): # noqa: E501
+ if 'string' in params and not re.search('', params['string']): # 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
len(params['password']) > 64):
@@ -633,7 +750,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou
if 'byte' in params:
form_params.append(('byte', params['byte'])) # noqa: E501
if 'binary' in params:
- form_params.append(('binary', params['binary'])) # noqa: E501
+ local_var_files['binary'] = params['binary'] # noqa: E501
if 'date' in params:
form_params.append(('date', params['date'])) # noqa: E501
if 'date_time' in params:
@@ -644,13 +761,9 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou
form_params.append(('callback', params['param_callback'])) # noqa: E501
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml; charset=utf-8', 'application/json; charset=utf-8']) # noqa: E501
-
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/xml; charset=utf-8', 'application/json; charset=utf-8']) # noqa: E501
+ ['application/x-www-form-urlencoded']) # noqa: E501
# Authentication setting
auth_settings = ['http_basic_test'] # noqa: E501
@@ -681,14 +794,14 @@ def test_enum_parameters(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async 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)
:param str enum_header_string: Header parameter enum test (string)
:param list[str] enum_query_string_array: Query parameter enum test (string array)
:param str enum_query_string: Query parameter enum test (string)
:param int enum_query_integer: Query parameter enum test (double)
:param float enum_query_double: Query parameter enum test (double)
+ :param list[str] enum_form_string_array: Form parameter enum test (string array)
+ :param str enum_form_string: Form parameter enum test (string)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -710,20 +823,20 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async 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)
:param str enum_header_string: Header parameter enum test (string)
:param list[str] enum_query_string_array: Query parameter enum test (string array)
:param str enum_query_string: Query parameter enum test (string)
:param int enum_query_integer: Query parameter enum test (double)
:param float enum_query_double: Query parameter enum test (double)
+ :param list[str] enum_form_string_array: Form parameter enum test (string array)
+ :param str enum_form_string: Form parameter enum test (string)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- 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 = ['enum_header_string_array', 'enum_header_string', 'enum_query_string_array', 'enum_query_string', 'enum_query_integer', 'enum_query_double', 'enum_form_string_array', 'enum_form_string'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -746,16 +859,18 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501
query_params = []
if 'enum_query_string_array' in params:
query_params.append(('enum_query_string_array', params['enum_query_string_array'])) # noqa: E501
- collection_formats['enum_query_string_array'] = 'csv' # noqa: E501
+ collection_formats['enum_query_string_array'] = '' # noqa: E501
if 'enum_query_string' in params:
query_params.append(('enum_query_string', params['enum_query_string'])) # noqa: E501
if 'enum_query_integer' in params:
query_params.append(('enum_query_integer', params['enum_query_integer'])) # noqa: E501
+ if 'enum_query_double' in params:
+ query_params.append(('enum_query_double', params['enum_query_double'])) # noqa: E501
header_params = {}
if 'enum_header_string_array' in params:
header_params['enum_header_string_array'] = params['enum_header_string_array'] # noqa: E501
- collection_formats['enum_header_string_array'] = 'csv' # noqa: E501
+ collection_formats['enum_header_string_array'] = '' # noqa: E501
if 'enum_header_string' in params:
header_params['enum_header_string'] = params['enum_header_string'] # noqa: E501
@@ -763,20 +878,13 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
if 'enum_form_string_array' in params:
form_params.append(('enum_form_string_array', params['enum_form_string_array'])) # noqa: E501
- collection_formats['enum_form_string_array'] = 'csv' # noqa: E501
if 'enum_form_string' in params:
form_params.append(('enum_form_string', params['enum_form_string'])) # noqa: E501
- if 'enum_query_double' in params:
- form_params.append(('enum_query_double', params['enum_query_double'])) # noqa: E501
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['*/*']) # noqa: E501
-
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['*/*']) # noqa: E501
+ ['application/x-www-form-urlencoded']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
@@ -797,45 +905,43 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def test_inline_additional_properties(self, param, **kwargs): # noqa: E501
+ def test_inline_additional_properties(self, request_body, **kwargs): # noqa: E501
"""test inline additionalProperties # 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)
+ >>> thread = api.test_inline_additional_properties(request_body, async=True)
>>> result = thread.get()
:param async bool
- :param object param: request body (required)
+ :param str request_body: 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'):
- return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501
+ return self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501
else:
- (data) = self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501
+ (data) = self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501
return data
- def test_inline_additional_properties_with_http_info(self, param, **kwargs): # noqa: E501
+ def test_inline_additional_properties_with_http_info(self, request_body, **kwargs): # noqa: E501
"""test inline additionalProperties # 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_with_http_info(param, async=True)
+ >>> thread = api.test_inline_additional_properties_with_http_info(request_body, async=True)
>>> result = thread.get()
:param async bool
- :param object param: request body (required)
+ :param str request_body: request body (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['param'] # noqa: E501
+ all_params = ['request_body'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -850,10 +956,10 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): #
)
params[key] = val
del params['kwargs']
- # verify the required parameter 'param' is set
- if ('param' not in params or
- params['param'] is None):
- raise ValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501
+ # verify the required parameter 'request_body' is set
+ if ('request_body' not in params or
+ params['request_body'] is None):
+ raise ValueError("Missing the required parameter `request_body` when calling `test_inline_additional_properties`") # noqa: E501
collection_formats = {}
@@ -867,8 +973,8 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): #
local_var_files = {}
body_params = None
- if 'param' in params:
- body_params = params['param']
+ if 'request_body' in params:
+ body_params = params['request_body']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
@@ -895,7 +1001,6 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): #
def test_json_form_data(self, param, param2, **kwargs): # noqa: E501
"""test json serialization of form data # 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)
@@ -918,7 +1023,6 @@ def test_json_form_data(self, param, param2, **kwargs): # noqa: E501
def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: E501
"""test json serialization of form data # 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_with_http_info(param, param2, async=True)
@@ -974,7 +1078,7 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa:
body_params = None
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
+ ['application/x-www-form-urlencoded']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py
index 230aa5ec4fca..6b812b5a3fa8 100644
--- a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py
+++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py
@@ -33,45 +33,45 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def test_classname(self, body, **kwargs): # noqa: E501
+ def test_classname(self, client, **kwargs): # noqa: E501
"""To test class name in snake case # 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)
+ >>> thread = api.test_classname(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: 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'):
- return self.test_classname_with_http_info(body, **kwargs) # noqa: E501
+ return self.test_classname_with_http_info(client, **kwargs) # noqa: E501
else:
- (data) = self.test_classname_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.test_classname_with_http_info(client, **kwargs) # noqa: E501
return data
- def test_classname_with_http_info(self, body, **kwargs): # noqa: E501
+ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501
"""To test class name in snake case # 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)
+ >>> thread = api.test_classname_with_http_info(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['client'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501
)
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_classname`") # noqa: E501
+ # verify the required parameter 'client' is set
+ if ('client' not in params or
+ params['client'] is None):
+ raise ValueError("Missing the required parameter `client` when calling `test_classname`") # noqa: E501
collection_formats = {}
@@ -103,8 +103,8 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'client' in params:
+ body_params = params['client']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
diff --git a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py
index ff1026f3fae1..33dddbdf7aac 100644
--- a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py
+++ b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py
@@ -33,45 +33,43 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def add_pet(self, body, **kwargs): # noqa: E501
+ def add_pet(self, pet, **kwargs): # noqa: E501
"""Add a new pet to the store # 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)
+ >>> thread = api.add_pet(pet, async=True)
>>> result = thread.get()
:param async bool
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param Pet pet: 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'):
- return self.add_pet_with_http_info(body, **kwargs) # noqa: E501
+ return self.add_pet_with_http_info(pet, **kwargs) # noqa: E501
else:
- (data) = self.add_pet_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.add_pet_with_http_info(pet, **kwargs) # noqa: E501
return data
- def add_pet_with_http_info(self, body, **kwargs): # noqa: E501
+ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501
"""Add a new pet to the store # 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)
+ >>> thread = api.add_pet_with_http_info(pet, async=True)
>>> result = thread.get()
:param async bool
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param Pet pet: Pet object that needs to be added to the store (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['pet'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +84,10 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501
)
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 `add_pet`") # noqa: E501
+ # verify the required parameter 'pet' is set
+ if ('pet' not in params or
+ params['pet'] is None):
+ raise ValueError("Missing the required parameter `pet` when calling `add_pet`") # noqa: E501
collection_formats = {}
@@ -103,12 +101,8 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'pet' in params:
+ body_params = params['pet']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json', 'application/xml']) # noqa: E501
@@ -135,7 +129,6 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501
def delete_pet(self, pet_id, **kwargs): # noqa: E501
"""Deletes a pet # 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)
@@ -158,7 +151,6 @@ def delete_pet(self, pet_id, **kwargs): # noqa: E501
def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501
"""Deletes a pet # 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)
@@ -208,10 +200,6 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# Authentication setting
auth_settings = ['petstore_auth'] # noqa: E501
@@ -296,7 +284,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501
query_params = []
if 'status' in params:
query_params.append(('status', params['status'])) # noqa: E501
- collection_formats['status'] = 'csv' # noqa: E501
+ collection_formats['status'] = '' # noqa: E501
header_params = {}
@@ -392,7 +380,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501
query_params = []
if 'tags' in params:
query_params.append(('tags', params['tags'])) # noqa: E501
- collection_formats['tags'] = 'csv' # noqa: E501
+ collection_formats['tags'] = '' # noqa: E501
header_params = {}
@@ -518,45 +506,43 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def update_pet(self, body, **kwargs): # noqa: E501
+ def update_pet(self, pet, **kwargs): # noqa: E501
"""Update an existing pet # 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)
+ >>> thread = api.update_pet(pet, async=True)
>>> result = thread.get()
:param async bool
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param Pet pet: 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'):
- return self.update_pet_with_http_info(body, **kwargs) # noqa: E501
+ return self.update_pet_with_http_info(pet, **kwargs) # noqa: E501
else:
- (data) = self.update_pet_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.update_pet_with_http_info(pet, **kwargs) # noqa: E501
return data
- def update_pet_with_http_info(self, body, **kwargs): # noqa: E501
+ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501
"""Update an existing pet # 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)
+ >>> thread = api.update_pet_with_http_info(pet, async=True)
>>> result = thread.get()
:param async bool
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param Pet pet: Pet object that needs to be added to the store (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['pet'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -571,10 +557,10 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501
)
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 `update_pet`") # noqa: E501
+ # verify the required parameter 'pet' is set
+ if ('pet' not in params or
+ params['pet'] is None):
+ raise ValueError("Missing the required parameter `pet` when calling `update_pet`") # noqa: E501
collection_formats = {}
@@ -588,12 +574,8 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'pet' in params:
+ body_params = params['pet']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json', 'application/xml']) # noqa: E501
@@ -620,7 +602,6 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501
def update_pet_with_form(self, pet_id, **kwargs): # noqa: E501
"""Updates a pet in the store with form data # 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)
@@ -644,7 +625,6 @@ def update_pet_with_form(self, pet_id, **kwargs): # noqa: E501
def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501
"""Updates a pet in the store with form data # 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)
@@ -697,10 +677,6 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501
form_params.append(('status', params['status'])) # noqa: E501
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/x-www-form-urlencoded']) # noqa: E501
@@ -727,7 +703,6 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501
def upload_file(self, pet_id, **kwargs): # noqa: E501
"""uploads an image # 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)
@@ -751,7 +726,6 @@ def upload_file(self, pet_id, **kwargs): # noqa: E501
def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501
"""uploads an image # 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)
diff --git a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py
index ebb9a4eb27a4..2af59b2e3300 100644
--- a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py
+++ b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py
@@ -105,10 +105,6 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# Authentication setting
auth_settings = [] # noqa: E501
@@ -314,45 +310,43 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def place_order(self, body, **kwargs): # noqa: E501
+ def place_order(self, order, **kwargs): # noqa: E501
"""Place an order for a pet # 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)
+ >>> thread = api.place_order(order, async=True)
>>> result = thread.get()
:param async bool
- :param Order body: order placed for purchasing the pet (required)
+ :param Order order: 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'):
- return self.place_order_with_http_info(body, **kwargs) # noqa: E501
+ return self.place_order_with_http_info(order, **kwargs) # noqa: E501
else:
- (data) = self.place_order_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.place_order_with_http_info(order, **kwargs) # noqa: E501
return data
- def place_order_with_http_info(self, body, **kwargs): # noqa: E501
+ def place_order_with_http_info(self, order, **kwargs): # noqa: E501
"""Place an order for a pet # 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)
+ >>> thread = api.place_order_with_http_info(order, async=True)
>>> result = thread.get()
:param async bool
- :param Order body: order placed for purchasing the pet (required)
+ :param Order order: order placed for purchasing the pet (required)
:return: Order
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['order'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -367,10 +361,10 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501
)
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 `place_order`") # noqa: E501
+ # verify the required parameter 'order' is set
+ if ('order' not in params or
+ params['order'] is None):
+ raise ValueError("Missing the required parameter `order` when calling `place_order`") # noqa: E501
collection_formats = {}
@@ -384,8 +378,8 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'order' in params:
+ body_params = params['order']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/xml', 'application/json']) # noqa: E501
diff --git a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py
index 1de89f28bb0e..834ab65aad46 100644
--- a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py
+++ b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py
@@ -33,45 +33,45 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def create_user(self, body, **kwargs): # noqa: E501
+ def create_user(self, user, **kwargs): # noqa: E501
"""Create user # 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)
+ >>> thread = api.create_user(user, async=True)
>>> result = thread.get()
:param async bool
- :param User body: Created user object (required)
+ :param User user: 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'):
- return self.create_user_with_http_info(body, **kwargs) # noqa: E501
+ return self.create_user_with_http_info(user, **kwargs) # noqa: E501
else:
- (data) = self.create_user_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.create_user_with_http_info(user, **kwargs) # noqa: E501
return data
- def create_user_with_http_info(self, body, **kwargs): # noqa: E501
+ def create_user_with_http_info(self, user, **kwargs): # noqa: E501
"""Create user # 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)
+ >>> thread = api.create_user_with_http_info(user, async=True)
>>> result = thread.get()
:param async bool
- :param User body: Created user object (required)
+ :param User user: Created user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['user'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501
)
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 `create_user`") # noqa: E501
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `create_user`") # noqa: E501
collection_formats = {}
@@ -103,12 +103,8 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'user' in params:
+ body_params = params['user']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -128,45 +124,43 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def create_users_with_array_input(self, body, **kwargs): # noqa: E501
+ def create_users_with_array_input(self, user, **kwargs): # noqa: E501
"""Creates list of users with given input array # 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)
+ >>> thread = api.create_users_with_array_input(user, async=True)
>>> result = thread.get()
:param async bool
- :param list[User] body: List of user object (required)
+ :param list[User] user: 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'):
- return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501
+ return self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501
else:
- (data) = self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501
return data
- def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: E501
+ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: E501
"""Creates list of users with given input array # 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_with_http_info(body, async=True)
+ >>> thread = api.create_users_with_array_input_with_http_info(user, async=True)
>>> result = thread.get()
:param async bool
- :param list[User] body: List of user object (required)
+ :param list[User] user: List of user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['user'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -181,10 +175,10 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa:
)
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 `create_users_with_array_input`") # noqa: E501
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `create_users_with_array_input`") # noqa: E501
collection_formats = {}
@@ -198,12 +192,8 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa:
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'user' in params:
+ body_params = params['user']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -223,45 +213,43 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa:
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def create_users_with_list_input(self, body, **kwargs): # noqa: E501
+ def create_users_with_list_input(self, user, **kwargs): # noqa: E501
"""Creates list of users with given input array # 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)
+ >>> thread = api.create_users_with_list_input(user, async=True)
>>> result = thread.get()
:param async bool
- :param list[User] body: List of user object (required)
+ :param list[User] user: 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'):
- return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501
+ return self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501
else:
- (data) = self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501
return data
- def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: E501
+ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: E501
"""Creates list of users with given input array # 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_with_http_info(body, async=True)
+ >>> thread = api.create_users_with_list_input_with_http_info(user, async=True)
>>> result = thread.get()
:param async bool
- :param list[User] body: List of user object (required)
+ :param list[User] user: List of user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['user'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -276,10 +264,10 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa:
)
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 `create_users_with_list_input`") # noqa: E501
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `create_users_with_list_input`") # noqa: E501
collection_formats = {}
@@ -293,12 +281,8 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa:
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'user' in params:
+ body_params = params['user']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -390,10 +374,6 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# Authentication setting
auth_settings = [] # noqa: E501
@@ -416,7 +396,6 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501
def get_user_by_name(self, username, **kwargs): # noqa: E501
"""Get user by user name # 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)
@@ -438,7 +417,6 @@ def get_user_by_name(self, username, **kwargs): # noqa: E501
def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501
"""Get user by user name # 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)
@@ -511,7 +489,6 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501
def login_user(self, username, password, **kwargs): # noqa: E501
"""Logs user into the system # 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)
@@ -534,7 +511,6 @@ def login_user(self, username, password, **kwargs): # noqa: E501
def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501
"""Logs user into the system # 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)
@@ -614,7 +590,6 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501
def logout_user(self, **kwargs): # noqa: E501
"""Logs out current logged in user session # 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)
@@ -635,7 +610,6 @@ def logout_user(self, **kwargs): # noqa: E501
def logout_user_with_http_info(self, **kwargs): # noqa: E501
"""Logs out current logged in user session # 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)
@@ -675,10 +649,6 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# Authentication setting
auth_settings = [] # noqa: E501
@@ -698,47 +668,47 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def update_user(self, username, body, **kwargs): # noqa: E501
+ def update_user(self, username, user, **kwargs): # noqa: E501
"""Updated user # 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)
+ >>> thread = api.update_user(username, user, async=True)
>>> result = thread.get()
:param async bool
:param str username: name that need to be deleted (required)
- :param User body: Updated user object (required)
+ :param User user: Updated 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'):
- return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501
+ return self.update_user_with_http_info(username, user, **kwargs) # noqa: E501
else:
- (data) = self.update_user_with_http_info(username, body, **kwargs) # noqa: E501
+ (data) = self.update_user_with_http_info(username, user, **kwargs) # noqa: E501
return data
- def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501
+ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501
"""Updated user # 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)
+ >>> thread = api.update_user_with_http_info(username, user, async=True)
>>> result = thread.get()
:param async bool
:param str username: name that need to be deleted (required)
- :param User body: Updated user object (required)
+ :param User user: Updated user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['username', 'body'] # noqa: E501
+ all_params = ['username', 'user'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -757,10 +727,10 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501
if ('username' not in params or
params['username'] is None):
raise ValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501
- # 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 `update_user`") # noqa: E501
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `update_user`") # noqa: E501
collection_formats = {}
@@ -776,12 +746,8 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'user' in params:
+ body_params = params['user']
# Authentication setting
auth_settings = [] # noqa: E501
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/__init__.py b/samples/client/petstore/python-tornado/petstore_api/models/__init__.py
index c5ae381c40f0..a21d11f481c4 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/__init__.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/__init__.py
@@ -23,9 +23,11 @@
from petstore_api.models.array_of_number_only import ArrayOfNumberOnly
from petstore_api.models.array_test import ArrayTest
from petstore_api.models.capitalization import Capitalization
+from petstore_api.models.cat import Cat
from petstore_api.models.category import Category
from petstore_api.models.class_model import ClassModel
from petstore_api.models.client import Client
+from petstore_api.models.dog import Dog
from petstore_api.models.enum_arrays import EnumArrays
from petstore_api.models.enum_class import EnumClass
from petstore_api.models.enum_test import EnumTest
@@ -49,5 +51,3 @@
from petstore_api.models.special_model_name import SpecialModelName
from petstore_api.models.tag import Tag
from petstore_api.models.user import User
-from petstore_api.models.cat import Cat
-from petstore_api.models.dog import Dog
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py b/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py
index 1bb234764abb..565975d725c8 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py
+++ b/samples/client/petstore/python-tornado/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-tornado/petstore_api/models/format_test.py b/samples/client/petstore/python-tornado/petstore_api/models/format_test.py
index 7974d732fda9..9386f538a843 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/format_test.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/format_test.py
@@ -16,6 +16,8 @@
import six
+from petstore_api.models.file import file # noqa: F401,E501
+
class FormatTest(object):
"""NOTE: This class is auto generated by the swagger code generator program.
@@ -39,7 +41,7 @@ class FormatTest(object):
'double': 'float',
'string': 'str',
'byte': 'str',
- 'binary': 'str',
+ 'binary': 'file',
'date': 'date',
'date_time': 'datetime',
'uuid': 'str',
@@ -305,7 +307,7 @@ def binary(self):
:return: The binary of this FormatTest. # noqa: E501
- :rtype: str
+ :rtype: file
"""
return self._binary
@@ -315,7 +317,7 @@ def binary(self, binary):
:param binary: The binary of this FormatTest. # noqa: E501
- :type: str
+ :type: file
"""
self._binary = binary
diff --git a/samples/client/petstore/python-tornado/setup.py b/samples/client/petstore/python-tornado/setup.py
index ea0a40a1b06f..2ee1fc71513d 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>=4.2,<5")
setup(
name=NAME,
diff --git a/samples/client/petstore/python-tornado/tests/test_pet_api.py b/samples/client/petstore/python-tornado/tests/test_pet_api.py
index 622b89868a17..90be23b2bad3 100644
--- a/samples/client/petstore/python-tornado/tests/test_pet_api.py
+++ b/samples/client/petstore/python-tornado/tests/test_pet_api.py
@@ -86,7 +86,7 @@ def test_separate_default_config_instances(self):
def test_async_request(self):
# It works but tornado is async by default and creating threadpool
# to do it looks crazy ;)
- thread = self.pet_api.add_pet(body=self.pet, async=True)
+ thread = self.pet_api.add_pet(self.pet, async=True)
response = yield thread.get()
self.assertIsNone(response)
@@ -96,7 +96,7 @@ def test_async_request(self):
@gen_test
def test_async_with_result(self):
- yield self.pet_api.add_pet(body=self.pet)
+ yield self.pet_api.add_pet(self.pet)
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)
@@ -109,7 +109,7 @@ def test_async_with_result(self):
@gen_test
def test_tornado_async_with_result(self):
- yield self.pet_api.add_pet(body=self.pet)
+ yield self.pet_api.add_pet(self.pet)
query1 = self.pet_api.get_pet_by_id(self.pet.id)
query2 = self.pet_api.get_pet_by_id(self.pet.id)
@@ -122,7 +122,7 @@ def test_tornado_async_with_result(self):
@gen_test
def test_add_pet_and_get_pet_by_id(self):
- yield self.pet_api.add_pet(body=self.pet)
+ yield self.pet_api.add_pet(self.pet)
fetched = yield self.pet_api.get_pet_by_id(pet_id=self.pet.id)
self.assertIsNotNone(fetched)
@@ -132,7 +132,7 @@ def test_add_pet_and_get_pet_by_id(self):
@gen_test
def test_add_pet_and_get_pet_by_id_with_http_info(self):
- yield self.pet_api.add_pet(body=self.pet)
+ yield self.pet_api.add_pet(self.pet)
fetched = yield self.pet_api.get_pet_by_id_with_http_info(pet_id=self.pet.id)
self.assertIsNotNone(fetched)
@@ -143,7 +143,7 @@ def test_add_pet_and_get_pet_by_id_with_http_info(self):
@gen_test
def test_update_pet(self):
self.pet.name = "hello kity with updated"
- yield self.pet_api.update_pet(body=self.pet)
+ yield self.pet_api.update_pet(self.pet)
fetched = yield self.pet_api.get_pet_by_id(pet_id=self.pet.id)
self.assertIsNotNone(fetched)
@@ -154,7 +154,7 @@ def test_update_pet(self):
@gen_test
def test_find_pets_by_status(self):
- yield self.pet_api.add_pet(body=self.pet)
+ yield self.pet_api.add_pet(self.pet)
pets = yield self.pet_api.find_pets_by_status(status=[self.pet.status])
self.assertIn(
self.pet.id,
@@ -163,7 +163,7 @@ def test_find_pets_by_status(self):
@gen_test
def test_find_pets_by_tags(self):
- yield self.pet_api.add_pet(body=self.pet)
+ yield self.pet_api.add_pet(self.pet)
pets = yield self.pet_api.find_pets_by_tags(tags=[self.tag.name])
self.assertIn(
self.pet.id,
@@ -172,7 +172,7 @@ def test_find_pets_by_tags(self):
@gen_test
def test_update_pet_with_form(self):
- yield self.pet_api.add_pet(body=self.pet)
+ yield self.pet_api.add_pet(self.pet)
name = "hello kity with form updated"
status = "pending"
@@ -204,7 +204,7 @@ def test_upload_file(self):
@gen_test
def test_delete_pet(self):
- yield self.pet_api.add_pet(body=self.pet)
+ yield self.pet_api.add_pet(self.pet)
yield self.pet_api.delete_pet(pet_id=self.pet.id, api_key="special-key")
try:
diff --git a/samples/client/petstore/python/.swagger-codegen/VERSION b/samples/client/petstore/python/.swagger-codegen/VERSION
index 855ff9501eb8..096bf47efe31 100644
--- a/samples/client/petstore/python/.swagger-codegen/VERSION
+++ b/samples/client/petstore/python/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.4.0-SNAPSHOT
\ No newline at end of file
+3.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md
index a49d99c556cd..68b2fc8aa78e 100644
--- a/samples/client/petstore/python/README.md
+++ b/samples/client/petstore/python/README.md
@@ -5,7 +5,7 @@ This Python package is automatically generated by the [Swagger Codegen](https://
- API version: 1.0.0
- Package version: 1.0.0
-- Build package: io.swagger.codegen.languages.PythonClientCodegen
+- Build package: org.openapitools.codegen.languages.PythonClientCodegen
## Requirements.
@@ -52,11 +52,11 @@ from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.AnotherFakeApi()
-body = petstore_api.Client() # Client | client model
+client = petstore_api.Client() # Client | client model
try:
# To test special tags
- api_response = api_instance.test_special_tags(body)
+ api_response = api_instance.test_special_tags(client)
pprint(api_response)
except ApiException as e:
print("Exception when calling AnotherFakeApi->test_special_tags: %s\n" % e)
@@ -74,6 +74,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
@@ -112,9 +113,11 @@ Class | Method | HTTP request | Description
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [ArrayTest](docs/ArrayTest.md)
- [Capitalization](docs/Capitalization.md)
+ - [Cat](docs/Cat.md)
- [Category](docs/Category.md)
- [ClassModel](docs/ClassModel.md)
- [Client](docs/Client.md)
+ - [Dog](docs/Dog.md)
- [EnumArrays](docs/EnumArrays.md)
- [EnumClass](docs/EnumClass.md)
- [EnumTest](docs/EnumTest.md)
@@ -138,8 +141,6 @@ Class | Method | HTTP request | Description
- [SpecialModelName](docs/SpecialModelName.md)
- [Tag](docs/Tag.md)
- [User](docs/User.md)
- - [Cat](docs/Cat.md)
- - [Dog](docs/Dog.md)
## Documentation For Authorization
diff --git a/samples/client/petstore/python/docs/AnotherFakeApi.md b/samples/client/petstore/python/docs/AnotherFakeApi.md
index 3d70f7a28756..32d4fa0696c7 100644
--- a/samples/client/petstore/python/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/python/docs/AnotherFakeApi.md
@@ -8,7 +8,7 @@ Method | HTTP request | Description
# **test_special_tags**
-> Client test_special_tags(body)
+> Client test_special_tags(client)
To test special tags
@@ -24,11 +24,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.AnotherFakeApi()
-body = petstore_api.Client() # Client | client model
+client = petstore_api.Client() # Client | client model
try:
# To test special tags
- api_response = api_instance.test_special_tags(body)
+ api_response = api_instance.test_special_tags(client)
pprint(api_response)
except ApiException as e:
print("Exception when calling AnotherFakeApi->test_special_tags: %s\n" % e)
@@ -38,7 +38,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
diff --git a/samples/client/petstore/python/docs/EnumTest.md b/samples/client/petstore/python/docs/EnumTest.md
index 94dd48646294..c4c1630250ff 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 1da84500bfef..9a8f12b0c501 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
@@ -16,7 +17,7 @@ Method | HTTP request | Description
# **fake_outer_boolean_serialize**
-> OuterBoolean fake_outer_boolean_serialize(body=body)
+> OuterBoolean fake_outer_boolean_serialize(boolean_post_body=boolean_post_body)
@@ -32,10 +33,10 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.OuterBoolean() # OuterBoolean | Input boolean as post body (optional)
+boolean_post_body = True # bool | Input boolean as post body (optional)
try:
- api_response = api_instance.fake_outer_boolean_serialize(body=body)
+ api_response = api_instance.fake_outer_boolean_serialize(boolean_post_body=boolean_post_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e)
@@ -45,7 +46,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OuterBoolean**](OuterBoolean.md)| Input boolean as post body | [optional]
+ **boolean_post_body** | **bool**| Input boolean as post body | [optional]
### Return type
@@ -58,12 +59,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
[[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)
# **fake_outer_composite_serialize**
-> OuterComposite fake_outer_composite_serialize(body=body)
+> OuterComposite fake_outer_composite_serialize(outer_composite=outer_composite)
@@ -79,10 +80,10 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
+outer_composite = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
try:
- api_response = api_instance.fake_outer_composite_serialize(body=body)
+ api_response = api_instance.fake_outer_composite_serialize(outer_composite=outer_composite)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e)
@@ -92,7 +93,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
+ **outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@@ -105,7 +106,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
[[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)
@@ -126,7 +127,7 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.OuterNumber() # OuterNumber | Input number as post body (optional)
+body = 3.4 # float | Input number as post body (optional)
try:
api_response = api_instance.fake_outer_number_serialize(body=body)
@@ -139,7 +140,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OuterNumber**](OuterNumber.md)| Input number as post body | [optional]
+ **body** | **float**| Input number as post body | [optional]
### Return type
@@ -152,7 +153,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
[[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)
@@ -173,7 +174,7 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.OuterString() # OuterString | Input string as post body (optional)
+body = 'body_example' # str | Input string as post body (optional)
try:
api_response = api_instance.fake_outer_string_serialize(body=body)
@@ -186,7 +187,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OuterString**](OuterString.md)| Input string as post body | [optional]
+ **body** | **str**| Input string as post body | [optional]
### Return type
@@ -199,12 +200,58 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
+ - **Accept**: */*
+
+[[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(query, user)
+
+
+
+### 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()
+query = 'query_example' # str |
+user = petstore_api.User() # User |
+
+try:
+ api_instance.test_body_with_query_params(query, user)
+except ApiException as e:
+ print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **query** | **str**| |
+ **user** | [**User**](User.md)| |
+
+### 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)
+> Client test_client_model(client)
To test \"client\" model
@@ -220,11 +267,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-body = petstore_api.Client() # Client | client model
+client = petstore_api.Client() # Client | client model
try:
# To test \"client\" model
- api_response = api_instance.test_client_model(body)
+ api_response = api_instance.test_client_model(client)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeApi->test_client_model: %s\n" % e)
@@ -234,7 +281,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
@@ -273,16 +320,16 @@ configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration))
-number = 8.14 # float | None
-double = 1.2 # float | None
+number = 3.4 # float | None
+double = 3.4 # float | None
pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None
-byte = 'B' # str | None
+byte = 'byte_example' # str | None
integer = 56 # int | None (optional)
int32 = 56 # int | None (optional)
-int64 = 789 # int | None (optional)
+int64 = 56 # int | None (optional)
float = 3.4 # float | None (optional)
string = 'string_example' # str | None (optional)
-binary = 'B' # str | None (optional)
+binary = '/path/to/file' # file | 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)
@@ -308,7 +355,7 @@ Name | Type | Description | Notes
**int64** | **int**| None | [optional]
**float** | **float**| None | [optional]
**string** | **str**| None | [optional]
- **binary** | **str**| None | [optional]
+ **binary** | **file**| None | [optional]
**date** | **date**| None | [optional]
**date_time** | **datetime**| None | [optional]
**password** | **str**| None | [optional]
@@ -324,13 +371,13 @@ void (empty response body)
### HTTP request headers
- - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8
- - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **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_enum_parameters**
-> test_enum_parameters(enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string, enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double)
+> test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string)
To test enum parameters
@@ -346,18 +393,18 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-enum_form_string_array = ['enum_form_string_array_example'] # list[str] | Form parameter enum test (string array) (optional)
-enum_form_string = '-efg' # str | Form parameter enum test (string) (optional) (default to -efg)
enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional)
enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to -efg)
enum_query_string_array = ['enum_query_string_array_example'] # list[str] | Query parameter enum test (string array) (optional)
enum_query_string = '-efg' # str | Query parameter enum test (string) (optional) (default to -efg)
enum_query_integer = 56 # int | Query parameter enum test (double) (optional)
-enum_query_double = 1.2 # float | Query parameter enum test (double) (optional)
+enum_query_double = 3.4 # float | Query parameter enum test (double) (optional)
+enum_form_string_array = NULL # list[str] | Form parameter enum test (string array) (optional)
+enum_form_string = 'enum_form_string_example' # str | Form parameter enum test (string) (optional)
try:
# To test enum parameters
- api_instance.test_enum_parameters(enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string, enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double)
+ api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string)
except ApiException as e:
print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e)
```
@@ -366,14 +413,14 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **enum_form_string_array** | [**list[str]**](str.md)| Form parameter enum test (string array) | [optional]
- **enum_form_string** | **str**| Form parameter enum test (string) | [optional] [default to -efg]
**enum_header_string_array** | [**list[str]**](str.md)| Header parameter enum test (string array) | [optional]
**enum_header_string** | **str**| Header parameter enum test (string) | [optional] [default to -efg]
**enum_query_string_array** | [**list[str]**](str.md)| Query parameter enum test (string array) | [optional]
**enum_query_string** | **str**| Query parameter enum test (string) | [optional] [default to -efg]
**enum_query_integer** | **int**| Query parameter enum test (double) | [optional]
**enum_query_double** | **float**| Query parameter enum test (double) | [optional]
+ **enum_form_string_array** | [**list[str]**](list.md)| Form parameter enum test (string array) | [optional]
+ **enum_form_string** | **str**| Form parameter enum test (string) | [optional]
### Return type
@@ -385,18 +432,16 @@ No authorization required
### HTTP request headers
- - **Content-Type**: */*
- - **Accept**: */*
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **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_inline_additional_properties**
-> test_inline_additional_properties(param)
+> test_inline_additional_properties(request_body)
test inline additionalProperties
-
-
### Example
```python
from __future__ import print_function
@@ -407,11 +452,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-param = NULL # object | request body
+request_body = {'key': 'request_body_example'} # str | request body
try:
# test inline additionalProperties
- api_instance.test_inline_additional_properties(param)
+ api_instance.test_inline_additional_properties(request_body)
except ApiException as e:
print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e)
```
@@ -420,7 +465,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **param** | **object**| request body |
+ **request_body** | [**str**](str.md)| request body |
### Return type
@@ -442,8 +487,6 @@ No authorization required
test json serialization of form data
-
-
### Example
```python
from __future__ import print_function
@@ -481,7 +524,7 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: application/x-www-form-urlencoded
- **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)
diff --git a/samples/client/petstore/python/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python/docs/FakeClassnameTags123Api.md
index 8d11d05085a3..34d44991ff9a 100644
--- a/samples/client/petstore/python/docs/FakeClassnameTags123Api.md
+++ b/samples/client/petstore/python/docs/FakeClassnameTags123Api.md
@@ -8,7 +8,7 @@ Method | HTTP request | Description
# **test_classname**
-> Client test_classname(body)
+> Client test_classname(client)
To test class name in snake case
@@ -30,11 +30,11 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
# create an instance of the API class
api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration))
-body = petstore_api.Client() # Client | client model
+client = petstore_api.Client() # Client | client model
try:
# To test class name in snake case
- api_response = api_instance.test_classname(body)
+ api_response = api_instance.test_classname(client)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e)
@@ -44,7 +44,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
diff --git a/samples/client/petstore/python/docs/FormatTest.md b/samples/client/petstore/python/docs/FormatTest.md
index 3e489e863fa0..31d92e2a750e 100644
--- a/samples/client/petstore/python/docs/FormatTest.md
+++ b/samples/client/petstore/python/docs/FormatTest.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**double** | **float** | | [optional]
**string** | **str** | | [optional]
**byte** | **str** | |
-**binary** | **str** | | [optional]
+**binary** | **file** | | [optional]
**date** | **date** | |
**date_time** | **datetime** | | [optional]
**uuid** | **str** | | [optional]
diff --git a/samples/client/petstore/python/docs/PetApi.md b/samples/client/petstore/python/docs/PetApi.md
index 53b9158e6995..748cf407ea45 100644
--- a/samples/client/petstore/python/docs/PetApi.md
+++ b/samples/client/petstore/python/docs/PetApi.md
@@ -15,12 +15,10 @@ Method | HTTP request | Description
# **add_pet**
-> add_pet(body)
+> add_pet(pet)
Add a new pet to the store
-
-
### Example
```python
from __future__ import print_function
@@ -35,11 +33,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
+pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
try:
# Add a new pet to the store
- api_instance.add_pet(body)
+ api_instance.add_pet(pet)
except ApiException as e:
print("Exception when calling PetApi->add_pet: %s\n" % e)
```
@@ -48,7 +46,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -61,7 +59,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- - **Accept**: application/xml, 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)
@@ -70,8 +68,6 @@ void (empty response body)
Deletes a pet
-
-
### Example
```python
from __future__ import print_function
@@ -86,7 +82,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet_id = 789 # int | Pet id to delete
+pet_id = 56 # int | Pet id to delete
api_key = 'api_key_example' # str | (optional)
try:
@@ -114,7 +110,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
@@ -245,7 +241,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet_id = 789 # int | ID of pet to return
+pet_id = 56 # int | ID of pet to return
try:
# Find pet by ID
@@ -277,12 +273,10 @@ Name | Type | Description | Notes
[[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)
# **update_pet**
-> update_pet(body)
+> update_pet(pet)
Update an existing pet
-
-
### Example
```python
from __future__ import print_function
@@ -297,11 +291,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
+pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
try:
# Update an existing pet
- api_instance.update_pet(body)
+ api_instance.update_pet(pet)
except ApiException as e:
print("Exception when calling PetApi->update_pet: %s\n" % e)
```
@@ -310,7 +304,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -323,7 +317,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- - **Accept**: application/xml, 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)
@@ -332,8 +326,6 @@ void (empty response body)
Updates a pet in the store with form data
-
-
### Example
```python
from __future__ import print_function
@@ -348,7 +340,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet_id = 789 # int | ID of pet that needs to be updated
+pet_id = 56 # int | ID of pet that needs to be updated
name = 'name_example' # str | Updated name of the pet (optional)
status = 'status_example' # str | Updated status of the pet (optional)
@@ -378,7 +370,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- - **Accept**: application/xml, 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)
@@ -387,8 +379,6 @@ void (empty response body)
uploads an image
-
-
### Example
```python
from __future__ import print_function
@@ -403,9 +393,9 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet_id = 789 # int | ID of pet to update
+pet_id = 56 # int | ID of pet to update
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
-file = '/path/to/file.txt' # file | file to upload (optional)
+file = '/path/to/file' # file | file to upload (optional)
try:
# uploads an image
diff --git a/samples/client/petstore/python/docs/StoreApi.md b/samples/client/petstore/python/docs/StoreApi.md
index 6cbb6b451453..e4d6a7a88859 100644
--- a/samples/client/petstore/python/docs/StoreApi.md
+++ b/samples/client/petstore/python/docs/StoreApi.md
@@ -53,7 +53,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
@@ -124,7 +124,7 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.StoreApi()
-order_id = 789 # int | ID of pet that needs to be fetched
+order_id = 56 # int | ID of pet that needs to be fetched
try:
# Find purchase order by ID
@@ -156,12 +156,10 @@ 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)
# **place_order**
-> Order place_order(body)
+> Order place_order(order)
Place an order for a pet
-
-
### Example
```python
from __future__ import print_function
@@ -172,11 +170,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.StoreApi()
-body = petstore_api.Order() # Order | order placed for purchasing the pet
+order = petstore_api.Order() # Order | order placed for purchasing the pet
try:
# Place an order for a pet
- api_response = api_instance.place_order(body)
+ api_response = api_instance.place_order(order)
pprint(api_response)
except ApiException as e:
print("Exception when calling StoreApi->place_order: %s\n" % e)
@@ -186,7 +184,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Order**](Order.md)| order placed for purchasing the pet |
+ **order** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
diff --git a/samples/client/petstore/python/docs/UserApi.md b/samples/client/petstore/python/docs/UserApi.md
index e9ec08e24bbd..c7cc8b64d663 100644
--- a/samples/client/petstore/python/docs/UserApi.md
+++ b/samples/client/petstore/python/docs/UserApi.md
@@ -15,7 +15,7 @@ Method | HTTP request | Description
# **create_user**
-> create_user(body)
+> create_user(user)
Create user
@@ -31,11 +31,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-body = petstore_api.User() # User | Created user object
+user = petstore_api.User() # User | Created user object
try:
# Create user
- api_instance.create_user(body)
+ api_instance.create_user(user)
except ApiException as e:
print("Exception when calling UserApi->create_user: %s\n" % e)
```
@@ -44,7 +44,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**User**](User.md)| Created user object |
+ **user** | [**User**](User.md)| Created user object |
### Return type
@@ -57,17 +57,15 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
# **create_users_with_array_input**
-> create_users_with_array_input(body)
+> create_users_with_array_input(user)
Creates list of users with given input array
-
-
### Example
```python
from __future__ import print_function
@@ -78,11 +76,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-body = [petstore_api.User()] # list[User] | List of user object
+user = NULL # list[User] | List of user object
try:
# Creates list of users with given input array
- api_instance.create_users_with_array_input(body)
+ api_instance.create_users_with_array_input(user)
except ApiException as e:
print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e)
```
@@ -91,7 +89,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**list[User]**](User.md)| List of user object |
+ **user** | [**list[User]**](list.md)| List of user object |
### Return type
@@ -104,17 +102,15 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
# **create_users_with_list_input**
-> create_users_with_list_input(body)
+> create_users_with_list_input(user)
Creates list of users with given input array
-
-
### Example
```python
from __future__ import print_function
@@ -125,11 +121,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-body = [petstore_api.User()] # list[User] | List of user object
+user = NULL # list[User] | List of user object
try:
# Creates list of users with given input array
- api_instance.create_users_with_list_input(body)
+ api_instance.create_users_with_list_input(user)
except ApiException as e:
print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e)
```
@@ -138,7 +134,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**list[User]**](User.md)| List of user object |
+ **user** | [**list[User]**](list.md)| List of user object |
### Return type
@@ -151,7 +147,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
@@ -198,7 +194,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
@@ -207,8 +203,6 @@ No authorization required
Get user by user name
-
-
### Example
```python
from __future__ import print_function
@@ -255,8 +249,6 @@ No authorization required
Logs user into the system
-
-
### Example
```python
from __future__ import print_function
@@ -305,8 +297,6 @@ No authorization required
Logs out current logged in user session
-
-
### Example
```python
from __future__ import print_function
@@ -339,12 +329,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
# **update_user**
-> update_user(username, body)
+> update_user(username, user)
Updated user
@@ -361,11 +351,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | name that need to be deleted
-body = petstore_api.User() # User | Updated user object
+user = petstore_api.User() # User | Updated user object
try:
# Updated user
- api_instance.update_user(username, body)
+ api_instance.update_user(username, user)
except ApiException as e:
print("Exception when calling UserApi->update_user: %s\n" % e)
```
@@ -375,7 +365,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| name that need to be deleted |
- **body** | [**User**](User.md)| Updated user object |
+ **user** | [**User**](User.md)| Updated user object |
### Return type
@@ -388,7 +378,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, 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)
diff --git a/samples/client/petstore/python/petstore_api/__init__.py b/samples/client/petstore/python/petstore_api/__init__.py
index 8bf367cc5b81..96f34b3da498 100644
--- a/samples/client/petstore/python/petstore_api/__init__.py
+++ b/samples/client/petstore/python/petstore_api/__init__.py
@@ -35,9 +35,11 @@
from petstore_api.models.array_of_number_only import ArrayOfNumberOnly
from petstore_api.models.array_test import ArrayTest
from petstore_api.models.capitalization import Capitalization
+from petstore_api.models.cat import Cat
from petstore_api.models.category import Category
from petstore_api.models.class_model import ClassModel
from petstore_api.models.client import Client
+from petstore_api.models.dog import Dog
from petstore_api.models.enum_arrays import EnumArrays
from petstore_api.models.enum_class import EnumClass
from petstore_api.models.enum_test import EnumTest
@@ -61,5 +63,3 @@
from petstore_api.models.special_model_name import SpecialModelName
from petstore_api.models.tag import Tag
from petstore_api.models.user import User
-from petstore_api.models.cat import Cat
-from petstore_api.models.dog import Dog
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 0096dad1a37a..bc8552682cc6 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
@@ -33,45 +33,45 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def test_special_tags(self, body, **kwargs): # noqa: E501
+ def test_special_tags(self, client, **kwargs): # noqa: E501
"""To test special tags # 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)
+ >>> thread = api.test_special_tags(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: 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'):
- return self.test_special_tags_with_http_info(body, **kwargs) # noqa: E501
+ return self.test_special_tags_with_http_info(client, **kwargs) # noqa: E501
else:
- (data) = self.test_special_tags_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.test_special_tags_with_http_info(client, **kwargs) # noqa: E501
return data
- def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501
+ def test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501
"""To test special tags # 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)
+ >>> thread = api.test_special_tags_with_http_info(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['client'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501
)
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_special_tags`") # noqa: E501
+ # verify the required parameter 'client' is set
+ if ('client' not in params or
+ params['client'] is None):
+ raise ValueError("Missing the required parameter `client` when calling `test_special_tags`") # noqa: E501
collection_formats = {}
@@ -103,8 +103,8 @@ def test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'client' in params:
+ body_params = params['client']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
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 4c52ee51647d..850af1f38e00 100644
--- a/samples/client/petstore/python/petstore_api/api/fake_api.py
+++ b/samples/client/petstore/python/petstore_api/api/fake_api.py
@@ -43,7 +43,7 @@ def fake_outer_boolean_serialize(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterBoolean body: Input boolean as post body
+ :param bool boolean_post_body: Input boolean as post body
:return: OuterBoolean
If the method is called asynchronously,
returns the request thread.
@@ -65,13 +65,13 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterBoolean body: Input boolean as post body
+ :param bool boolean_post_body: Input boolean as post body
:return: OuterBoolean
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['boolean_post_body'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -99,8 +99,12 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'boolean_post_body' in params:
+ body_params = params['boolean_post_body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['*/*']) # noqa: E501
+
# Authentication setting
auth_settings = [] # noqa: E501
@@ -130,7 +134,7 @@ def fake_outer_composite_serialize(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterComposite body: Input composite as post body
+ :param OuterComposite outer_composite: Input composite as post body
:return: OuterComposite
If the method is called asynchronously,
returns the request thread.
@@ -152,13 +156,13 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterComposite body: Input composite as post body
+ :param OuterComposite outer_composite: Input composite as post body
:return: OuterComposite
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['outer_composite'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -186,8 +190,12 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'outer_composite' in params:
+ body_params = params['outer_composite']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['*/*']) # noqa: E501
+
# Authentication setting
auth_settings = [] # noqa: E501
@@ -217,7 +225,7 @@ def fake_outer_number_serialize(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterNumber body: Input number as post body
+ :param float body: Input number as post body
:return: OuterNumber
If the method is called asynchronously,
returns the request thread.
@@ -239,7 +247,7 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterNumber body: Input number as post body
+ :param float body: Input number as post body
:return: OuterNumber
If the method is called asynchronously,
returns the request thread.
@@ -275,6 +283,10 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501
body_params = None
if 'body' in params:
body_params = params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['*/*']) # noqa: E501
+
# Authentication setting
auth_settings = [] # noqa: E501
@@ -304,7 +316,7 @@ def fake_outer_string_serialize(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterString body: Input string as post body
+ :param str body: Input string as post body
:return: OuterString
If the method is called asynchronously,
returns the request thread.
@@ -326,7 +338,7 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async bool
- :param OuterString body: Input string as post body
+ :param str body: Input string as post body
:return: OuterString
If the method is called asynchronously,
returns the request thread.
@@ -362,6 +374,10 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501
body_params = None
if 'body' in params:
body_params = params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['*/*']) # noqa: E501
+
# Authentication setting
auth_settings = [] # noqa: E501
@@ -381,45 +397,146 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def test_client_model(self, body, **kwargs): # noqa: E501
+ def test_body_with_query_params(self, query, user, **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(query, user, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str query: (required)
+ :param User user: (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(query, user, **kwargs) # noqa: E501
+ else:
+ (data) = self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501
+ return data
+
+ def test_body_with_query_params_with_http_info(self, query, user, **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(query, user, async=True)
+ >>> result = thread.get()
+
+ :param async bool
+ :param str query: (required)
+ :param User user: (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['query', 'user'] # 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 '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
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` 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 'user' in params:
+ body_params = params['user']
+ # 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, client, **kwargs): # noqa: E501
"""To test \"client\" model # 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)
+ >>> thread = api.test_client_model(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: 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'):
- return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501
+ return self.test_client_model_with_http_info(client, **kwargs) # noqa: E501
else:
- (data) = self.test_client_model_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.test_client_model_with_http_info(client, **kwargs) # noqa: E501
return data
- def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501
+ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501
"""To test \"client\" model # 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)
+ >>> thread = api.test_client_model_with_http_info(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['client'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -434,10 +551,10 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501
)
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_client_model`") # noqa: E501
+ # verify the required parameter 'client' is set
+ if ('client' not in params or
+ params['client'] is None):
+ raise ValueError("Missing the required parameter `client` when calling `test_client_model`") # noqa: E501
collection_formats = {}
@@ -451,8 +568,8 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'client' in params:
+ body_params = params['client']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
@@ -499,7 +616,7 @@ def test_endpoint_parameters(self, number, double, pattern_without_delimiter, by
:param int int64: None
:param float float: None
:param str string: None
- :param str binary: None
+ :param file binary: None
:param date date: None
:param datetime date_time: None
:param str password: None
@@ -534,7 +651,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou
:param int int64: None
:param float float: None
:param str string: None
- :param str binary: None
+ :param file binary: None
:param date date: None
:param datetime date_time: None
:param str password: None
@@ -584,7 +701,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou
raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") # noqa: E501
if 'double' in params and params['double'] < 67.8: # noqa: E501
raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") # noqa: E501
- if 'pattern_without_delimiter' in params and not re.search('^[A-Z].*', params['pattern_without_delimiter']): # noqa: E501
+ if 'pattern_without_delimiter' in params and not re.search('', params['pattern_without_delimiter']): # noqa: E501
raise ValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`") # noqa: E501
if 'integer' in params and params['integer'] > 100: # noqa: E501
raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501
@@ -596,7 +713,7 @@ 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 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 'string' in params and not re.search('[a-z]', params['string'], flags=re.IGNORECASE): # noqa: E501
+ if 'string' in params and not re.search('', params['string']): # 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
len(params['password']) > 64):
@@ -633,7 +750,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou
if 'byte' in params:
form_params.append(('byte', params['byte'])) # noqa: E501
if 'binary' in params:
- form_params.append(('binary', params['binary'])) # noqa: E501
+ local_var_files['binary'] = params['binary'] # noqa: E501
if 'date' in params:
form_params.append(('date', params['date'])) # noqa: E501
if 'date_time' in params:
@@ -644,13 +761,9 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou
form_params.append(('callback', params['param_callback'])) # noqa: E501
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml; charset=utf-8', 'application/json; charset=utf-8']) # noqa: E501
-
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/xml; charset=utf-8', 'application/json; charset=utf-8']) # noqa: E501
+ ['application/x-www-form-urlencoded']) # noqa: E501
# Authentication setting
auth_settings = ['http_basic_test'] # noqa: E501
@@ -681,14 +794,14 @@ def test_enum_parameters(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async 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)
:param str enum_header_string: Header parameter enum test (string)
:param list[str] enum_query_string_array: Query parameter enum test (string array)
:param str enum_query_string: Query parameter enum test (string)
:param int enum_query_integer: Query parameter enum test (double)
:param float enum_query_double: Query parameter enum test (double)
+ :param list[str] enum_form_string_array: Form parameter enum test (string array)
+ :param str enum_form_string: Form parameter enum test (string)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -710,20 +823,20 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async 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)
:param str enum_header_string: Header parameter enum test (string)
:param list[str] enum_query_string_array: Query parameter enum test (string array)
:param str enum_query_string: Query parameter enum test (string)
:param int enum_query_integer: Query parameter enum test (double)
:param float enum_query_double: Query parameter enum test (double)
+ :param list[str] enum_form_string_array: Form parameter enum test (string array)
+ :param str enum_form_string: Form parameter enum test (string)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- 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 = ['enum_header_string_array', 'enum_header_string', 'enum_query_string_array', 'enum_query_string', 'enum_query_integer', 'enum_query_double', 'enum_form_string_array', 'enum_form_string'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -746,16 +859,18 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501
query_params = []
if 'enum_query_string_array' in params:
query_params.append(('enum_query_string_array', params['enum_query_string_array'])) # noqa: E501
- collection_formats['enum_query_string_array'] = 'csv' # noqa: E501
+ collection_formats['enum_query_string_array'] = '' # noqa: E501
if 'enum_query_string' in params:
query_params.append(('enum_query_string', params['enum_query_string'])) # noqa: E501
if 'enum_query_integer' in params:
query_params.append(('enum_query_integer', params['enum_query_integer'])) # noqa: E501
+ if 'enum_query_double' in params:
+ query_params.append(('enum_query_double', params['enum_query_double'])) # noqa: E501
header_params = {}
if 'enum_header_string_array' in params:
header_params['enum_header_string_array'] = params['enum_header_string_array'] # noqa: E501
- collection_formats['enum_header_string_array'] = 'csv' # noqa: E501
+ collection_formats['enum_header_string_array'] = '' # noqa: E501
if 'enum_header_string' in params:
header_params['enum_header_string'] = params['enum_header_string'] # noqa: E501
@@ -763,20 +878,13 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
if 'enum_form_string_array' in params:
form_params.append(('enum_form_string_array', params['enum_form_string_array'])) # noqa: E501
- collection_formats['enum_form_string_array'] = 'csv' # noqa: E501
if 'enum_form_string' in params:
form_params.append(('enum_form_string', params['enum_form_string'])) # noqa: E501
- if 'enum_query_double' in params:
- form_params.append(('enum_query_double', params['enum_query_double'])) # noqa: E501
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['*/*']) # noqa: E501
-
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['*/*']) # noqa: E501
+ ['application/x-www-form-urlencoded']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
@@ -797,45 +905,43 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def test_inline_additional_properties(self, param, **kwargs): # noqa: E501
+ def test_inline_additional_properties(self, request_body, **kwargs): # noqa: E501
"""test inline additionalProperties # 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)
+ >>> thread = api.test_inline_additional_properties(request_body, async=True)
>>> result = thread.get()
:param async bool
- :param object param: request body (required)
+ :param str request_body: 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'):
- return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501
+ return self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501
else:
- (data) = self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501
+ (data) = self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501
return data
- def test_inline_additional_properties_with_http_info(self, param, **kwargs): # noqa: E501
+ def test_inline_additional_properties_with_http_info(self, request_body, **kwargs): # noqa: E501
"""test inline additionalProperties # 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_with_http_info(param, async=True)
+ >>> thread = api.test_inline_additional_properties_with_http_info(request_body, async=True)
>>> result = thread.get()
:param async bool
- :param object param: request body (required)
+ :param str request_body: request body (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['param'] # noqa: E501
+ all_params = ['request_body'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -850,10 +956,10 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): #
)
params[key] = val
del params['kwargs']
- # verify the required parameter 'param' is set
- if ('param' not in params or
- params['param'] is None):
- raise ValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501
+ # verify the required parameter 'request_body' is set
+ if ('request_body' not in params or
+ params['request_body'] is None):
+ raise ValueError("Missing the required parameter `request_body` when calling `test_inline_additional_properties`") # noqa: E501
collection_formats = {}
@@ -867,8 +973,8 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): #
local_var_files = {}
body_params = None
- if 'param' in params:
- body_params = params['param']
+ if 'request_body' in params:
+ body_params = params['request_body']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
@@ -895,7 +1001,6 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): #
def test_json_form_data(self, param, param2, **kwargs): # noqa: E501
"""test json serialization of form data # 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)
@@ -918,7 +1023,6 @@ def test_json_form_data(self, param, param2, **kwargs): # noqa: E501
def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: E501
"""test json serialization of form data # 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_with_http_info(param, param2, async=True)
@@ -974,7 +1078,7 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa:
body_params = None
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
+ ['application/x-www-form-urlencoded']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
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 230aa5ec4fca..6b812b5a3fa8 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
@@ -33,45 +33,45 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def test_classname(self, body, **kwargs): # noqa: E501
+ def test_classname(self, client, **kwargs): # noqa: E501
"""To test class name in snake case # 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)
+ >>> thread = api.test_classname(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: 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'):
- return self.test_classname_with_http_info(body, **kwargs) # noqa: E501
+ return self.test_classname_with_http_info(client, **kwargs) # noqa: E501
else:
- (data) = self.test_classname_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.test_classname_with_http_info(client, **kwargs) # noqa: E501
return data
- def test_classname_with_http_info(self, body, **kwargs): # noqa: E501
+ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501
"""To test class name in snake case # 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)
+ >>> thread = api.test_classname_with_http_info(client, async=True)
>>> result = thread.get()
:param async bool
- :param Client body: client model (required)
+ :param Client client: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['client'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501
)
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_classname`") # noqa: E501
+ # verify the required parameter 'client' is set
+ if ('client' not in params or
+ params['client'] is None):
+ raise ValueError("Missing the required parameter `client` when calling `test_classname`") # noqa: E501
collection_formats = {}
@@ -103,8 +103,8 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'client' in params:
+ body_params = params['client']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
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 ff1026f3fae1..33dddbdf7aac 100644
--- a/samples/client/petstore/python/petstore_api/api/pet_api.py
+++ b/samples/client/petstore/python/petstore_api/api/pet_api.py
@@ -33,45 +33,43 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def add_pet(self, body, **kwargs): # noqa: E501
+ def add_pet(self, pet, **kwargs): # noqa: E501
"""Add a new pet to the store # 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)
+ >>> thread = api.add_pet(pet, async=True)
>>> result = thread.get()
:param async bool
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param Pet pet: 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'):
- return self.add_pet_with_http_info(body, **kwargs) # noqa: E501
+ return self.add_pet_with_http_info(pet, **kwargs) # noqa: E501
else:
- (data) = self.add_pet_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.add_pet_with_http_info(pet, **kwargs) # noqa: E501
return data
- def add_pet_with_http_info(self, body, **kwargs): # noqa: E501
+ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501
"""Add a new pet to the store # 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)
+ >>> thread = api.add_pet_with_http_info(pet, async=True)
>>> result = thread.get()
:param async bool
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param Pet pet: Pet object that needs to be added to the store (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['pet'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +84,10 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501
)
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 `add_pet`") # noqa: E501
+ # verify the required parameter 'pet' is set
+ if ('pet' not in params or
+ params['pet'] is None):
+ raise ValueError("Missing the required parameter `pet` when calling `add_pet`") # noqa: E501
collection_formats = {}
@@ -103,12 +101,8 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'pet' in params:
+ body_params = params['pet']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json', 'application/xml']) # noqa: E501
@@ -135,7 +129,6 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501
def delete_pet(self, pet_id, **kwargs): # noqa: E501
"""Deletes a pet # 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)
@@ -158,7 +151,6 @@ def delete_pet(self, pet_id, **kwargs): # noqa: E501
def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501
"""Deletes a pet # 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)
@@ -208,10 +200,6 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# Authentication setting
auth_settings = ['petstore_auth'] # noqa: E501
@@ -296,7 +284,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501
query_params = []
if 'status' in params:
query_params.append(('status', params['status'])) # noqa: E501
- collection_formats['status'] = 'csv' # noqa: E501
+ collection_formats['status'] = '' # noqa: E501
header_params = {}
@@ -392,7 +380,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501
query_params = []
if 'tags' in params:
query_params.append(('tags', params['tags'])) # noqa: E501
- collection_formats['tags'] = 'csv' # noqa: E501
+ collection_formats['tags'] = '' # noqa: E501
header_params = {}
@@ -518,45 +506,43 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def update_pet(self, body, **kwargs): # noqa: E501
+ def update_pet(self, pet, **kwargs): # noqa: E501
"""Update an existing pet # 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)
+ >>> thread = api.update_pet(pet, async=True)
>>> result = thread.get()
:param async bool
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param Pet pet: 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'):
- return self.update_pet_with_http_info(body, **kwargs) # noqa: E501
+ return self.update_pet_with_http_info(pet, **kwargs) # noqa: E501
else:
- (data) = self.update_pet_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.update_pet_with_http_info(pet, **kwargs) # noqa: E501
return data
- def update_pet_with_http_info(self, body, **kwargs): # noqa: E501
+ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501
"""Update an existing pet # 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)
+ >>> thread = api.update_pet_with_http_info(pet, async=True)
>>> result = thread.get()
:param async bool
- :param Pet body: Pet object that needs to be added to the store (required)
+ :param Pet pet: Pet object that needs to be added to the store (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['pet'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -571,10 +557,10 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501
)
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 `update_pet`") # noqa: E501
+ # verify the required parameter 'pet' is set
+ if ('pet' not in params or
+ params['pet'] is None):
+ raise ValueError("Missing the required parameter `pet` when calling `update_pet`") # noqa: E501
collection_formats = {}
@@ -588,12 +574,8 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'pet' in params:
+ body_params = params['pet']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json', 'application/xml']) # noqa: E501
@@ -620,7 +602,6 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501
def update_pet_with_form(self, pet_id, **kwargs): # noqa: E501
"""Updates a pet in the store with form data # 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)
@@ -644,7 +625,6 @@ def update_pet_with_form(self, pet_id, **kwargs): # noqa: E501
def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501
"""Updates a pet in the store with form data # 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)
@@ -697,10 +677,6 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501
form_params.append(('status', params['status'])) # noqa: E501
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/x-www-form-urlencoded']) # noqa: E501
@@ -727,7 +703,6 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501
def upload_file(self, pet_id, **kwargs): # noqa: E501
"""uploads an image # 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)
@@ -751,7 +726,6 @@ def upload_file(self, pet_id, **kwargs): # noqa: E501
def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501
"""uploads an image # 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)
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 ebb9a4eb27a4..2af59b2e3300 100644
--- a/samples/client/petstore/python/petstore_api/api/store_api.py
+++ b/samples/client/petstore/python/petstore_api/api/store_api.py
@@ -105,10 +105,6 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# Authentication setting
auth_settings = [] # noqa: E501
@@ -314,45 +310,43 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def place_order(self, body, **kwargs): # noqa: E501
+ def place_order(self, order, **kwargs): # noqa: E501
"""Place an order for a pet # 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)
+ >>> thread = api.place_order(order, async=True)
>>> result = thread.get()
:param async bool
- :param Order body: order placed for purchasing the pet (required)
+ :param Order order: 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'):
- return self.place_order_with_http_info(body, **kwargs) # noqa: E501
+ return self.place_order_with_http_info(order, **kwargs) # noqa: E501
else:
- (data) = self.place_order_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.place_order_with_http_info(order, **kwargs) # noqa: E501
return data
- def place_order_with_http_info(self, body, **kwargs): # noqa: E501
+ def place_order_with_http_info(self, order, **kwargs): # noqa: E501
"""Place an order for a pet # 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)
+ >>> thread = api.place_order_with_http_info(order, async=True)
>>> result = thread.get()
:param async bool
- :param Order body: order placed for purchasing the pet (required)
+ :param Order order: order placed for purchasing the pet (required)
:return: Order
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['order'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -367,10 +361,10 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501
)
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 `place_order`") # noqa: E501
+ # verify the required parameter 'order' is set
+ if ('order' not in params or
+ params['order'] is None):
+ raise ValueError("Missing the required parameter `order` when calling `place_order`") # noqa: E501
collection_formats = {}
@@ -384,8 +378,8 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
+ if 'order' in params:
+ body_params = params['order']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/xml', 'application/json']) # noqa: E501
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 1de89f28bb0e..834ab65aad46 100644
--- a/samples/client/petstore/python/petstore_api/api/user_api.py
+++ b/samples/client/petstore/python/petstore_api/api/user_api.py
@@ -33,45 +33,45 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def create_user(self, body, **kwargs): # noqa: E501
+ def create_user(self, user, **kwargs): # noqa: E501
"""Create user # 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)
+ >>> thread = api.create_user(user, async=True)
>>> result = thread.get()
:param async bool
- :param User body: Created user object (required)
+ :param User user: 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'):
- return self.create_user_with_http_info(body, **kwargs) # noqa: E501
+ return self.create_user_with_http_info(user, **kwargs) # noqa: E501
else:
- (data) = self.create_user_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.create_user_with_http_info(user, **kwargs) # noqa: E501
return data
- def create_user_with_http_info(self, body, **kwargs): # noqa: E501
+ def create_user_with_http_info(self, user, **kwargs): # noqa: E501
"""Create user # 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)
+ >>> thread = api.create_user_with_http_info(user, async=True)
>>> result = thread.get()
:param async bool
- :param User body: Created user object (required)
+ :param User user: Created user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['user'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501
)
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 `create_user`") # noqa: E501
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `create_user`") # noqa: E501
collection_formats = {}
@@ -103,12 +103,8 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'user' in params:
+ body_params = params['user']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -128,45 +124,43 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def create_users_with_array_input(self, body, **kwargs): # noqa: E501
+ def create_users_with_array_input(self, user, **kwargs): # noqa: E501
"""Creates list of users with given input array # 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)
+ >>> thread = api.create_users_with_array_input(user, async=True)
>>> result = thread.get()
:param async bool
- :param list[User] body: List of user object (required)
+ :param list[User] user: 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'):
- return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501
+ return self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501
else:
- (data) = self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501
return data
- def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: E501
+ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: E501
"""Creates list of users with given input array # 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_with_http_info(body, async=True)
+ >>> thread = api.create_users_with_array_input_with_http_info(user, async=True)
>>> result = thread.get()
:param async bool
- :param list[User] body: List of user object (required)
+ :param list[User] user: List of user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['user'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -181,10 +175,10 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa:
)
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 `create_users_with_array_input`") # noqa: E501
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `create_users_with_array_input`") # noqa: E501
collection_formats = {}
@@ -198,12 +192,8 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa:
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'user' in params:
+ body_params = params['user']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -223,45 +213,43 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa:
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def create_users_with_list_input(self, body, **kwargs): # noqa: E501
+ def create_users_with_list_input(self, user, **kwargs): # noqa: E501
"""Creates list of users with given input array # 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)
+ >>> thread = api.create_users_with_list_input(user, async=True)
>>> result = thread.get()
:param async bool
- :param list[User] body: List of user object (required)
+ :param list[User] user: 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'):
- return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501
+ return self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501
else:
- (data) = self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501
+ (data) = self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501
return data
- def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: E501
+ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: E501
"""Creates list of users with given input array # 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_with_http_info(body, async=True)
+ >>> thread = api.create_users_with_list_input_with_http_info(user, async=True)
>>> result = thread.get()
:param async bool
- :param list[User] body: List of user object (required)
+ :param list[User] user: List of user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['body'] # noqa: E501
+ all_params = ['user'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -276,10 +264,10 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa:
)
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 `create_users_with_list_input`") # noqa: E501
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `create_users_with_list_input`") # noqa: E501
collection_formats = {}
@@ -293,12 +281,8 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa:
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'user' in params:
+ body_params = params['user']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -390,10 +374,6 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# Authentication setting
auth_settings = [] # noqa: E501
@@ -416,7 +396,6 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501
def get_user_by_name(self, username, **kwargs): # noqa: E501
"""Get user by user name # 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)
@@ -438,7 +417,6 @@ def get_user_by_name(self, username, **kwargs): # noqa: E501
def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501
"""Get user by user name # 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)
@@ -511,7 +489,6 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501
def login_user(self, username, password, **kwargs): # noqa: E501
"""Logs user into the system # 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)
@@ -534,7 +511,6 @@ def login_user(self, username, password, **kwargs): # noqa: E501
def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501
"""Logs user into the system # 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)
@@ -614,7 +590,6 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501
def logout_user(self, **kwargs): # noqa: E501
"""Logs out current logged in user session # 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)
@@ -635,7 +610,6 @@ def logout_user(self, **kwargs): # noqa: E501
def logout_user_with_http_info(self, **kwargs): # noqa: E501
"""Logs out current logged in user session # 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)
@@ -675,10 +649,6 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
# Authentication setting
auth_settings = [] # noqa: E501
@@ -698,47 +668,47 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
- def update_user(self, username, body, **kwargs): # noqa: E501
+ def update_user(self, username, user, **kwargs): # noqa: E501
"""Updated user # 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)
+ >>> thread = api.update_user(username, user, async=True)
>>> result = thread.get()
:param async bool
:param str username: name that need to be deleted (required)
- :param User body: Updated user object (required)
+ :param User user: Updated 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'):
- return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501
+ return self.update_user_with_http_info(username, user, **kwargs) # noqa: E501
else:
- (data) = self.update_user_with_http_info(username, body, **kwargs) # noqa: E501
+ (data) = self.update_user_with_http_info(username, user, **kwargs) # noqa: E501
return data
- def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501
+ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501
"""Updated user # 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)
+ >>> thread = api.update_user_with_http_info(username, user, async=True)
>>> result = thread.get()
:param async bool
:param str username: name that need to be deleted (required)
- :param User body: Updated user object (required)
+ :param User user: Updated user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['username', 'body'] # noqa: E501
+ all_params = ['username', 'user'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -757,10 +727,10 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501
if ('username' not in params or
params['username'] is None):
raise ValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501
- # 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 `update_user`") # noqa: E501
+ # verify the required parameter 'user' is set
+ if ('user' not in params or
+ params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `update_user`") # noqa: E501
collection_formats = {}
@@ -776,12 +746,8 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'body' in params:
- body_params = params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/xml', 'application/json']) # noqa: E501
-
+ if 'user' in params:
+ body_params = params['user']
# Authentication setting
auth_settings = [] # noqa: E501
diff --git a/samples/client/petstore/python/petstore_api/models/__init__.py b/samples/client/petstore/python/petstore_api/models/__init__.py
index c5ae381c40f0..a21d11f481c4 100644
--- a/samples/client/petstore/python/petstore_api/models/__init__.py
+++ b/samples/client/petstore/python/petstore_api/models/__init__.py
@@ -23,9 +23,11 @@
from petstore_api.models.array_of_number_only import ArrayOfNumberOnly
from petstore_api.models.array_test import ArrayTest
from petstore_api.models.capitalization import Capitalization
+from petstore_api.models.cat import Cat
from petstore_api.models.category import Category
from petstore_api.models.class_model import ClassModel
from petstore_api.models.client import Client
+from petstore_api.models.dog import Dog
from petstore_api.models.enum_arrays import EnumArrays
from petstore_api.models.enum_class import EnumClass
from petstore_api.models.enum_test import EnumTest
@@ -49,5 +51,3 @@
from petstore_api.models.special_model_name import SpecialModelName
from petstore_api.models.tag import Tag
from petstore_api.models.user import User
-from petstore_api.models.cat import Cat
-from petstore_api.models.dog import Dog
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 1bb234764abb..565975d725c8 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 7974d732fda9..02c4c7722e0e 100644
--- a/samples/client/petstore/python/petstore_api/models/format_test.py
+++ b/samples/client/petstore/python/petstore_api/models/format_test.py
@@ -39,7 +39,7 @@ class FormatTest(object):
'double': 'float',
'string': 'str',
'byte': 'str',
- 'binary': 'str',
+ 'binary': 'file',
'date': 'date',
'date_time': 'datetime',
'uuid': 'str',
@@ -305,7 +305,7 @@ def binary(self):
:return: The binary of this FormatTest. # noqa: E501
- :rtype: str
+ :rtype: file
"""
return self._binary
@@ -315,7 +315,7 @@ def binary(self, binary):
:param binary: The binary of this FormatTest. # noqa: E501
- :type: str
+ :type: file
"""
self._binary = binary
diff --git a/samples/client/petstore/python/tests/test_api_exception.py b/samples/client/petstore/python/tests/test_api_exception.py
index 931dc34edfa8..75bf81a8de07 100644
--- a/samples/client/petstore/python/tests/test_api_exception.py
+++ b/samples/client/petstore/python/tests/test_api_exception.py
@@ -39,7 +39,7 @@ def setUpModels(self):
self.pet.tags = [self.tag]
def test_404_error(self):
- self.pet_api.add_pet(body=self.pet)
+ self.pet_api.add_pet(self.pet)
self.pet_api.delete_pet(pet_id=self.pet.id)
with self.checkRaiseRegex(ApiException, "Pet not found"):
@@ -53,7 +53,7 @@ def test_404_error(self):
self.checkRegex(e.body, "Pet not found")
def test_500_error(self):
- self.pet_api.add_pet(body=self.pet)
+ self.pet_api.add_pet(self.pet)
with self.checkRaiseRegex(ApiException, "Internal Server Error"):
self.pet_api.upload_file(
diff --git a/samples/client/petstore/python/tests/test_deserialization.py b/samples/client/petstore/python/tests/test_deserialization.py
index 97d047563df3..d7429dea4164 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 f987f38eb8c1..4a8a773159aa 100644
--- a/samples/client/petstore/python/tests/test_pet_api.py
+++ b/samples/client/petstore/python/tests/test_pet_api.py
@@ -81,7 +81,7 @@ def setUpFiles(self):
self.foo = os.path.join(self.test_file_dir, "foo.png")
def test_preload_content_flag(self):
- self.pet_api.add_pet(body=self.pet)
+ self.pet_api.add_pet(self.pet)
resp = self.pet_api.find_pets_by_status(status=[self.pet.status], _preload_content=False)
@@ -108,19 +108,17 @@ def test_timeout(self):
body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)),
headers={'Content-Type': 'application/json',
'Authorization': 'Bearer ',
- 'Accept': 'application/json',
'User-Agent': 'Swagger-Codegen/1.0.0/python'},
preload_content=True, timeout=TimeoutWithEqual(total=5))
mock_pool.expect_request('POST', 'http://localhost/v2/pet',
body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)),
headers={'Content-Type': 'application/json',
'Authorization': 'Bearer ',
- 'Accept': 'application/json',
'User-Agent': 'Swagger-Codegen/1.0.0/python'},
preload_content=True, timeout=TimeoutWithEqual(connect=1, read=2))
- self.pet_api.add_pet(body=self.pet, _request_timeout=5)
- self.pet_api.add_pet(body=self.pet, _request_timeout=(1, 2))
+ self.pet_api.add_pet(self.pet, _request_timeout=5)
+ self.pet_api.add_pet(self.pet, _request_timeout=(1, 2))
def test_separate_default_client_instances(self):
pet_api = petstore_api.PetApi()
@@ -142,7 +140,7 @@ 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(self.pet, async=True)
response = thread.get()
self.assertIsNone(response)
@@ -151,7 +149,7 @@ def test_async_request(self):
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(self.pet, async=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)
@@ -163,7 +161,7 @@ def test_async_with_result(self):
self.assertIsNotNone(response2.id, self.pet.id)
def test_async_with_http_info(self):
- self.pet_api.add_pet(body=self.pet)
+ self.pet_api.add_pet(self.pet)
thread = self.pet_api.get_pet_by_id_with_http_info(self.pet.id, async=True)
data, status, headers = thread.get()
@@ -172,7 +170,7 @@ def test_async_with_http_info(self):
self.assertEquals(status, 200)
def test_async_exception(self):
- self.pet_api.add_pet(body=self.pet)
+ self.pet_api.add_pet(self.pet)
thread = self.pet_api.get_pet_by_id("-9999999999999", async=True)
@@ -186,7 +184,7 @@ def test_async_exception(self):
self.assertEqual(exception.status, 404)
def test_add_pet_and_get_pet_by_id(self):
- self.pet_api.add_pet(body=self.pet)
+ self.pet_api.add_pet(self.pet)
fetched = self.pet_api.get_pet_by_id(pet_id=self.pet.id)
self.assertIsNotNone(fetched)
@@ -195,7 +193,7 @@ def test_add_pet_and_get_pet_by_id(self):
self.assertEqual(self.pet.category.name, fetched.category.name)
def test_add_pet_and_get_pet_by_id_with_http_info(self):
- self.pet_api.add_pet(body=self.pet)
+ self.pet_api.add_pet(self.pet)
fetched = self.pet_api.get_pet_by_id_with_http_info(pet_id=self.pet.id)
self.assertIsNotNone(fetched)
@@ -205,7 +203,7 @@ def test_add_pet_and_get_pet_by_id_with_http_info(self):
def test_update_pet(self):
self.pet.name = "hello kity with updated"
- self.pet_api.update_pet(body=self.pet)
+ self.pet_api.update_pet(self.pet)
fetched = self.pet_api.get_pet_by_id(pet_id=self.pet.id)
self.assertIsNotNone(fetched)
@@ -215,7 +213,7 @@ def test_update_pet(self):
self.assertEqual(fetched.category.name, self.pet.category.name)
def test_find_pets_by_status(self):
- self.pet_api.add_pet(body=self.pet)
+ self.pet_api.add_pet(self.pet)
self.assertIn(
self.pet.id,
@@ -223,7 +221,7 @@ def test_find_pets_by_status(self):
)
def test_find_pets_by_tags(self):
- self.pet_api.add_pet(body=self.pet)
+ self.pet_api.add_pet(self.pet)
self.assertIn(
self.pet.id,
@@ -231,7 +229,7 @@ def test_find_pets_by_tags(self):
)
def test_update_pet_with_form(self):
- self.pet_api.add_pet(body=self.pet)
+ self.pet_api.add_pet(self.pet)
name = "hello kity with form updated"
status = "pending"
@@ -261,7 +259,7 @@ def test_upload_file(self):
self.fail("upload_file() raised {0} unexpectedly".format(type(e)))
def test_delete_pet(self):
- self.pet_api.add_pet(body=self.pet)
+ self.pet_api.add_pet(self.pet)
self.pet_api.delete_pet(pet_id=self.pet.id, api_key="special-key")
try: