diff --git a/bin/openapi3/python-petstore.sh b/bin/openapi3/python-petstore.sh
new file mode 100755
index 000000000000..1ea9574eda91
--- /dev/null
+++ b/bin/openapi3/python-petstore.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+SCRIPT="$0"
+echo "# START SCRIPT: $SCRIPT"
+
+while [ -h "$SCRIPT" ] ; do
+ ls=`ls -ld "$SCRIPT"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ SCRIPT="$link"
+ else
+ SCRIPT=`dirname "$SCRIPT"`/"$link"
+ fi
+done
+
+if [ ! -d "${APP_DIR}" ]; then
+ APP_DIR=`dirname "$SCRIPT"`/..
+ APP_DIR=`cd "${APP_DIR}"; pwd`
+fi
+
+executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
+
+if [ ! -f "$executable" ]
+then
+ mvn clean package
+fi
+
+# if you've executed sbt assembly previously it will use that instead.
+export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/openapi3/client/petstore/python/ -DpackageName=petstore_api $@"
+
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date
index d358e59f3969..31ccc7edfaed 100755
--- a/bin/utils/ensure-up-to-date
+++ b/bin/utils/ensure-up-to-date
@@ -21,6 +21,8 @@ declare -a scripts=("./bin/openapi3/ruby-client-petstore.sh"
"./bin/kotlin-client-threetenbp.sh"
"./bin/kotlin-server-petstore.sh"
"./bin/mysql-schema-petstore.sh"
+"./bin/python-petstore.sh"
+"./bin/openapi3/python-petstore.sh"
"./bin/php-petstore.sh"
"./bin/php-silex-petstore-server.sh"
"./bin/php-symfony-petstore.sh"
diff --git a/modules/openapi-generator/src/main/resources/python/configuration.mustache b/modules/openapi-generator/src/main/resources/python/configuration.mustache
index 8077c1ccf0ef..562c036e9fc3 100644
--- a/modules/openapi-generator/src/main/resources/python/configuration.mustache
+++ b/modules/openapi-generator/src/main/resources/python/configuration.mustache
@@ -247,3 +247,77 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
"Version of the API: {{version}}\n"\
"SDK Package Version: {{packageVersion}}".\
format(env=sys.platform, pyversion=sys.version)
+
+ def get_host_settings(self):
+ """Gets an array of host settings
+
+ :return: An array of host settings
+ """
+ return [
+ {{#servers}}
+ {
+ 'url': "{{{url}}}",
+ 'description': "{{{description}}}{{^description}}No description provided{{/description}}",
+ {{#variables}}
+ {{#-first}}
+ 'variables': {
+ {{/-first}}
+ '{{{name}}}': {
+ 'description': "{{{description}}}{{^description}}No description provided{{/description}}",
+ 'default_value': "{{{defaultValue}}}",
+ {{#enumValues}}
+ {{#-first}}
+ 'enum_values': [
+ {{/-first}}
+ "{{{.}}}"{{^-last}},{{/-last}}
+ {{#-last}}
+ ]
+ {{/-last}}
+ {{/enumValues}}
+ }{{^-last}},{{/-last}}
+ {{#-last}}
+ }
+ {{/-last}}
+ {{/variables}}
+ }{{^-last}},{{/-last}}
+ {{/servers}}
+ ]
+
+ def get_host_from_settings(self, index, variables={}):
+ """Gets host URL based on the index and variables
+ :param index: array index of the host settings
+ :param variables: hash of variable and the corresponding value
+ :return: URL based on host settings
+ """
+
+ servers = self.get_host_settings()
+
+ # check array index out of bound
+ if index < 0 or index >= len(servers):
+ raise ValueError(
+ "Invalid index {} when selecting the host settings. Must be less than {}" # noqa: E501
+ .format(index, len(servers)))
+
+ server = servers[index]
+ url = server['url']
+
+ # go through variable and assign a value
+ for variable_name in server['variables']:
+ if variable_name in variables:
+ if variables[variable_name] in server['variables'][
+ variable_name]['enum_values']:
+ url = url.replace("{" + variable_name + "}",
+ variables[variable_name])
+ else:
+ raise ValueError(
+ "The variable `{}` in the host URL has invalid value {}. Must be {}." # noqa: E501
+ .format(
+ variable_name, variables[variable_name],
+ server['variables'][variable_name]['enum_values']))
+ else:
+ # use default value
+ url = url.replace(
+ "{" + variable_name + "}",
+ server['variables'][variable_name]['default_value'])
+
+ return url
diff --git a/pom.xml b/pom.xml
index 5680b150edc9..0a1a09ccc42e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1038,8 +1038,9 @@
samples/client/petstore/javascript-promise-es6
samples/client/petstore/javascript-flowtyped
samples/client/petstore/python
- samples/client/petstore/python-tornado
samples/client/petstore/python-asyncio
+ samples/client/petstore/python-tornado
+ samples/openapi3/client/petstore/python
samples/client/petstore/typescript-fetch/builds/default
samples/client/petstore/typescript-fetch/builds/es6-target
samples/client/petstore/typescript-fetch/builds/with-npm-version
diff --git a/samples/client/petstore/python-asyncio/README.md b/samples/client/petstore/python-asyncio/README.md
index 05c64828c81a..865a13a5508b 100644
--- a/samples/client/petstore/python-asyncio/README.md
+++ b/samples/client/petstore/python-asyncio/README.md
@@ -53,11 +53,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration))
-client = petstore_api.Client() # Client | client model
+body = petstore_api.Client() # Client | client model
try:
# To test special tags
- api_response = api_instance.call_123_test_special_tags(client)
+ api_response = api_instance.call_123_test_special_tags(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e)
@@ -142,6 +142,8 @@ Class | Method | HTTP request | Description
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [SpecialModelName](docs/SpecialModelName.md)
- [Tag](docs/Tag.md)
+ - [TypeHolderDefault](docs/TypeHolderDefault.md)
+ - [TypeHolderExample](docs/TypeHolderExample.md)
- [User](docs/User.md)
diff --git a/samples/client/petstore/python-asyncio/docs/AnotherFakeApi.md b/samples/client/petstore/python-asyncio/docs/AnotherFakeApi.md
index 447ce3edde3a..53d8da58f0c1 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
# **call_123_test_special_tags**
-> Client call_123_test_special_tags(client)
+> Client call_123_test_special_tags(body)
To test special tags
@@ -24,11 +24,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.AnotherFakeApi()
-client = petstore_api.Client() # Client | client model
+body = petstore_api.Client() # Client | client model
try:
# To test special tags
- api_response = api_instance.call_123_test_special_tags(client)
+ api_response = api_instance.call_123_test_special_tags(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e)
@@ -38,7 +38,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **client** | [**Client**](Client.md)| client model |
+ **body** | [**Client**](Client.md)| client model |
### Return type
diff --git a/samples/client/petstore/python-asyncio/docs/FakeApi.md b/samples/client/petstore/python-asyncio/docs/FakeApi.md
index 97dc3c892e07..a8c0bcf08ea1 100644
--- a/samples/client/petstore/python-asyncio/docs/FakeApi.md
+++ b/samples/client/petstore/python-asyncio/docs/FakeApi.md
@@ -66,7 +66,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **fake_outer_composite_serialize**
-> OuterComposite fake_outer_composite_serialize(outer_composite=outer_composite)
+> OuterComposite fake_outer_composite_serialize(body=body)
@@ -82,10 +82,10 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-outer_composite = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
+body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
try:
- api_response = api_instance.fake_outer_composite_serialize(outer_composite=outer_composite)
+ api_response = api_instance.fake_outer_composite_serialize(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e)
@@ -95,7 +95,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
+ **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@@ -207,7 +207,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **test_body_with_file_schema**
-> test_body_with_file_schema(file_schema_test_class)
+> test_body_with_file_schema(body)
@@ -223,10 +223,10 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-file_schema_test_class = petstore_api.FileSchemaTestClass() # FileSchemaTestClass |
+body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass |
try:
- api_instance.test_body_with_file_schema(file_schema_test_class)
+ api_instance.test_body_with_file_schema(body)
except ApiException as e:
print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e)
```
@@ -235,7 +235,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **file_schema_test_class** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
+ **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
### Return type
@@ -253,7 +253,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **test_body_with_query_params**
-> test_body_with_query_params(query, user)
+> test_body_with_query_params(query, body)
@@ -268,10 +268,10 @@ 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 |
+body = petstore_api.User() # User |
try:
- api_instance.test_body_with_query_params(query, user)
+ api_instance.test_body_with_query_params(query, body)
except ApiException as e:
print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e)
```
@@ -281,7 +281,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **str**| |
- **user** | [**User**](User.md)| |
+ **body** | [**User**](User.md)| |
### Return type
@@ -299,7 +299,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **test_client_model**
-> Client test_client_model(client)
+> Client test_client_model(body)
To test \"client\" model
@@ -315,11 +315,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-client = petstore_api.Client() # Client | client model
+body = petstore_api.Client() # Client | client model
try:
# To test \"client\" model
- api_response = api_instance.test_client_model(client)
+ api_response = api_instance.test_client_model(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeApi->test_client_model: %s\n" % e)
@@ -329,7 +329,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **client** | [**Client**](Client.md)| client model |
+ **body** | [**Client**](Client.md)| client model |
### Return type
@@ -362,9 +362,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure HTTP basic authorization: http_basic_test
configuration = petstore_api.Configuration()
+# Configure HTTP basic authorization: http_basic_test
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
@@ -545,7 +544,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **test_inline_additional_properties**
-> test_inline_additional_properties(request_body)
+> test_inline_additional_properties(param)
test inline additionalProperties
@@ -559,11 +558,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-request_body = {'key': 'request_body_example'} # dict(str, str) | request body
+param = {'key': 'param_example'} # dict(str, str) | request body
try:
# test inline additionalProperties
- api_instance.test_inline_additional_properties(request_body)
+ api_instance.test_inline_additional_properties(param)
except ApiException as e:
print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e)
```
@@ -572,7 +571,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **request_body** | [**dict(str, str)**](str.md)| request body |
+ **param** | [**dict(str, str)**](str.md)| request body |
### Return type
diff --git a/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md
index 3180674a077d..91e813c88b62 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(client)
+> Client test_classname(body)
To test class name in snake case
@@ -23,20 +23,19 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure API key authorization: api_key_query
configuration = petstore_api.Configuration()
+# Configure API key authorization: api_key_query
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
# create an instance of the API class
api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration))
-client = petstore_api.Client() # Client | client model
+body = petstore_api.Client() # Client | client model
try:
# To test class name in snake case
- api_response = api_instance.test_classname(client)
+ api_response = api_instance.test_classname(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e)
@@ -46,7 +45,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **client** | [**Client**](Client.md)| client model |
+ **body** | [**Client**](Client.md)| client model |
### Return type
diff --git a/samples/client/petstore/python-asyncio/docs/Pet.md b/samples/client/petstore/python-asyncio/docs/Pet.md
index 9e15090300f8..f9ea079075d1 100644
--- a/samples/client/petstore/python-asyncio/docs/Pet.md
+++ b/samples/client/petstore/python-asyncio/docs/Pet.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**category** | [**Category**](Category.md) | | [optional]
-**name** | **str** | |
+**name** | **str** | | [default to 'doggie']
**photo_urls** | **list[str]** | |
**tags** | [**list[Tag]**](Tag.md) | | [optional]
**status** | **str** | pet status in the store | [optional]
diff --git a/samples/client/petstore/python-asyncio/docs/PetApi.md b/samples/client/petstore/python-asyncio/docs/PetApi.md
index 726db4708d76..0dc747ffc0fc 100644
--- a/samples/client/petstore/python-asyncio/docs/PetApi.md
+++ b/samples/client/petstore/python-asyncio/docs/PetApi.md
@@ -16,7 +16,7 @@ Method | HTTP request | Description
# **add_pet**
-> add_pet(pet)
+> add_pet(body)
Add a new pet to the store
@@ -29,18 +29,17 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
+body = 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(pet)
+ api_instance.add_pet(body)
except ApiException as e:
print("Exception when calling PetApi->add_pet: %s\n" % e)
```
@@ -49,7 +48,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -80,9 +79,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -135,9 +133,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -189,9 +186,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -243,9 +239,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure API key authorization: api_key
configuration = petstore_api.Configuration()
+# Configure API key authorization: api_key
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
@@ -284,7 +279,7 @@ 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(pet)
+> update_pet(body)
Update an existing pet
@@ -297,18 +292,17 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
+body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
try:
# Update an existing pet
- api_instance.update_pet(pet)
+ api_instance.update_pet(body)
except ApiException as e:
print("Exception when calling PetApi->update_pet: %s\n" % e)
```
@@ -317,7 +311,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -348,9 +342,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -403,9 +396,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -459,9 +451,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
diff --git a/samples/client/petstore/python-asyncio/docs/StoreApi.md b/samples/client/petstore/python-asyncio/docs/StoreApi.md
index ab342460f865..084bf2b2f149 100644
--- a/samples/client/petstore/python-asyncio/docs/StoreApi.md
+++ b/samples/client/petstore/python-asyncio/docs/StoreApi.md
@@ -73,9 +73,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure API key authorization: api_key
configuration = petstore_api.Configuration()
+# Configure API key authorization: api_key
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
@@ -158,7 +157,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **place_order**
-> Order place_order(order)
+> Order place_order(body)
Place an order for a pet
@@ -172,11 +171,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.StoreApi()
-order = petstore_api.Order() # Order | order placed for purchasing the pet
+body = petstore_api.Order() # Order | order placed for purchasing the pet
try:
# Place an order for a pet
- api_response = api_instance.place_order(order)
+ api_response = api_instance.place_order(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling StoreApi->place_order: %s\n" % e)
@@ -186,7 +185,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **order** | [**Order**](Order.md)| order placed for purchasing the pet |
+ **body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
diff --git a/samples/client/petstore/python-asyncio/docs/TypeHolderDefault.md b/samples/client/petstore/python-asyncio/docs/TypeHolderDefault.md
new file mode 100644
index 000000000000..861da021826a
--- /dev/null
+++ b/samples/client/petstore/python-asyncio/docs/TypeHolderDefault.md
@@ -0,0 +1,14 @@
+# TypeHolderDefault
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**string_item** | **str** | | [default to 'what']
+**number_item** | **float** | |
+**integer_item** | **int** | |
+**bool_item** | **bool** | | [default to True]
+**array_item** | **list[int]** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python-asyncio/docs/TypeHolderExample.md b/samples/client/petstore/python-asyncio/docs/TypeHolderExample.md
new file mode 100644
index 000000000000..1a1535f4dee3
--- /dev/null
+++ b/samples/client/petstore/python-asyncio/docs/TypeHolderExample.md
@@ -0,0 +1,14 @@
+# TypeHolderExample
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**string_item** | **str** | | [default to 'what']
+**number_item** | **float** | | [default to 1.234]
+**integer_item** | **int** | | [default to -2]
+**bool_item** | **bool** | | [default to True]
+**array_item** | **list[int]** | | [default to [0, 1, 2, 3]]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python-asyncio/docs/UserApi.md b/samples/client/petstore/python-asyncio/docs/UserApi.md
index c7cc8b64d663..f0d9581779c6 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(user)
+> create_user(body)
Create user
@@ -31,11 +31,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-user = petstore_api.User() # User | Created user object
+body = petstore_api.User() # User | Created user object
try:
# Create user
- api_instance.create_user(user)
+ api_instance.create_user(body)
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
------------- | ------------- | ------------- | -------------
- **user** | [**User**](User.md)| Created user object |
+ **body** | [**User**](User.md)| Created user object |
### Return type
@@ -62,7 +62,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_users_with_array_input**
-> create_users_with_array_input(user)
+> create_users_with_array_input(body)
Creates list of users with given input array
@@ -76,11 +76,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-user = NULL # list[User] | List of user object
+body = NULL # list[User] | List of user object
try:
# Creates list of users with given input array
- api_instance.create_users_with_array_input(user)
+ api_instance.create_users_with_array_input(body)
except ApiException as e:
print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e)
```
@@ -89,7 +89,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user** | [**list[User]**](list.md)| List of user object |
+ **body** | [**list[User]**](list.md)| List of user object |
### Return type
@@ -107,7 +107,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_users_with_list_input**
-> create_users_with_list_input(user)
+> create_users_with_list_input(body)
Creates list of users with given input array
@@ -121,11 +121,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-user = NULL # list[User] | List of user object
+body = NULL # list[User] | List of user object
try:
# Creates list of users with given input array
- api_instance.create_users_with_list_input(user)
+ api_instance.create_users_with_list_input(body)
except ApiException as e:
print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e)
```
@@ -134,7 +134,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user** | [**list[User]**](list.md)| List of user object |
+ **body** | [**list[User]**](list.md)| List of user object |
### Return type
@@ -334,7 +334,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_user**
-> update_user(username, user)
+> update_user(username, body)
Updated user
@@ -351,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
-user = petstore_api.User() # User | Updated user object
+body = petstore_api.User() # User | Updated user object
try:
# Updated user
- api_instance.update_user(username, user)
+ api_instance.update_user(username, body)
except ApiException as e:
print("Exception when calling UserApi->update_user: %s\n" % e)
```
@@ -365,7 +365,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| name that need to be deleted |
- **user** | [**User**](User.md)| Updated user object |
+ **body** | [**User**](User.md)| Updated user object |
### Return type
diff --git a/samples/client/petstore/python-asyncio/petstore_api/__init__.py b/samples/client/petstore/python-asyncio/petstore_api/__init__.py
index 88ac77881e3e..3e09d89174c5 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/__init__.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/__init__.py
@@ -61,4 +61,6 @@
from petstore_api.models.read_only_first import ReadOnlyFirst
from petstore_api.models.special_model_name import SpecialModelName
from petstore_api.models.tag import Tag
+from petstore_api.models.type_holder_default import TypeHolderDefault
+from petstore_api.models.type_holder_example import TypeHolderExample
from petstore_api.models.user import User
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 782f7fd07b35..9fd3f816b9ca 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
@@ -32,39 +32,39 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def call_123_test_special_tags(self, client, **kwargs): # noqa: E501
+ def call_123_test_special_tags(self, body, **kwargs): # noqa: E501
"""To test special tags # noqa: E501
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.call_123_test_special_tags(client, async_req=True)
+ >>> thread = api.call_123_test_special_tags(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Client client: client model (required)
+ :param Client body: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501
+ return self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501
+ (data) = self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501
return data
- def call_123_test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501
+ def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501
"""To test special tags # noqa: E501
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.call_123_test_special_tags_with_http_info(client, async_req=True)
+ >>> thread = api.call_123_test_special_tags_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Client client: client model (required)
+ :param Client body: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
@@ -72,7 +72,7 @@ def call_123_test_special_tags_with_http_info(self, client, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['client'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def call_123_test_special_tags_with_http_info(self, client, **kwargs): # noqa:
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'client' is set
- if ('client' not in local_var_params or
- local_var_params['client'] is None):
- raise ValueError("Missing the required parameter `client` when calling `call_123_test_special_tags`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `call_123_test_special_tags`") # noqa: E501
collection_formats = {}
@@ -103,8 +103,8 @@ def call_123_test_special_tags_with_http_info(self, client, **kwargs): # noqa:
local_var_files = {}
body_params = None
- if 'client' in local_var_params:
- body_params = local_var_params['client']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# 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 1647628c4075..e9401073dde4 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
@@ -134,7 +134,7 @@ def fake_outer_composite_serialize(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async_req bool
- :param OuterComposite outer_composite: Input composite as post body
+ :param OuterComposite body: Input composite as post body
:return: OuterComposite
If the method is called asynchronously,
returns the request thread.
@@ -156,7 +156,7 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async_req bool
- :param OuterComposite outer_composite: Input composite as post body
+ :param OuterComposite body: Input composite as post body
:return: OuterComposite
If the method is called asynchronously,
returns the request thread.
@@ -164,7 +164,7 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['outer_composite'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -191,8 +191,8 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'outer_composite' in local_var_params:
- body_params = local_var_params['outer_composite']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['*/*']) # noqa: E501
@@ -400,39 +400,39 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def test_body_with_file_schema(self, file_schema_test_class, **kwargs): # noqa: E501
+ def test_body_with_file_schema(self, body, **kwargs): # noqa: E501
"""test_body_with_file_schema # noqa: E501
For this test, the body for this request much reference a schema named `File`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.test_body_with_file_schema(file_schema_test_class, async_req=True)
+ >>> thread = api.test_body_with_file_schema(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param FileSchemaTestClass file_schema_test_class: (required)
+ :param FileSchemaTestClass body: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501
+ return self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501
+ (data) = self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501
return data
- def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kwargs): # noqa: E501
+ def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E501
"""test_body_with_file_schema # noqa: E501
For this test, the body for this request much reference a schema named `File`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.test_body_with_file_schema_with_http_info(file_schema_test_class, async_req=True)
+ >>> thread = api.test_body_with_file_schema_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param FileSchemaTestClass file_schema_test_class: (required)
+ :param FileSchemaTestClass body: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -440,7 +440,7 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw
local_var_params = locals()
- all_params = ['file_schema_test_class'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -454,10 +454,10 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'file_schema_test_class' is set
- if ('file_schema_test_class' not in local_var_params or
- local_var_params['file_schema_test_class'] is None):
- raise ValueError("Missing the required parameter `file_schema_test_class` when calling `test_body_with_file_schema`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `test_body_with_file_schema`") # noqa: E501
collection_formats = {}
@@ -471,8 +471,8 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw
local_var_files = {}
body_params = None
- if 'file_schema_test_class' in local_var_params:
- body_params = local_var_params['file_schema_test_class']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
@@ -496,39 +496,39 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def test_body_with_query_params(self, query, user, **kwargs): # noqa: E501
+ def test_body_with_query_params(self, query, body, **kwargs): # noqa: E501
"""test_body_with_query_params # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.test_body_with_query_params(query, user, async_req=True)
+ >>> thread = api.test_body_with_query_params(query, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str query: (required)
- :param User user: (required)
+ :param User body: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501
+ return self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501
else:
- (data) = self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501
+ (data) = self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501
return data
- def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # noqa: E501
+ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # noqa: E501
"""test_body_with_query_params # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.test_body_with_query_params_with_http_info(query, user, async_req=True)
+ >>> thread = api.test_body_with_query_params_with_http_info(query, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str query: (required)
- :param User user: (required)
+ :param User body: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -536,7 +536,7 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): #
local_var_params = locals()
- all_params = ['query', 'user'] # noqa: E501
+ all_params = ['query', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -554,10 +554,10 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): #
if ('query' not in local_var_params or
local_var_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 local_var_params or
- local_var_params['user'] is None):
- raise ValueError("Missing the required parameter `user` when calling `test_body_with_query_params`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `test_body_with_query_params`") # noqa: E501
collection_formats = {}
@@ -573,8 +573,8 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): #
local_var_files = {}
body_params = None
- if 'user' in local_var_params:
- body_params = local_var_params['user']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
@@ -598,39 +598,39 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): #
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def test_client_model(self, client, **kwargs): # noqa: E501
+ def test_client_model(self, body, **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_req=True
- >>> thread = api.test_client_model(client, async_req=True)
+ >>> thread = api.test_client_model(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Client client: client model (required)
+ :param Client body: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.test_client_model_with_http_info(client, **kwargs) # noqa: E501
+ return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.test_client_model_with_http_info(client, **kwargs) # noqa: E501
+ (data) = self.test_client_model_with_http_info(body, **kwargs) # noqa: E501
return data
- def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501
+ def test_client_model_with_http_info(self, body, **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_req=True
- >>> thread = api.test_client_model_with_http_info(client, async_req=True)
+ >>> thread = api.test_client_model_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Client client: client model (required)
+ :param Client body: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
@@ -638,7 +638,7 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['client'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -652,10 +652,10 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'client' is set
- if ('client' not in local_var_params or
- local_var_params['client'] is None):
- raise ValueError("Missing the required parameter `client` when calling `test_client_model`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `test_client_model`") # noqa: E501
collection_formats = {}
@@ -669,8 +669,8 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'client' in local_var_params:
- body_params = local_var_params['client']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
@@ -1129,37 +1129,37 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def test_inline_additional_properties(self, request_body, **kwargs): # noqa: E501
+ def test_inline_additional_properties(self, param, **kwargs): # noqa: E501
"""test inline additionalProperties # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.test_inline_additional_properties(request_body, async_req=True)
+ >>> thread = api.test_inline_additional_properties(param, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param dict(str, str) request_body: request body (required)
+ :param dict(str, str) param: request body (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501
+ return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501
else:
- (data) = self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501
+ (data) = self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501
return data
- def test_inline_additional_properties_with_http_info(self, request_body, **kwargs): # noqa: E501
+ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # noqa: E501
"""test inline additionalProperties # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.test_inline_additional_properties_with_http_info(request_body, async_req=True)
+ >>> thread = api.test_inline_additional_properties_with_http_info(param, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param dict(str, str) request_body: request body (required)
+ :param dict(str, str) param: request body (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -1167,7 +1167,7 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg
local_var_params = locals()
- all_params = ['request_body'] # noqa: E501
+ all_params = ['param'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -1181,10 +1181,10 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'request_body' is set
- if ('request_body' not in local_var_params or
- local_var_params['request_body'] is None):
- raise ValueError("Missing the required parameter `request_body` when calling `test_inline_additional_properties`") # noqa: E501
+ # verify the required parameter 'param' is set
+ if ('param' not in local_var_params or
+ local_var_params['param'] is None):
+ raise ValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501
collection_formats = {}
@@ -1198,8 +1198,8 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg
local_var_files = {}
body_params = None
- if 'request_body' in local_var_params:
- body_params = local_var_params['request_body']
+ if 'param' in local_var_params:
+ body_params = local_var_params['param']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # 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 80e03e6626ee..dbf6ef3dfb37 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
@@ -32,39 +32,39 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def test_classname(self, client, **kwargs): # noqa: E501
+ def test_classname(self, body, **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_req=True
- >>> thread = api.test_classname(client, async_req=True)
+ >>> thread = api.test_classname(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Client client: client model (required)
+ :param Client body: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.test_classname_with_http_info(client, **kwargs) # noqa: E501
+ return self.test_classname_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.test_classname_with_http_info(client, **kwargs) # noqa: E501
+ (data) = self.test_classname_with_http_info(body, **kwargs) # noqa: E501
return data
- def test_classname_with_http_info(self, client, **kwargs): # noqa: E501
+ def test_classname_with_http_info(self, body, **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_req=True
- >>> thread = api.test_classname_with_http_info(client, async_req=True)
+ >>> thread = api.test_classname_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Client client: client model (required)
+ :param Client body: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
@@ -72,7 +72,7 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['client'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'client' is set
- if ('client' not in local_var_params or
- local_var_params['client'] is None):
- raise ValueError("Missing the required parameter `client` when calling `test_classname`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `test_classname`") # noqa: E501
collection_formats = {}
@@ -103,8 +103,8 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'client' in local_var_params:
- body_params = local_var_params['client']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# 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 cee0e90ab5c1..f29e7239666a 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
@@ -32,37 +32,37 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def add_pet(self, pet, **kwargs): # noqa: E501
+ def add_pet(self, body, **kwargs): # noqa: E501
"""Add a new pet to the store # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.add_pet(pet, async_req=True)
+ >>> thread = api.add_pet(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Pet pet: Pet object that needs to be added to the store (required)
+ :param Pet body: Pet object that needs to be added to the store (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.add_pet_with_http_info(pet, **kwargs) # noqa: E501
+ return self.add_pet_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.add_pet_with_http_info(pet, **kwargs) # noqa: E501
+ (data) = self.add_pet_with_http_info(body, **kwargs) # noqa: E501
return data
- def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501
+ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501
"""Add a new pet to the store # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.add_pet_with_http_info(pet, async_req=True)
+ >>> thread = api.add_pet_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Pet pet: Pet object that needs to be added to the store (required)
+ :param Pet body: Pet object that needs to be added to the store (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -70,7 +70,7 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['pet'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -84,10 +84,10 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'pet' is set
- if ('pet' not in local_var_params or
- local_var_params['pet'] is None):
- raise ValueError("Missing the required parameter `pet` when calling `add_pet`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `add_pet`") # noqa: E501
collection_formats = {}
@@ -101,8 +101,8 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'pet' in local_var_params:
- body_params = local_var_params['pet']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json', 'application/xml']) # noqa: E501
@@ -510,37 +510,37 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def update_pet(self, pet, **kwargs): # noqa: E501
+ def update_pet(self, body, **kwargs): # noqa: E501
"""Update an existing pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_pet(pet, async_req=True)
+ >>> thread = api.update_pet(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Pet pet: Pet object that needs to be added to the store (required)
+ :param Pet body: Pet object that needs to be added to the store (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.update_pet_with_http_info(pet, **kwargs) # noqa: E501
+ return self.update_pet_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.update_pet_with_http_info(pet, **kwargs) # noqa: E501
+ (data) = self.update_pet_with_http_info(body, **kwargs) # noqa: E501
return data
- def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501
+ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501
"""Update an existing pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_pet_with_http_info(pet, async_req=True)
+ >>> thread = api.update_pet_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Pet pet: Pet object that needs to be added to the store (required)
+ :param Pet body: Pet object that needs to be added to the store (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -548,7 +548,7 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['pet'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -562,10 +562,10 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'pet' is set
- if ('pet' not in local_var_params or
- local_var_params['pet'] is None):
- raise ValueError("Missing the required parameter `pet` when calling `update_pet`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `update_pet`") # noqa: E501
collection_formats = {}
@@ -579,8 +579,8 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'pet' in local_var_params:
- body_params = local_var_params['pet']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json', 'application/xml']) # noqa: E501
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 8d471fddabf9..bd2677ef92bc 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
@@ -312,37 +312,37 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def place_order(self, order, **kwargs): # noqa: E501
+ def place_order(self, body, **kwargs): # noqa: E501
"""Place an order for a pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.place_order(order, async_req=True)
+ >>> thread = api.place_order(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Order order: order placed for purchasing the pet (required)
+ :param Order body: order placed for purchasing the pet (required)
:return: Order
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.place_order_with_http_info(order, **kwargs) # noqa: E501
+ return self.place_order_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.place_order_with_http_info(order, **kwargs) # noqa: E501
+ (data) = self.place_order_with_http_info(body, **kwargs) # noqa: E501
return data
- def place_order_with_http_info(self, order, **kwargs): # noqa: E501
+ def place_order_with_http_info(self, body, **kwargs): # noqa: E501
"""Place an order for a pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.place_order_with_http_info(order, async_req=True)
+ >>> thread = api.place_order_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Order order: order placed for purchasing the pet (required)
+ :param Order body: order placed for purchasing the pet (required)
:return: Order
If the method is called asynchronously,
returns the request thread.
@@ -350,7 +350,7 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['order'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -364,10 +364,10 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'order' is set
- if ('order' not in local_var_params or
- local_var_params['order'] is None):
- raise ValueError("Missing the required parameter `order` when calling `place_order`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `place_order`") # noqa: E501
collection_formats = {}
@@ -381,8 +381,8 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'order' in local_var_params:
- body_params = local_var_params['order']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# 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 e86ac277e978..c27299309a6d 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
@@ -32,39 +32,39 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def create_user(self, user, **kwargs): # noqa: E501
+ def create_user(self, body, **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_req=True
- >>> thread = api.create_user(user, async_req=True)
+ >>> thread = api.create_user(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param User user: Created user object (required)
+ :param User body: Created user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.create_user_with_http_info(user, **kwargs) # noqa: E501
+ return self.create_user_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.create_user_with_http_info(user, **kwargs) # noqa: E501
+ (data) = self.create_user_with_http_info(body, **kwargs) # noqa: E501
return data
- def create_user_with_http_info(self, user, **kwargs): # noqa: E501
+ def create_user_with_http_info(self, body, **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_req=True
- >>> thread = api.create_user_with_http_info(user, async_req=True)
+ >>> thread = api.create_user_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param User user: Created user object (required)
+ :param User body: Created user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -72,7 +72,7 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['user'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'user' is set
- if ('user' not in local_var_params or
- local_var_params['user'] is None):
- raise ValueError("Missing the required parameter `user` when calling `create_user`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `create_user`") # noqa: E501
collection_formats = {}
@@ -103,8 +103,8 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'user' in local_var_params:
- body_params = local_var_params['user']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -124,37 +124,37 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def create_users_with_array_input(self, user, **kwargs): # noqa: E501
+ def create_users_with_array_input(self, body, **kwargs): # noqa: E501
"""Creates list of users with given input array # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_users_with_array_input(user, async_req=True)
+ >>> thread = api.create_users_with_array_input(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param list[User] user: List of user object (required)
+ :param list[User] body: List of user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501
+ return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501
+ (data) = self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501
return data
- def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: E501
+ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: E501
"""Creates list of users with given input array # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_users_with_array_input_with_http_info(user, async_req=True)
+ >>> thread = api.create_users_with_array_input_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param list[User] user: List of user object (required)
+ :param list[User] body: List of user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -162,7 +162,7 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['user'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -176,10 +176,10 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa:
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'user' is set
- if ('user' not in local_var_params or
- local_var_params['user'] is None):
- raise ValueError("Missing the required parameter `user` when calling `create_users_with_array_input`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `create_users_with_array_input`") # noqa: E501
collection_formats = {}
@@ -193,8 +193,8 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa:
local_var_files = {}
body_params = None
- if 'user' in local_var_params:
- body_params = local_var_params['user']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -214,37 +214,37 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa:
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def create_users_with_list_input(self, user, **kwargs): # noqa: E501
+ def create_users_with_list_input(self, body, **kwargs): # noqa: E501
"""Creates list of users with given input array # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_users_with_list_input(user, async_req=True)
+ >>> thread = api.create_users_with_list_input(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param list[User] user: List of user object (required)
+ :param list[User] body: List of user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501
+ return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501
+ (data) = self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501
return data
- def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: E501
+ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: E501
"""Creates list of users with given input array # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_users_with_list_input_with_http_info(user, async_req=True)
+ >>> thread = api.create_users_with_list_input_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param list[User] user: List of user object (required)
+ :param list[User] body: List of user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -252,7 +252,7 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['user'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -266,10 +266,10 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa:
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'user' is set
- if ('user' not in local_var_params or
- local_var_params['user'] is None):
- raise ValueError("Missing the required parameter `user` when calling `create_users_with_list_input`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `create_users_with_list_input`") # noqa: E501
collection_formats = {}
@@ -283,8 +283,8 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa:
local_var_files = {}
body_params = None
- if 'user' in local_var_params:
- body_params = local_var_params['user']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -674,41 +674,41 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def update_user(self, username, user, **kwargs): # noqa: E501
+ def update_user(self, username, body, **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_req=True
- >>> thread = api.update_user(username, user, async_req=True)
+ >>> thread = api.update_user(username, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str username: name that need to be deleted (required)
- :param User user: Updated user object (required)
+ :param User body: 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_req'):
- return self.update_user_with_http_info(username, user, **kwargs) # noqa: E501
+ return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501
else:
- (data) = self.update_user_with_http_info(username, user, **kwargs) # noqa: E501
+ (data) = self.update_user_with_http_info(username, body, **kwargs) # noqa: E501
return data
- def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501
+ def update_user_with_http_info(self, username, body, **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_req=True
- >>> thread = api.update_user_with_http_info(username, user, async_req=True)
+ >>> thread = api.update_user_with_http_info(username, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str username: name that need to be deleted (required)
- :param User user: Updated user object (required)
+ :param User body: Updated user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -716,7 +716,7 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['username', 'user'] # noqa: E501
+ all_params = ['username', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -734,10 +734,10 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501
if ('username' not in local_var_params or
local_var_params['username'] is None):
raise ValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501
- # verify the required parameter 'user' is set
- if ('user' not in local_var_params or
- local_var_params['user'] is None):
- raise ValueError("Missing the required parameter `user` when calling `update_user`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `update_user`") # noqa: E501
collection_formats = {}
@@ -753,8 +753,8 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'user' in local_var_params:
- body_params = local_var_params['user']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# Authentication setting
auth_settings = [] # noqa: E501
diff --git a/samples/client/petstore/python-asyncio/petstore_api/configuration.py b/samples/client/petstore/python-asyncio/petstore_api/configuration.py
index c6816043455c..4f058e0d1370 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/configuration.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/configuration.py
@@ -258,3 +258,54 @@ def to_debug_report(self):
"Version of the API: 1.0.0\n"\
"SDK Package Version: 1.0.0".\
format(env=sys.platform, pyversion=sys.version)
+
+ def get_host_settings(self):
+ """Gets an array of host settings
+
+ :return: An array of host settings
+ """
+ return [
+ {
+ 'url': "http://petstore.swagger.io:80/v2",
+ 'description': "No description provided",
+ }
+ ]
+
+ def get_host_from_settings(self, index, variables={}):
+ """Gets host URL based on the index and variables
+ :param index: array index of the host settings
+ :param variables: hash of variable and the corresponding value
+ :return: URL based on host settings
+ """
+
+ servers = self.get_host_settings()
+
+ # check array index out of bound
+ if index < 0 or index > len(servers):
+ raise ValueError(
+ "Invalid index {} when selecting the host settings. Must be less than {}" # noqa: E501
+ .format(index, len(servers)))
+
+ server = servers[index]
+ url = server['url']
+
+ # go through variable and assign a value
+ for variable_name in server['variables']:
+ if variable_name in variables:
+ if variables[variable_name] in server['variables'][
+ variable_name]['enum_values']:
+ url = url.replace("{" + variable_name + "}",
+ variables[variable_name])
+ else:
+ raise ValueError(
+ "The variable `{}` in the host URL has invalid value {}. Must be {}." # noqa: E501
+ .format(
+ variable_name, variables[variable_name],
+ server['variables'][variable_name]['enum_values']))
+ else:
+ # use default value
+ url = url.replace(
+ "{" + variable_name + "}",
+ server['variables'][variable_name]['default_value'])
+
+ return url
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 393dec06333f..a2a081ff4436 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/__init__.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/__init__.py
@@ -47,4 +47,6 @@
from petstore_api.models.read_only_first import ReadOnlyFirst
from petstore_api.models.special_model_name import SpecialModelName
from petstore_api.models.tag import Tag
+from petstore_api.models.type_holder_default import TypeHolderDefault
+from petstore_api.models.type_holder_example import TypeHolderExample
from petstore_api.models.user import User
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/animal.py b/samples/client/petstore/python-asyncio/petstore_api/models/animal.py
index 5acccf50f7ab..abd6f705e5e8 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/animal.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/animal.py
@@ -50,7 +50,7 @@ def __init__(self, class_name=None, color='red'): # noqa: E501
self._class_name = None
self._color = None
- self.discriminator = 'className'
+ self.discriminator = 'class_name'
self.class_name = class_name
if color is not None:
@@ -102,7 +102,8 @@ def color(self, color):
def get_real_child_model(self, data):
"""Returns the real base class specified by the discriminator"""
- discriminator_value = data[self.discriminator]
+ discriminator_key = self.attribute_map[self.discriminator]
+ discriminator_value = data[discriminator_key]
return self.discriminator_value_class_map.get(discriminator_value)
def to_dict(self):
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/pet.py b/samples/client/petstore/python-asyncio/petstore_api/models/pet.py
index d3c412f4a82b..3183f60c7971 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/pet.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/pet.py
@@ -48,7 +48,7 @@ class Pet(object):
'status': 'status'
}
- def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): # noqa: E501
+ def __init__(self, id=None, category=None, name='doggie', photo_urls=None, tags=None, status=None): # noqa: E501
"""Pet - a model defined in OpenAPI""" # noqa: E501
self._id = None
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py
new file mode 100644
index 000000000000..a0566f5d5fe6
--- /dev/null
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py
@@ -0,0 +1,221 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class TypeHolderDefault(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'string_item': 'str',
+ 'number_item': 'float',
+ 'integer_item': 'int',
+ 'bool_item': 'bool',
+ 'array_item': 'list[int]'
+ }
+
+ attribute_map = {
+ 'string_item': 'string_item',
+ 'number_item': 'number_item',
+ 'integer_item': 'integer_item',
+ 'bool_item': 'bool_item',
+ 'array_item': 'array_item'
+ }
+
+ def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None): # noqa: E501
+ """TypeHolderDefault - a model defined in OpenAPI""" # noqa: E501
+
+ self._string_item = None
+ self._number_item = None
+ self._integer_item = None
+ self._bool_item = None
+ self._array_item = None
+ self.discriminator = None
+
+ self.string_item = string_item
+ self.number_item = number_item
+ self.integer_item = integer_item
+ self.bool_item = bool_item
+ self.array_item = array_item
+
+ @property
+ def string_item(self):
+ """Gets the string_item of this TypeHolderDefault. # noqa: E501
+
+
+ :return: The string_item of this TypeHolderDefault. # noqa: E501
+ :rtype: str
+ """
+ return self._string_item
+
+ @string_item.setter
+ def string_item(self, string_item):
+ """Sets the string_item of this TypeHolderDefault.
+
+
+ :param string_item: The string_item of this TypeHolderDefault. # noqa: E501
+ :type: str
+ """
+ if string_item is None:
+ raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
+
+ self._string_item = string_item
+
+ @property
+ def number_item(self):
+ """Gets the number_item of this TypeHolderDefault. # noqa: E501
+
+
+ :return: The number_item of this TypeHolderDefault. # noqa: E501
+ :rtype: float
+ """
+ return self._number_item
+
+ @number_item.setter
+ def number_item(self, number_item):
+ """Sets the number_item of this TypeHolderDefault.
+
+
+ :param number_item: The number_item of this TypeHolderDefault. # noqa: E501
+ :type: float
+ """
+ if number_item is None:
+ raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
+
+ self._number_item = number_item
+
+ @property
+ def integer_item(self):
+ """Gets the integer_item of this TypeHolderDefault. # noqa: E501
+
+
+ :return: The integer_item of this TypeHolderDefault. # noqa: E501
+ :rtype: int
+ """
+ return self._integer_item
+
+ @integer_item.setter
+ def integer_item(self, integer_item):
+ """Sets the integer_item of this TypeHolderDefault.
+
+
+ :param integer_item: The integer_item of this TypeHolderDefault. # noqa: E501
+ :type: int
+ """
+ if integer_item is None:
+ raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
+
+ self._integer_item = integer_item
+
+ @property
+ def bool_item(self):
+ """Gets the bool_item of this TypeHolderDefault. # noqa: E501
+
+
+ :return: The bool_item of this TypeHolderDefault. # noqa: E501
+ :rtype: bool
+ """
+ return self._bool_item
+
+ @bool_item.setter
+ def bool_item(self, bool_item):
+ """Sets the bool_item of this TypeHolderDefault.
+
+
+ :param bool_item: The bool_item of this TypeHolderDefault. # noqa: E501
+ :type: bool
+ """
+ if bool_item is None:
+ raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
+
+ self._bool_item = bool_item
+
+ @property
+ def array_item(self):
+ """Gets the array_item of this TypeHolderDefault. # noqa: E501
+
+
+ :return: The array_item of this TypeHolderDefault. # noqa: E501
+ :rtype: list[int]
+ """
+ return self._array_item
+
+ @array_item.setter
+ def array_item(self, array_item):
+ """Sets the array_item of this TypeHolderDefault.
+
+
+ :param array_item: The array_item of this TypeHolderDefault. # noqa: E501
+ :type: list[int]
+ """
+ if array_item is None:
+ raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
+
+ self._array_item = array_item
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, TypeHolderDefault):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py
new file mode 100644
index 000000000000..573354ab4d6e
--- /dev/null
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py
@@ -0,0 +1,221 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class TypeHolderExample(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'string_item': 'str',
+ 'number_item': 'float',
+ 'integer_item': 'int',
+ 'bool_item': 'bool',
+ 'array_item': 'list[int]'
+ }
+
+ attribute_map = {
+ 'string_item': 'string_item',
+ 'number_item': 'number_item',
+ 'integer_item': 'integer_item',
+ 'bool_item': 'bool_item',
+ 'array_item': 'array_item'
+ }
+
+ def __init__(self, string_item='what', number_item=1.234, integer_item=-2, bool_item=True, array_item=[0, 1, 2, 3]): # noqa: E501
+ """TypeHolderExample - a model defined in OpenAPI""" # noqa: E501
+
+ self._string_item = None
+ self._number_item = None
+ self._integer_item = None
+ self._bool_item = None
+ self._array_item = None
+ self.discriminator = None
+
+ self.string_item = string_item
+ self.number_item = number_item
+ self.integer_item = integer_item
+ self.bool_item = bool_item
+ self.array_item = array_item
+
+ @property
+ def string_item(self):
+ """Gets the string_item of this TypeHolderExample. # noqa: E501
+
+
+ :return: The string_item of this TypeHolderExample. # noqa: E501
+ :rtype: str
+ """
+ return self._string_item
+
+ @string_item.setter
+ def string_item(self, string_item):
+ """Sets the string_item of this TypeHolderExample.
+
+
+ :param string_item: The string_item of this TypeHolderExample. # noqa: E501
+ :type: str
+ """
+ if string_item is None:
+ raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
+
+ self._string_item = string_item
+
+ @property
+ def number_item(self):
+ """Gets the number_item of this TypeHolderExample. # noqa: E501
+
+
+ :return: The number_item of this TypeHolderExample. # noqa: E501
+ :rtype: float
+ """
+ return self._number_item
+
+ @number_item.setter
+ def number_item(self, number_item):
+ """Sets the number_item of this TypeHolderExample.
+
+
+ :param number_item: The number_item of this TypeHolderExample. # noqa: E501
+ :type: float
+ """
+ if number_item is None:
+ raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
+
+ self._number_item = number_item
+
+ @property
+ def integer_item(self):
+ """Gets the integer_item of this TypeHolderExample. # noqa: E501
+
+
+ :return: The integer_item of this TypeHolderExample. # noqa: E501
+ :rtype: int
+ """
+ return self._integer_item
+
+ @integer_item.setter
+ def integer_item(self, integer_item):
+ """Sets the integer_item of this TypeHolderExample.
+
+
+ :param integer_item: The integer_item of this TypeHolderExample. # noqa: E501
+ :type: int
+ """
+ if integer_item is None:
+ raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
+
+ self._integer_item = integer_item
+
+ @property
+ def bool_item(self):
+ """Gets the bool_item of this TypeHolderExample. # noqa: E501
+
+
+ :return: The bool_item of this TypeHolderExample. # noqa: E501
+ :rtype: bool
+ """
+ return self._bool_item
+
+ @bool_item.setter
+ def bool_item(self, bool_item):
+ """Sets the bool_item of this TypeHolderExample.
+
+
+ :param bool_item: The bool_item of this TypeHolderExample. # noqa: E501
+ :type: bool
+ """
+ if bool_item is None:
+ raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
+
+ self._bool_item = bool_item
+
+ @property
+ def array_item(self):
+ """Gets the array_item of this TypeHolderExample. # noqa: E501
+
+
+ :return: The array_item of this TypeHolderExample. # noqa: E501
+ :rtype: list[int]
+ """
+ return self._array_item
+
+ @array_item.setter
+ def array_item(self, array_item):
+ """Sets the array_item of this TypeHolderExample.
+
+
+ :param array_item: The array_item of this TypeHolderExample. # noqa: E501
+ :type: list[int]
+ """
+ if array_item is None:
+ raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
+
+ self._array_item = array_item
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, TypeHolderExample):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/client/petstore/python-asyncio/test/test_type_holder_default.py b/samples/client/petstore/python-asyncio/test/test_type_holder_default.py
new file mode 100644
index 000000000000..1a07afa68604
--- /dev/null
+++ b/samples/client/petstore/python-asyncio/test/test_type_holder_default.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.type_holder_default import TypeHolderDefault # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestTypeHolderDefault(unittest.TestCase):
+ """TypeHolderDefault unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testTypeHolderDefault(self):
+ """Test TypeHolderDefault"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.type_holder_default.TypeHolderDefault() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python-asyncio/test/test_type_holder_example.py b/samples/client/petstore/python-asyncio/test/test_type_holder_example.py
new file mode 100644
index 000000000000..7a2621494857
--- /dev/null
+++ b/samples/client/petstore/python-asyncio/test/test_type_holder_example.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.type_holder_example import TypeHolderExample # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestTypeHolderExample(unittest.TestCase):
+ """TypeHolderExample unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testTypeHolderExample(self):
+ """Test TypeHolderExample"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.type_holder_example.TypeHolderExample() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python-tornado/README.md b/samples/client/petstore/python-tornado/README.md
index 05c64828c81a..865a13a5508b 100644
--- a/samples/client/petstore/python-tornado/README.md
+++ b/samples/client/petstore/python-tornado/README.md
@@ -53,11 +53,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration))
-client = petstore_api.Client() # Client | client model
+body = petstore_api.Client() # Client | client model
try:
# To test special tags
- api_response = api_instance.call_123_test_special_tags(client)
+ api_response = api_instance.call_123_test_special_tags(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e)
@@ -142,6 +142,8 @@ Class | Method | HTTP request | Description
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [SpecialModelName](docs/SpecialModelName.md)
- [Tag](docs/Tag.md)
+ - [TypeHolderDefault](docs/TypeHolderDefault.md)
+ - [TypeHolderExample](docs/TypeHolderExample.md)
- [User](docs/User.md)
diff --git a/samples/client/petstore/python-tornado/docs/AnotherFakeApi.md b/samples/client/petstore/python-tornado/docs/AnotherFakeApi.md
index 447ce3edde3a..53d8da58f0c1 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
# **call_123_test_special_tags**
-> Client call_123_test_special_tags(client)
+> Client call_123_test_special_tags(body)
To test special tags
@@ -24,11 +24,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.AnotherFakeApi()
-client = petstore_api.Client() # Client | client model
+body = petstore_api.Client() # Client | client model
try:
# To test special tags
- api_response = api_instance.call_123_test_special_tags(client)
+ api_response = api_instance.call_123_test_special_tags(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e)
@@ -38,7 +38,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **client** | [**Client**](Client.md)| client model |
+ **body** | [**Client**](Client.md)| client model |
### Return type
diff --git a/samples/client/petstore/python-tornado/docs/FakeApi.md b/samples/client/petstore/python-tornado/docs/FakeApi.md
index 97dc3c892e07..a8c0bcf08ea1 100644
--- a/samples/client/petstore/python-tornado/docs/FakeApi.md
+++ b/samples/client/petstore/python-tornado/docs/FakeApi.md
@@ -66,7 +66,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **fake_outer_composite_serialize**
-> OuterComposite fake_outer_composite_serialize(outer_composite=outer_composite)
+> OuterComposite fake_outer_composite_serialize(body=body)
@@ -82,10 +82,10 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-outer_composite = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
+body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
try:
- api_response = api_instance.fake_outer_composite_serialize(outer_composite=outer_composite)
+ api_response = api_instance.fake_outer_composite_serialize(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e)
@@ -95,7 +95,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
+ **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@@ -207,7 +207,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **test_body_with_file_schema**
-> test_body_with_file_schema(file_schema_test_class)
+> test_body_with_file_schema(body)
@@ -223,10 +223,10 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-file_schema_test_class = petstore_api.FileSchemaTestClass() # FileSchemaTestClass |
+body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass |
try:
- api_instance.test_body_with_file_schema(file_schema_test_class)
+ api_instance.test_body_with_file_schema(body)
except ApiException as e:
print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e)
```
@@ -235,7 +235,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **file_schema_test_class** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
+ **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
### Return type
@@ -253,7 +253,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **test_body_with_query_params**
-> test_body_with_query_params(query, user)
+> test_body_with_query_params(query, body)
@@ -268,10 +268,10 @@ 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 |
+body = petstore_api.User() # User |
try:
- api_instance.test_body_with_query_params(query, user)
+ api_instance.test_body_with_query_params(query, body)
except ApiException as e:
print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e)
```
@@ -281,7 +281,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **str**| |
- **user** | [**User**](User.md)| |
+ **body** | [**User**](User.md)| |
### Return type
@@ -299,7 +299,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **test_client_model**
-> Client test_client_model(client)
+> Client test_client_model(body)
To test \"client\" model
@@ -315,11 +315,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-client = petstore_api.Client() # Client | client model
+body = petstore_api.Client() # Client | client model
try:
# To test \"client\" model
- api_response = api_instance.test_client_model(client)
+ api_response = api_instance.test_client_model(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeApi->test_client_model: %s\n" % e)
@@ -329,7 +329,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **client** | [**Client**](Client.md)| client model |
+ **body** | [**Client**](Client.md)| client model |
### Return type
@@ -362,9 +362,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure HTTP basic authorization: http_basic_test
configuration = petstore_api.Configuration()
+# Configure HTTP basic authorization: http_basic_test
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
@@ -545,7 +544,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **test_inline_additional_properties**
-> test_inline_additional_properties(request_body)
+> test_inline_additional_properties(param)
test inline additionalProperties
@@ -559,11 +558,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.FakeApi()
-request_body = {'key': 'request_body_example'} # dict(str, str) | request body
+param = {'key': 'param_example'} # dict(str, str) | request body
try:
# test inline additionalProperties
- api_instance.test_inline_additional_properties(request_body)
+ api_instance.test_inline_additional_properties(param)
except ApiException as e:
print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e)
```
@@ -572,7 +571,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **request_body** | [**dict(str, str)**](str.md)| request body |
+ **param** | [**dict(str, str)**](str.md)| request body |
### Return type
diff --git a/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md
index 3180674a077d..91e813c88b62 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(client)
+> Client test_classname(body)
To test class name in snake case
@@ -23,20 +23,19 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure API key authorization: api_key_query
configuration = petstore_api.Configuration()
+# Configure API key authorization: api_key_query
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
# create an instance of the API class
api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration))
-client = petstore_api.Client() # Client | client model
+body = petstore_api.Client() # Client | client model
try:
# To test class name in snake case
- api_response = api_instance.test_classname(client)
+ api_response = api_instance.test_classname(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e)
@@ -46,7 +45,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **client** | [**Client**](Client.md)| client model |
+ **body** | [**Client**](Client.md)| client model |
### Return type
diff --git a/samples/client/petstore/python-tornado/docs/Pet.md b/samples/client/petstore/python-tornado/docs/Pet.md
index 9e15090300f8..f9ea079075d1 100644
--- a/samples/client/petstore/python-tornado/docs/Pet.md
+++ b/samples/client/petstore/python-tornado/docs/Pet.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**category** | [**Category**](Category.md) | | [optional]
-**name** | **str** | |
+**name** | **str** | | [default to 'doggie']
**photo_urls** | **list[str]** | |
**tags** | [**list[Tag]**](Tag.md) | | [optional]
**status** | **str** | pet status in the store | [optional]
diff --git a/samples/client/petstore/python-tornado/docs/PetApi.md b/samples/client/petstore/python-tornado/docs/PetApi.md
index 726db4708d76..0dc747ffc0fc 100644
--- a/samples/client/petstore/python-tornado/docs/PetApi.md
+++ b/samples/client/petstore/python-tornado/docs/PetApi.md
@@ -16,7 +16,7 @@ Method | HTTP request | Description
# **add_pet**
-> add_pet(pet)
+> add_pet(body)
Add a new pet to the store
@@ -29,18 +29,17 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
+body = 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(pet)
+ api_instance.add_pet(body)
except ApiException as e:
print("Exception when calling PetApi->add_pet: %s\n" % e)
```
@@ -49,7 +48,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -80,9 +79,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -135,9 +133,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -189,9 +186,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -243,9 +239,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure API key authorization: api_key
configuration = petstore_api.Configuration()
+# Configure API key authorization: api_key
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
@@ -284,7 +279,7 @@ 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(pet)
+> update_pet(body)
Update an existing pet
@@ -297,18 +292,17 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
-pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
+body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
try:
# Update an existing pet
- api_instance.update_pet(pet)
+ api_instance.update_pet(body)
except ApiException as e:
print("Exception when calling PetApi->update_pet: %s\n" % e)
```
@@ -317,7 +311,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -348,9 +342,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -403,9 +396,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -459,9 +451,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
diff --git a/samples/client/petstore/python-tornado/docs/StoreApi.md b/samples/client/petstore/python-tornado/docs/StoreApi.md
index ab342460f865..084bf2b2f149 100644
--- a/samples/client/petstore/python-tornado/docs/StoreApi.md
+++ b/samples/client/petstore/python-tornado/docs/StoreApi.md
@@ -73,9 +73,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure API key authorization: api_key
configuration = petstore_api.Configuration()
+# Configure API key authorization: api_key
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
@@ -158,7 +157,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **place_order**
-> Order place_order(order)
+> Order place_order(body)
Place an order for a pet
@@ -172,11 +171,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.StoreApi()
-order = petstore_api.Order() # Order | order placed for purchasing the pet
+body = petstore_api.Order() # Order | order placed for purchasing the pet
try:
# Place an order for a pet
- api_response = api_instance.place_order(order)
+ api_response = api_instance.place_order(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling StoreApi->place_order: %s\n" % e)
@@ -186,7 +185,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **order** | [**Order**](Order.md)| order placed for purchasing the pet |
+ **body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
diff --git a/samples/client/petstore/python-tornado/docs/TypeHolderDefault.md b/samples/client/petstore/python-tornado/docs/TypeHolderDefault.md
new file mode 100644
index 000000000000..861da021826a
--- /dev/null
+++ b/samples/client/petstore/python-tornado/docs/TypeHolderDefault.md
@@ -0,0 +1,14 @@
+# TypeHolderDefault
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**string_item** | **str** | | [default to 'what']
+**number_item** | **float** | |
+**integer_item** | **int** | |
+**bool_item** | **bool** | | [default to True]
+**array_item** | **list[int]** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python-tornado/docs/TypeHolderExample.md b/samples/client/petstore/python-tornado/docs/TypeHolderExample.md
new file mode 100644
index 000000000000..1a1535f4dee3
--- /dev/null
+++ b/samples/client/petstore/python-tornado/docs/TypeHolderExample.md
@@ -0,0 +1,14 @@
+# TypeHolderExample
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**string_item** | **str** | | [default to 'what']
+**number_item** | **float** | | [default to 1.234]
+**integer_item** | **int** | | [default to -2]
+**bool_item** | **bool** | | [default to True]
+**array_item** | **list[int]** | | [default to [0, 1, 2, 3]]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python-tornado/docs/UserApi.md b/samples/client/petstore/python-tornado/docs/UserApi.md
index c7cc8b64d663..f0d9581779c6 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(user)
+> create_user(body)
Create user
@@ -31,11 +31,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-user = petstore_api.User() # User | Created user object
+body = petstore_api.User() # User | Created user object
try:
# Create user
- api_instance.create_user(user)
+ api_instance.create_user(body)
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
------------- | ------------- | ------------- | -------------
- **user** | [**User**](User.md)| Created user object |
+ **body** | [**User**](User.md)| Created user object |
### Return type
@@ -62,7 +62,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_users_with_array_input**
-> create_users_with_array_input(user)
+> create_users_with_array_input(body)
Creates list of users with given input array
@@ -76,11 +76,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-user = NULL # list[User] | List of user object
+body = NULL # list[User] | List of user object
try:
# Creates list of users with given input array
- api_instance.create_users_with_array_input(user)
+ api_instance.create_users_with_array_input(body)
except ApiException as e:
print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e)
```
@@ -89,7 +89,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user** | [**list[User]**](list.md)| List of user object |
+ **body** | [**list[User]**](list.md)| List of user object |
### Return type
@@ -107,7 +107,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_users_with_list_input**
-> create_users_with_list_input(user)
+> create_users_with_list_input(body)
Creates list of users with given input array
@@ -121,11 +121,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
-user = NULL # list[User] | List of user object
+body = NULL # list[User] | List of user object
try:
# Creates list of users with given input array
- api_instance.create_users_with_list_input(user)
+ api_instance.create_users_with_list_input(body)
except ApiException as e:
print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e)
```
@@ -134,7 +134,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user** | [**list[User]**](list.md)| List of user object |
+ **body** | [**list[User]**](list.md)| List of user object |
### Return type
@@ -334,7 +334,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_user**
-> update_user(username, user)
+> update_user(username, body)
Updated user
@@ -351,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
-user = petstore_api.User() # User | Updated user object
+body = petstore_api.User() # User | Updated user object
try:
# Updated user
- api_instance.update_user(username, user)
+ api_instance.update_user(username, body)
except ApiException as e:
print("Exception when calling UserApi->update_user: %s\n" % e)
```
@@ -365,7 +365,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| name that need to be deleted |
- **user** | [**User**](User.md)| Updated user object |
+ **body** | [**User**](User.md)| Updated user object |
### Return type
diff --git a/samples/client/petstore/python-tornado/petstore_api/__init__.py b/samples/client/petstore/python-tornado/petstore_api/__init__.py
index 88ac77881e3e..3e09d89174c5 100644
--- a/samples/client/petstore/python-tornado/petstore_api/__init__.py
+++ b/samples/client/petstore/python-tornado/petstore_api/__init__.py
@@ -61,4 +61,6 @@
from petstore_api.models.read_only_first import ReadOnlyFirst
from petstore_api.models.special_model_name import SpecialModelName
from petstore_api.models.tag import Tag
+from petstore_api.models.type_holder_default import TypeHolderDefault
+from petstore_api.models.type_holder_example import TypeHolderExample
from petstore_api.models.user import User
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 782f7fd07b35..9fd3f816b9ca 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
@@ -32,39 +32,39 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def call_123_test_special_tags(self, client, **kwargs): # noqa: E501
+ def call_123_test_special_tags(self, body, **kwargs): # noqa: E501
"""To test special tags # noqa: E501
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.call_123_test_special_tags(client, async_req=True)
+ >>> thread = api.call_123_test_special_tags(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Client client: client model (required)
+ :param Client body: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501
+ return self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501
+ (data) = self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501
return data
- def call_123_test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501
+ def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501
"""To test special tags # noqa: E501
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.call_123_test_special_tags_with_http_info(client, async_req=True)
+ >>> thread = api.call_123_test_special_tags_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Client client: client model (required)
+ :param Client body: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
@@ -72,7 +72,7 @@ def call_123_test_special_tags_with_http_info(self, client, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['client'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def call_123_test_special_tags_with_http_info(self, client, **kwargs): # noqa:
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'client' is set
- if ('client' not in local_var_params or
- local_var_params['client'] is None):
- raise ValueError("Missing the required parameter `client` when calling `call_123_test_special_tags`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `call_123_test_special_tags`") # noqa: E501
collection_formats = {}
@@ -103,8 +103,8 @@ def call_123_test_special_tags_with_http_info(self, client, **kwargs): # noqa:
local_var_files = {}
body_params = None
- if 'client' in local_var_params:
- body_params = local_var_params['client']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# 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 1647628c4075..e9401073dde4 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
@@ -134,7 +134,7 @@ def fake_outer_composite_serialize(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async_req bool
- :param OuterComposite outer_composite: Input composite as post body
+ :param OuterComposite body: Input composite as post body
:return: OuterComposite
If the method is called asynchronously,
returns the request thread.
@@ -156,7 +156,7 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501
>>> result = thread.get()
:param async_req bool
- :param OuterComposite outer_composite: Input composite as post body
+ :param OuterComposite body: Input composite as post body
:return: OuterComposite
If the method is called asynchronously,
returns the request thread.
@@ -164,7 +164,7 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['outer_composite'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -191,8 +191,8 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'outer_composite' in local_var_params:
- body_params = local_var_params['outer_composite']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['*/*']) # noqa: E501
@@ -400,39 +400,39 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def test_body_with_file_schema(self, file_schema_test_class, **kwargs): # noqa: E501
+ def test_body_with_file_schema(self, body, **kwargs): # noqa: E501
"""test_body_with_file_schema # noqa: E501
For this test, the body for this request much reference a schema named `File`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.test_body_with_file_schema(file_schema_test_class, async_req=True)
+ >>> thread = api.test_body_with_file_schema(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param FileSchemaTestClass file_schema_test_class: (required)
+ :param FileSchemaTestClass body: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501
+ return self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501
+ (data) = self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501
return data
- def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kwargs): # noqa: E501
+ def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E501
"""test_body_with_file_schema # noqa: E501
For this test, the body for this request much reference a schema named `File`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.test_body_with_file_schema_with_http_info(file_schema_test_class, async_req=True)
+ >>> thread = api.test_body_with_file_schema_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param FileSchemaTestClass file_schema_test_class: (required)
+ :param FileSchemaTestClass body: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -440,7 +440,7 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw
local_var_params = locals()
- all_params = ['file_schema_test_class'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -454,10 +454,10 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'file_schema_test_class' is set
- if ('file_schema_test_class' not in local_var_params or
- local_var_params['file_schema_test_class'] is None):
- raise ValueError("Missing the required parameter `file_schema_test_class` when calling `test_body_with_file_schema`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `test_body_with_file_schema`") # noqa: E501
collection_formats = {}
@@ -471,8 +471,8 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw
local_var_files = {}
body_params = None
- if 'file_schema_test_class' in local_var_params:
- body_params = local_var_params['file_schema_test_class']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
@@ -496,39 +496,39 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def test_body_with_query_params(self, query, user, **kwargs): # noqa: E501
+ def test_body_with_query_params(self, query, body, **kwargs): # noqa: E501
"""test_body_with_query_params # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.test_body_with_query_params(query, user, async_req=True)
+ >>> thread = api.test_body_with_query_params(query, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str query: (required)
- :param User user: (required)
+ :param User body: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501
+ return self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501
else:
- (data) = self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501
+ (data) = self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501
return data
- def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # noqa: E501
+ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # noqa: E501
"""test_body_with_query_params # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.test_body_with_query_params_with_http_info(query, user, async_req=True)
+ >>> thread = api.test_body_with_query_params_with_http_info(query, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str query: (required)
- :param User user: (required)
+ :param User body: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -536,7 +536,7 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): #
local_var_params = locals()
- all_params = ['query', 'user'] # noqa: E501
+ all_params = ['query', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -554,10 +554,10 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): #
if ('query' not in local_var_params or
local_var_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 local_var_params or
- local_var_params['user'] is None):
- raise ValueError("Missing the required parameter `user` when calling `test_body_with_query_params`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `test_body_with_query_params`") # noqa: E501
collection_formats = {}
@@ -573,8 +573,8 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): #
local_var_files = {}
body_params = None
- if 'user' in local_var_params:
- body_params = local_var_params['user']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
@@ -598,39 +598,39 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): #
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def test_client_model(self, client, **kwargs): # noqa: E501
+ def test_client_model(self, body, **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_req=True
- >>> thread = api.test_client_model(client, async_req=True)
+ >>> thread = api.test_client_model(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Client client: client model (required)
+ :param Client body: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.test_client_model_with_http_info(client, **kwargs) # noqa: E501
+ return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.test_client_model_with_http_info(client, **kwargs) # noqa: E501
+ (data) = self.test_client_model_with_http_info(body, **kwargs) # noqa: E501
return data
- def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501
+ def test_client_model_with_http_info(self, body, **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_req=True
- >>> thread = api.test_client_model_with_http_info(client, async_req=True)
+ >>> thread = api.test_client_model_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Client client: client model (required)
+ :param Client body: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
@@ -638,7 +638,7 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['client'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -652,10 +652,10 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'client' is set
- if ('client' not in local_var_params or
- local_var_params['client'] is None):
- raise ValueError("Missing the required parameter `client` when calling `test_client_model`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `test_client_model`") # noqa: E501
collection_formats = {}
@@ -669,8 +669,8 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'client' in local_var_params:
- body_params = local_var_params['client']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
@@ -1129,37 +1129,37 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def test_inline_additional_properties(self, request_body, **kwargs): # noqa: E501
+ def test_inline_additional_properties(self, param, **kwargs): # noqa: E501
"""test inline additionalProperties # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.test_inline_additional_properties(request_body, async_req=True)
+ >>> thread = api.test_inline_additional_properties(param, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param dict(str, str) request_body: request body (required)
+ :param dict(str, str) param: request body (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501
+ return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501
else:
- (data) = self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501
+ (data) = self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501
return data
- def test_inline_additional_properties_with_http_info(self, request_body, **kwargs): # noqa: E501
+ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # noqa: E501
"""test inline additionalProperties # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.test_inline_additional_properties_with_http_info(request_body, async_req=True)
+ >>> thread = api.test_inline_additional_properties_with_http_info(param, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param dict(str, str) request_body: request body (required)
+ :param dict(str, str) param: request body (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -1167,7 +1167,7 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg
local_var_params = locals()
- all_params = ['request_body'] # noqa: E501
+ all_params = ['param'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -1181,10 +1181,10 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'request_body' is set
- if ('request_body' not in local_var_params or
- local_var_params['request_body'] is None):
- raise ValueError("Missing the required parameter `request_body` when calling `test_inline_additional_properties`") # noqa: E501
+ # verify the required parameter 'param' is set
+ if ('param' not in local_var_params or
+ local_var_params['param'] is None):
+ raise ValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501
collection_formats = {}
@@ -1198,8 +1198,8 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg
local_var_files = {}
body_params = None
- if 'request_body' in local_var_params:
- body_params = local_var_params['request_body']
+ if 'param' in local_var_params:
+ body_params = local_var_params['param']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # 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 80e03e6626ee..dbf6ef3dfb37 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
@@ -32,39 +32,39 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def test_classname(self, client, **kwargs): # noqa: E501
+ def test_classname(self, body, **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_req=True
- >>> thread = api.test_classname(client, async_req=True)
+ >>> thread = api.test_classname(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Client client: client model (required)
+ :param Client body: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.test_classname_with_http_info(client, **kwargs) # noqa: E501
+ return self.test_classname_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.test_classname_with_http_info(client, **kwargs) # noqa: E501
+ (data) = self.test_classname_with_http_info(body, **kwargs) # noqa: E501
return data
- def test_classname_with_http_info(self, client, **kwargs): # noqa: E501
+ def test_classname_with_http_info(self, body, **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_req=True
- >>> thread = api.test_classname_with_http_info(client, async_req=True)
+ >>> thread = api.test_classname_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Client client: client model (required)
+ :param Client body: client model (required)
:return: Client
If the method is called asynchronously,
returns the request thread.
@@ -72,7 +72,7 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['client'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'client' is set
- if ('client' not in local_var_params or
- local_var_params['client'] is None):
- raise ValueError("Missing the required parameter `client` when calling `test_classname`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `test_classname`") # noqa: E501
collection_formats = {}
@@ -103,8 +103,8 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'client' in local_var_params:
- body_params = local_var_params['client']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# 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 cee0e90ab5c1..f29e7239666a 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
@@ -32,37 +32,37 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def add_pet(self, pet, **kwargs): # noqa: E501
+ def add_pet(self, body, **kwargs): # noqa: E501
"""Add a new pet to the store # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.add_pet(pet, async_req=True)
+ >>> thread = api.add_pet(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Pet pet: Pet object that needs to be added to the store (required)
+ :param Pet body: Pet object that needs to be added to the store (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.add_pet_with_http_info(pet, **kwargs) # noqa: E501
+ return self.add_pet_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.add_pet_with_http_info(pet, **kwargs) # noqa: E501
+ (data) = self.add_pet_with_http_info(body, **kwargs) # noqa: E501
return data
- def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501
+ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501
"""Add a new pet to the store # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.add_pet_with_http_info(pet, async_req=True)
+ >>> thread = api.add_pet_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Pet pet: Pet object that needs to be added to the store (required)
+ :param Pet body: Pet object that needs to be added to the store (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -70,7 +70,7 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['pet'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -84,10 +84,10 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'pet' is set
- if ('pet' not in local_var_params or
- local_var_params['pet'] is None):
- raise ValueError("Missing the required parameter `pet` when calling `add_pet`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `add_pet`") # noqa: E501
collection_formats = {}
@@ -101,8 +101,8 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'pet' in local_var_params:
- body_params = local_var_params['pet']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json', 'application/xml']) # noqa: E501
@@ -510,37 +510,37 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def update_pet(self, pet, **kwargs): # noqa: E501
+ def update_pet(self, body, **kwargs): # noqa: E501
"""Update an existing pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_pet(pet, async_req=True)
+ >>> thread = api.update_pet(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Pet pet: Pet object that needs to be added to the store (required)
+ :param Pet body: Pet object that needs to be added to the store (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.update_pet_with_http_info(pet, **kwargs) # noqa: E501
+ return self.update_pet_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.update_pet_with_http_info(pet, **kwargs) # noqa: E501
+ (data) = self.update_pet_with_http_info(body, **kwargs) # noqa: E501
return data
- def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501
+ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501
"""Update an existing pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_pet_with_http_info(pet, async_req=True)
+ >>> thread = api.update_pet_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Pet pet: Pet object that needs to be added to the store (required)
+ :param Pet body: Pet object that needs to be added to the store (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -548,7 +548,7 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['pet'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -562,10 +562,10 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'pet' is set
- if ('pet' not in local_var_params or
- local_var_params['pet'] is None):
- raise ValueError("Missing the required parameter `pet` when calling `update_pet`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `update_pet`") # noqa: E501
collection_formats = {}
@@ -579,8 +579,8 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'pet' in local_var_params:
- body_params = local_var_params['pet']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json', 'application/xml']) # noqa: E501
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 8d471fddabf9..bd2677ef92bc 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
@@ -312,37 +312,37 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def place_order(self, order, **kwargs): # noqa: E501
+ def place_order(self, body, **kwargs): # noqa: E501
"""Place an order for a pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.place_order(order, async_req=True)
+ >>> thread = api.place_order(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Order order: order placed for purchasing the pet (required)
+ :param Order body: order placed for purchasing the pet (required)
:return: Order
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.place_order_with_http_info(order, **kwargs) # noqa: E501
+ return self.place_order_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.place_order_with_http_info(order, **kwargs) # noqa: E501
+ (data) = self.place_order_with_http_info(body, **kwargs) # noqa: E501
return data
- def place_order_with_http_info(self, order, **kwargs): # noqa: E501
+ def place_order_with_http_info(self, body, **kwargs): # noqa: E501
"""Place an order for a pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.place_order_with_http_info(order, async_req=True)
+ >>> thread = api.place_order_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param Order order: order placed for purchasing the pet (required)
+ :param Order body: order placed for purchasing the pet (required)
:return: Order
If the method is called asynchronously,
returns the request thread.
@@ -350,7 +350,7 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['order'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -364,10 +364,10 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'order' is set
- if ('order' not in local_var_params or
- local_var_params['order'] is None):
- raise ValueError("Missing the required parameter `order` when calling `place_order`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `place_order`") # noqa: E501
collection_formats = {}
@@ -381,8 +381,8 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'order' in local_var_params:
- body_params = local_var_params['order']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# 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 e86ac277e978..c27299309a6d 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
@@ -32,39 +32,39 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
- def create_user(self, user, **kwargs): # noqa: E501
+ def create_user(self, body, **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_req=True
- >>> thread = api.create_user(user, async_req=True)
+ >>> thread = api.create_user(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param User user: Created user object (required)
+ :param User body: Created user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.create_user_with_http_info(user, **kwargs) # noqa: E501
+ return self.create_user_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.create_user_with_http_info(user, **kwargs) # noqa: E501
+ (data) = self.create_user_with_http_info(body, **kwargs) # noqa: E501
return data
- def create_user_with_http_info(self, user, **kwargs): # noqa: E501
+ def create_user_with_http_info(self, body, **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_req=True
- >>> thread = api.create_user_with_http_info(user, async_req=True)
+ >>> thread = api.create_user_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param User user: Created user object (required)
+ :param User body: Created user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -72,7 +72,7 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['user'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -86,10 +86,10 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'user' is set
- if ('user' not in local_var_params or
- local_var_params['user'] is None):
- raise ValueError("Missing the required parameter `user` when calling `create_user`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `create_user`") # noqa: E501
collection_formats = {}
@@ -103,8 +103,8 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'user' in local_var_params:
- body_params = local_var_params['user']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -124,37 +124,37 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def create_users_with_array_input(self, user, **kwargs): # noqa: E501
+ def create_users_with_array_input(self, body, **kwargs): # noqa: E501
"""Creates list of users with given input array # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_users_with_array_input(user, async_req=True)
+ >>> thread = api.create_users_with_array_input(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param list[User] user: List of user object (required)
+ :param list[User] body: List of user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501
+ return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501
+ (data) = self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501
return data
- def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: E501
+ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: E501
"""Creates list of users with given input array # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_users_with_array_input_with_http_info(user, async_req=True)
+ >>> thread = api.create_users_with_array_input_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param list[User] user: List of user object (required)
+ :param list[User] body: List of user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -162,7 +162,7 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['user'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -176,10 +176,10 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa:
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'user' is set
- if ('user' not in local_var_params or
- local_var_params['user'] is None):
- raise ValueError("Missing the required parameter `user` when calling `create_users_with_array_input`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `create_users_with_array_input`") # noqa: E501
collection_formats = {}
@@ -193,8 +193,8 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa:
local_var_files = {}
body_params = None
- if 'user' in local_var_params:
- body_params = local_var_params['user']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -214,37 +214,37 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa:
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def create_users_with_list_input(self, user, **kwargs): # noqa: E501
+ def create_users_with_list_input(self, body, **kwargs): # noqa: E501
"""Creates list of users with given input array # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_users_with_list_input(user, async_req=True)
+ >>> thread = api.create_users_with_list_input(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param list[User] user: List of user object (required)
+ :param list[User] body: List of user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
- return self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501
+ return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501
else:
- (data) = self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501
+ (data) = self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501
return data
- def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: E501
+ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: E501
"""Creates list of users with given input array # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_users_with_list_input_with_http_info(user, async_req=True)
+ >>> thread = api.create_users_with_list_input_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
- :param list[User] user: List of user object (required)
+ :param list[User] body: List of user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -252,7 +252,7 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa:
local_var_params = locals()
- all_params = ['user'] # noqa: E501
+ all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -266,10 +266,10 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa:
)
local_var_params[key] = val
del local_var_params['kwargs']
- # verify the required parameter 'user' is set
- if ('user' not in local_var_params or
- local_var_params['user'] is None):
- raise ValueError("Missing the required parameter `user` when calling `create_users_with_list_input`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `create_users_with_list_input`") # noqa: E501
collection_formats = {}
@@ -283,8 +283,8 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa:
local_var_files = {}
body_params = None
- if 'user' in local_var_params:
- body_params = local_var_params['user']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# Authentication setting
auth_settings = [] # noqa: E501
@@ -674,41 +674,41 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def update_user(self, username, user, **kwargs): # noqa: E501
+ def update_user(self, username, body, **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_req=True
- >>> thread = api.update_user(username, user, async_req=True)
+ >>> thread = api.update_user(username, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str username: name that need to be deleted (required)
- :param User user: Updated user object (required)
+ :param User body: 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_req'):
- return self.update_user_with_http_info(username, user, **kwargs) # noqa: E501
+ return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501
else:
- (data) = self.update_user_with_http_info(username, user, **kwargs) # noqa: E501
+ (data) = self.update_user_with_http_info(username, body, **kwargs) # noqa: E501
return data
- def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501
+ def update_user_with_http_info(self, username, body, **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_req=True
- >>> thread = api.update_user_with_http_info(username, user, async_req=True)
+ >>> thread = api.update_user_with_http_info(username, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str username: name that need to be deleted (required)
- :param User user: Updated user object (required)
+ :param User body: Updated user object (required)
:return: None
If the method is called asynchronously,
returns the request thread.
@@ -716,7 +716,7 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501
local_var_params = locals()
- all_params = ['username', 'user'] # noqa: E501
+ all_params = ['username', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -734,10 +734,10 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501
if ('username' not in local_var_params or
local_var_params['username'] is None):
raise ValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501
- # verify the required parameter 'user' is set
- if ('user' not in local_var_params or
- local_var_params['user'] is None):
- raise ValueError("Missing the required parameter `user` when calling `update_user`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if ('body' not in local_var_params or
+ local_var_params['body'] is None):
+ raise ValueError("Missing the required parameter `body` when calling `update_user`") # noqa: E501
collection_formats = {}
@@ -753,8 +753,8 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501
local_var_files = {}
body_params = None
- if 'user' in local_var_params:
- body_params = local_var_params['user']
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
# Authentication setting
auth_settings = [] # noqa: E501
diff --git a/samples/client/petstore/python-tornado/petstore_api/configuration.py b/samples/client/petstore/python-tornado/petstore_api/configuration.py
index c6816043455c..4f058e0d1370 100644
--- a/samples/client/petstore/python-tornado/petstore_api/configuration.py
+++ b/samples/client/petstore/python-tornado/petstore_api/configuration.py
@@ -258,3 +258,54 @@ def to_debug_report(self):
"Version of the API: 1.0.0\n"\
"SDK Package Version: 1.0.0".\
format(env=sys.platform, pyversion=sys.version)
+
+ def get_host_settings(self):
+ """Gets an array of host settings
+
+ :return: An array of host settings
+ """
+ return [
+ {
+ 'url': "http://petstore.swagger.io:80/v2",
+ 'description': "No description provided",
+ }
+ ]
+
+ def get_host_from_settings(self, index, variables={}):
+ """Gets host URL based on the index and variables
+ :param index: array index of the host settings
+ :param variables: hash of variable and the corresponding value
+ :return: URL based on host settings
+ """
+
+ servers = self.get_host_settings()
+
+ # check array index out of bound
+ if index < 0 or index > len(servers):
+ raise ValueError(
+ "Invalid index {} when selecting the host settings. Must be less than {}" # noqa: E501
+ .format(index, len(servers)))
+
+ server = servers[index]
+ url = server['url']
+
+ # go through variable and assign a value
+ for variable_name in server['variables']:
+ if variable_name in variables:
+ if variables[variable_name] in server['variables'][
+ variable_name]['enum_values']:
+ url = url.replace("{" + variable_name + "}",
+ variables[variable_name])
+ else:
+ raise ValueError(
+ "The variable `{}` in the host URL has invalid value {}. Must be {}." # noqa: E501
+ .format(
+ variable_name, variables[variable_name],
+ server['variables'][variable_name]['enum_values']))
+ else:
+ # use default value
+ url = url.replace(
+ "{" + variable_name + "}",
+ server['variables'][variable_name]['default_value'])
+
+ return url
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 393dec06333f..a2a081ff4436 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/__init__.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/__init__.py
@@ -47,4 +47,6 @@
from petstore_api.models.read_only_first import ReadOnlyFirst
from petstore_api.models.special_model_name import SpecialModelName
from petstore_api.models.tag import Tag
+from petstore_api.models.type_holder_default import TypeHolderDefault
+from petstore_api.models.type_holder_example import TypeHolderExample
from petstore_api.models.user import User
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/animal.py b/samples/client/petstore/python-tornado/petstore_api/models/animal.py
index 5acccf50f7ab..abd6f705e5e8 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/animal.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/animal.py
@@ -50,7 +50,7 @@ def __init__(self, class_name=None, color='red'): # noqa: E501
self._class_name = None
self._color = None
- self.discriminator = 'className'
+ self.discriminator = 'class_name'
self.class_name = class_name
if color is not None:
@@ -102,7 +102,8 @@ def color(self, color):
def get_real_child_model(self, data):
"""Returns the real base class specified by the discriminator"""
- discriminator_value = data[self.discriminator]
+ discriminator_key = self.attribute_map[self.discriminator]
+ discriminator_value = data[discriminator_key]
return self.discriminator_value_class_map.get(discriminator_value)
def to_dict(self):
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/pet.py b/samples/client/petstore/python-tornado/petstore_api/models/pet.py
index d3c412f4a82b..3183f60c7971 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/pet.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/pet.py
@@ -48,7 +48,7 @@ class Pet(object):
'status': 'status'
}
- def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): # noqa: E501
+ def __init__(self, id=None, category=None, name='doggie', photo_urls=None, tags=None, status=None): # noqa: E501
"""Pet - a model defined in OpenAPI""" # noqa: E501
self._id = None
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py
new file mode 100644
index 000000000000..a0566f5d5fe6
--- /dev/null
+++ b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py
@@ -0,0 +1,221 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class TypeHolderDefault(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'string_item': 'str',
+ 'number_item': 'float',
+ 'integer_item': 'int',
+ 'bool_item': 'bool',
+ 'array_item': 'list[int]'
+ }
+
+ attribute_map = {
+ 'string_item': 'string_item',
+ 'number_item': 'number_item',
+ 'integer_item': 'integer_item',
+ 'bool_item': 'bool_item',
+ 'array_item': 'array_item'
+ }
+
+ def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None): # noqa: E501
+ """TypeHolderDefault - a model defined in OpenAPI""" # noqa: E501
+
+ self._string_item = None
+ self._number_item = None
+ self._integer_item = None
+ self._bool_item = None
+ self._array_item = None
+ self.discriminator = None
+
+ self.string_item = string_item
+ self.number_item = number_item
+ self.integer_item = integer_item
+ self.bool_item = bool_item
+ self.array_item = array_item
+
+ @property
+ def string_item(self):
+ """Gets the string_item of this TypeHolderDefault. # noqa: E501
+
+
+ :return: The string_item of this TypeHolderDefault. # noqa: E501
+ :rtype: str
+ """
+ return self._string_item
+
+ @string_item.setter
+ def string_item(self, string_item):
+ """Sets the string_item of this TypeHolderDefault.
+
+
+ :param string_item: The string_item of this TypeHolderDefault. # noqa: E501
+ :type: str
+ """
+ if string_item is None:
+ raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
+
+ self._string_item = string_item
+
+ @property
+ def number_item(self):
+ """Gets the number_item of this TypeHolderDefault. # noqa: E501
+
+
+ :return: The number_item of this TypeHolderDefault. # noqa: E501
+ :rtype: float
+ """
+ return self._number_item
+
+ @number_item.setter
+ def number_item(self, number_item):
+ """Sets the number_item of this TypeHolderDefault.
+
+
+ :param number_item: The number_item of this TypeHolderDefault. # noqa: E501
+ :type: float
+ """
+ if number_item is None:
+ raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
+
+ self._number_item = number_item
+
+ @property
+ def integer_item(self):
+ """Gets the integer_item of this TypeHolderDefault. # noqa: E501
+
+
+ :return: The integer_item of this TypeHolderDefault. # noqa: E501
+ :rtype: int
+ """
+ return self._integer_item
+
+ @integer_item.setter
+ def integer_item(self, integer_item):
+ """Sets the integer_item of this TypeHolderDefault.
+
+
+ :param integer_item: The integer_item of this TypeHolderDefault. # noqa: E501
+ :type: int
+ """
+ if integer_item is None:
+ raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
+
+ self._integer_item = integer_item
+
+ @property
+ def bool_item(self):
+ """Gets the bool_item of this TypeHolderDefault. # noqa: E501
+
+
+ :return: The bool_item of this TypeHolderDefault. # noqa: E501
+ :rtype: bool
+ """
+ return self._bool_item
+
+ @bool_item.setter
+ def bool_item(self, bool_item):
+ """Sets the bool_item of this TypeHolderDefault.
+
+
+ :param bool_item: The bool_item of this TypeHolderDefault. # noqa: E501
+ :type: bool
+ """
+ if bool_item is None:
+ raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
+
+ self._bool_item = bool_item
+
+ @property
+ def array_item(self):
+ """Gets the array_item of this TypeHolderDefault. # noqa: E501
+
+
+ :return: The array_item of this TypeHolderDefault. # noqa: E501
+ :rtype: list[int]
+ """
+ return self._array_item
+
+ @array_item.setter
+ def array_item(self, array_item):
+ """Sets the array_item of this TypeHolderDefault.
+
+
+ :param array_item: The array_item of this TypeHolderDefault. # noqa: E501
+ :type: list[int]
+ """
+ if array_item is None:
+ raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
+
+ self._array_item = array_item
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, TypeHolderDefault):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py
new file mode 100644
index 000000000000..573354ab4d6e
--- /dev/null
+++ b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py
@@ -0,0 +1,221 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class TypeHolderExample(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'string_item': 'str',
+ 'number_item': 'float',
+ 'integer_item': 'int',
+ 'bool_item': 'bool',
+ 'array_item': 'list[int]'
+ }
+
+ attribute_map = {
+ 'string_item': 'string_item',
+ 'number_item': 'number_item',
+ 'integer_item': 'integer_item',
+ 'bool_item': 'bool_item',
+ 'array_item': 'array_item'
+ }
+
+ def __init__(self, string_item='what', number_item=1.234, integer_item=-2, bool_item=True, array_item=[0, 1, 2, 3]): # noqa: E501
+ """TypeHolderExample - a model defined in OpenAPI""" # noqa: E501
+
+ self._string_item = None
+ self._number_item = None
+ self._integer_item = None
+ self._bool_item = None
+ self._array_item = None
+ self.discriminator = None
+
+ self.string_item = string_item
+ self.number_item = number_item
+ self.integer_item = integer_item
+ self.bool_item = bool_item
+ self.array_item = array_item
+
+ @property
+ def string_item(self):
+ """Gets the string_item of this TypeHolderExample. # noqa: E501
+
+
+ :return: The string_item of this TypeHolderExample. # noqa: E501
+ :rtype: str
+ """
+ return self._string_item
+
+ @string_item.setter
+ def string_item(self, string_item):
+ """Sets the string_item of this TypeHolderExample.
+
+
+ :param string_item: The string_item of this TypeHolderExample. # noqa: E501
+ :type: str
+ """
+ if string_item is None:
+ raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
+
+ self._string_item = string_item
+
+ @property
+ def number_item(self):
+ """Gets the number_item of this TypeHolderExample. # noqa: E501
+
+
+ :return: The number_item of this TypeHolderExample. # noqa: E501
+ :rtype: float
+ """
+ return self._number_item
+
+ @number_item.setter
+ def number_item(self, number_item):
+ """Sets the number_item of this TypeHolderExample.
+
+
+ :param number_item: The number_item of this TypeHolderExample. # noqa: E501
+ :type: float
+ """
+ if number_item is None:
+ raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
+
+ self._number_item = number_item
+
+ @property
+ def integer_item(self):
+ """Gets the integer_item of this TypeHolderExample. # noqa: E501
+
+
+ :return: The integer_item of this TypeHolderExample. # noqa: E501
+ :rtype: int
+ """
+ return self._integer_item
+
+ @integer_item.setter
+ def integer_item(self, integer_item):
+ """Sets the integer_item of this TypeHolderExample.
+
+
+ :param integer_item: The integer_item of this TypeHolderExample. # noqa: E501
+ :type: int
+ """
+ if integer_item is None:
+ raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
+
+ self._integer_item = integer_item
+
+ @property
+ def bool_item(self):
+ """Gets the bool_item of this TypeHolderExample. # noqa: E501
+
+
+ :return: The bool_item of this TypeHolderExample. # noqa: E501
+ :rtype: bool
+ """
+ return self._bool_item
+
+ @bool_item.setter
+ def bool_item(self, bool_item):
+ """Sets the bool_item of this TypeHolderExample.
+
+
+ :param bool_item: The bool_item of this TypeHolderExample. # noqa: E501
+ :type: bool
+ """
+ if bool_item is None:
+ raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
+
+ self._bool_item = bool_item
+
+ @property
+ def array_item(self):
+ """Gets the array_item of this TypeHolderExample. # noqa: E501
+
+
+ :return: The array_item of this TypeHolderExample. # noqa: E501
+ :rtype: list[int]
+ """
+ return self._array_item
+
+ @array_item.setter
+ def array_item(self, array_item):
+ """Sets the array_item of this TypeHolderExample.
+
+
+ :param array_item: The array_item of this TypeHolderExample. # noqa: E501
+ :type: list[int]
+ """
+ if array_item is None:
+ raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
+
+ self._array_item = array_item
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, TypeHolderExample):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/client/petstore/python-tornado/test/test_type_holder_default.py b/samples/client/petstore/python-tornado/test/test_type_holder_default.py
new file mode 100644
index 000000000000..1a07afa68604
--- /dev/null
+++ b/samples/client/petstore/python-tornado/test/test_type_holder_default.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.type_holder_default import TypeHolderDefault # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestTypeHolderDefault(unittest.TestCase):
+ """TypeHolderDefault unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testTypeHolderDefault(self):
+ """Test TypeHolderDefault"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.type_holder_default.TypeHolderDefault() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python-tornado/test/test_type_holder_example.py b/samples/client/petstore/python-tornado/test/test_type_holder_example.py
new file mode 100644
index 000000000000..7a2621494857
--- /dev/null
+++ b/samples/client/petstore/python-tornado/test/test_type_holder_example.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.type_holder_example import TypeHolderExample # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestTypeHolderExample(unittest.TestCase):
+ """TypeHolderExample unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testTypeHolderExample(self):
+ """Test TypeHolderExample"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.type_holder_example.TypeHolderExample() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python/docs/FakeApi.md b/samples/client/petstore/python/docs/FakeApi.md
index 0179be2f3d42..a8c0bcf08ea1 100644
--- a/samples/client/petstore/python/docs/FakeApi.md
+++ b/samples/client/petstore/python/docs/FakeApi.md
@@ -362,9 +362,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure HTTP basic authorization: http_basic_test
configuration = petstore_api.Configuration()
+# Configure HTTP basic authorization: http_basic_test
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
diff --git a/samples/client/petstore/python/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python/docs/FakeClassnameTags123Api.md
index 64bb06890df5..91e813c88b62 100644
--- a/samples/client/petstore/python/docs/FakeClassnameTags123Api.md
+++ b/samples/client/petstore/python/docs/FakeClassnameTags123Api.md
@@ -23,9 +23,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure API key authorization: api_key_query
configuration = petstore_api.Configuration()
+# Configure API key authorization: api_key_query
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
diff --git a/samples/client/petstore/python/docs/PetApi.md b/samples/client/petstore/python/docs/PetApi.md
index 8a0604706dbf..0dc747ffc0fc 100644
--- a/samples/client/petstore/python/docs/PetApi.md
+++ b/samples/client/petstore/python/docs/PetApi.md
@@ -29,9 +29,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -80,9 +79,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -135,9 +133,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -189,9 +186,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -243,9 +239,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure API key authorization: api_key
configuration = petstore_api.Configuration()
+# Configure API key authorization: api_key
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
@@ -297,9 +292,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -348,9 +342,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -403,9 +396,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
@@ -459,9 +451,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
diff --git a/samples/client/petstore/python/docs/StoreApi.md b/samples/client/petstore/python/docs/StoreApi.md
index 11f04da636e9..084bf2b2f149 100644
--- a/samples/client/petstore/python/docs/StoreApi.md
+++ b/samples/client/petstore/python/docs/StoreApi.md
@@ -73,9 +73,8 @@ import time
import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
-
-# Configure API key authorization: api_key
configuration = petstore_api.Configuration()
+# Configure API key authorization: api_key
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
diff --git a/samples/client/petstore/python/petstore_api/configuration.py b/samples/client/petstore/python/petstore_api/configuration.py
index c6816043455c..99189566bde3 100644
--- a/samples/client/petstore/python/petstore_api/configuration.py
+++ b/samples/client/petstore/python/petstore_api/configuration.py
@@ -258,3 +258,54 @@ def to_debug_report(self):
"Version of the API: 1.0.0\n"\
"SDK Package Version: 1.0.0".\
format(env=sys.platform, pyversion=sys.version)
+
+ def get_host_settings(self):
+ """Gets an array of host settings
+
+ :return: An array of host settings
+ """
+ return [
+ {
+ 'url': "http://petstore.swagger.io:80/v2",
+ 'description': "No description provided",
+ }
+ ]
+
+ def get_host_from_settings(self, index, variables={}):
+ """Gets host URL based on the index and variables
+ :param index: array index of the host settings
+ :param variables: hash of variable and the corresponding value
+ :return: URL based on host settings
+ """
+
+ servers = self.get_host_settings()
+
+ # check array index out of bound
+ if index < 0 or index >= len(servers):
+ raise ValueError(
+ "Invalid index {} when selecting the host settings. Must be less than {}" # noqa: E501
+ .format(index, len(servers)))
+
+ server = servers[index]
+ url = server['url']
+
+ # go through variable and assign a value
+ for variable_name in server['variables']:
+ if variable_name in variables:
+ if variables[variable_name] in server['variables'][
+ variable_name]['enum_values']:
+ url = url.replace("{" + variable_name + "}",
+ variables[variable_name])
+ else:
+ raise ValueError(
+ "The variable `{}` in the host URL has invalid value {}. Must be {}." # noqa: E501
+ .format(
+ variable_name, variables[variable_name],
+ server['variables'][variable_name]['enum_values']))
+ else:
+ # use default value
+ url = url.replace(
+ "{" + variable_name + "}",
+ server['variables'][variable_name]['default_value'])
+
+ return url
diff --git a/samples/openapi3/client/petstore/python/.gitignore b/samples/openapi3/client/petstore/python/.gitignore
new file mode 100644
index 000000000000..a655050c2631
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/.gitignore
@@ -0,0 +1,64 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*,cover
+.hypothesis/
+venv/
+.python-version
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+#Ipython Notebook
+.ipynb_checkpoints
diff --git a/samples/openapi3/client/petstore/python/.openapi-generator-ignore b/samples/openapi3/client/petstore/python/.openapi-generator-ignore
new file mode 100644
index 000000000000..7484ee590a38
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION
new file mode 100644
index 000000000000..afa636560641
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION
@@ -0,0 +1 @@
+4.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/python/.travis.yml b/samples/openapi3/client/petstore/python/.travis.yml
new file mode 100644
index 000000000000..86211e2d4a26
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/.travis.yml
@@ -0,0 +1,14 @@
+# ref: https://docs.travis-ci.com/user/languages/python
+language: python
+python:
+ - "2.7"
+ - "3.2"
+ - "3.3"
+ - "3.4"
+ - "3.5"
+ #- "3.5-dev" # 3.5 development branch
+ #- "nightly" # points to the latest development branch e.g. 3.6-dev
+# command to install dependencies
+install: "pip install -r requirements.txt"
+# command to run tests
+script: nosetests
diff --git a/samples/openapi3/client/petstore/python/Makefile b/samples/openapi3/client/petstore/python/Makefile
new file mode 100644
index 000000000000..ba5c5e73c63c
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/Makefile
@@ -0,0 +1,21 @@
+ #!/bin/bash
+
+REQUIREMENTS_FILE=dev-requirements.txt
+REQUIREMENTS_OUT=dev-requirements.txt.log
+SETUP_OUT=*.egg-info
+VENV=.venv
+
+clean:
+ rm -rf $(REQUIREMENTS_OUT)
+ rm -rf $(SETUP_OUT)
+ rm -rf $(VENV)
+ rm -rf .tox
+ rm -rf .coverage
+ find . -name "*.py[oc]" -delete
+ find . -name "__pycache__" -delete
+
+test: clean
+ bash ./test_python2.sh
+
+test-all: clean
+ bash ./test_python2_and_3.sh
diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md
new file mode 100644
index 000000000000..159f63da1072
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/README.md
@@ -0,0 +1,190 @@
+# petstore-api
+This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
+
+- API version: 1.0.0
+- Package version: 1.0.0
+- Build package: org.openapitools.codegen.languages.PythonClientCodegen
+
+## Requirements.
+
+Python 2.7 and 3.4+
+
+## Installation & Usage
+### pip install
+
+If the python package is hosted on Github, you can install directly from Github
+
+```sh
+pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
+```
+(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
+
+Then import the package:
+```python
+import petstore_api
+```
+
+### Setuptools
+
+Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
+
+```sh
+python setup.py install --user
+```
+(or `sudo python setup.py install` to install the package for all users)
+
+Then import the package:
+```python
+import petstore_api
+```
+
+## Getting Started
+
+Please follow the [installation procedure](#installation--usage) and then run the following:
+
+```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.AnotherFakeApi(petstore_api.ApiClient(configuration))
+client = petstore_api.Client() # Client | client model
+
+try:
+ # To test special tags
+ api_response = api_instance.call_123_test_special_tags(client)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e)
+
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
+*DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo |
+*FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
+*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_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
+*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
+*FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
+*FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
+*FakeApi* | [**test_json_form_data**](docs/FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data
+*FakeClassnameTags123Api* | [**test_classname**](docs/FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case
+*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
+*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
+*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
+*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
+*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
+*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
+*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
+*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
+*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
+*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
+*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
+*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID
+*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
+*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user
+*UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
+*UserApi* | [**create_users_with_list_input**](docs/UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
+*UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user
+*UserApi* | [**get_user_by_name**](docs/UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name
+*UserApi* | [**login_user**](docs/UserApi.md#login_user) | **GET** /user/login | Logs user into the system
+*UserApi* | [**logout_user**](docs/UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session
+*UserApi* | [**update_user**](docs/UserApi.md#update_user) | **PUT** /user/{username} | Updated user
+
+
+## Documentation For Models
+
+ - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
+ - [Animal](docs/Animal.md)
+ - [ApiResponse](docs/ApiResponse.md)
+ - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
+ - [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)
+ - [File](docs/File.md)
+ - [FileSchemaTestClass](docs/FileSchemaTestClass.md)
+ - [Foo](docs/Foo.md)
+ - [FormatTest](docs/FormatTest.md)
+ - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
+ - [InlineObject](docs/InlineObject.md)
+ - [InlineObject1](docs/InlineObject1.md)
+ - [InlineObject2](docs/InlineObject2.md)
+ - [InlineObject3](docs/InlineObject3.md)
+ - [InlineObject4](docs/InlineObject4.md)
+ - [InlineObject5](docs/InlineObject5.md)
+ - [InlineResponseDefault](docs/InlineResponseDefault.md)
+ - [List](docs/List.md)
+ - [MapTest](docs/MapTest.md)
+ - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
+ - [Model200Response](docs/Model200Response.md)
+ - [ModelReturn](docs/ModelReturn.md)
+ - [Name](docs/Name.md)
+ - [NumberOnly](docs/NumberOnly.md)
+ - [Order](docs/Order.md)
+ - [OuterComposite](docs/OuterComposite.md)
+ - [OuterEnum](docs/OuterEnum.md)
+ - [Pet](docs/Pet.md)
+ - [ReadOnlyFirst](docs/ReadOnlyFirst.md)
+ - [SpecialModelName](docs/SpecialModelName.md)
+ - [Tag](docs/Tag.md)
+ - [User](docs/User.md)
+
+
+## Documentation For Authorization
+
+
+## api_key
+
+- **Type**: API key
+- **API key parameter name**: api_key
+- **Location**: HTTP header
+
+## api_key_query
+
+- **Type**: API key
+- **API key parameter name**: api_key_query
+- **Location**: URL query string
+
+## http_basic_test
+
+- **Type**: HTTP basic authentication
+
+## petstore_auth
+
+- **Type**: OAuth
+- **Flow**: implicit
+- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
+- **Scopes**:
+ - **write:pets**: modify pets in your account
+ - **read:pets**: read your pets
+
+
+## Author
+
+
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesClass.md
new file mode 100644
index 000000000000..796a789d4c4b
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesClass.md
@@ -0,0 +1,11 @@
+# AdditionalPropertiesClass
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**map_property** | **dict(str, str)** | | [optional]
+**map_of_map_property** | **dict(str, dict(str, str))** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/Animal.md b/samples/openapi3/client/petstore/python/docs/Animal.md
new file mode 100644
index 000000000000..7ed4ba541fa3
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/Animal.md
@@ -0,0 +1,11 @@
+# Animal
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**class_name** | **str** | |
+**color** | **str** | | [optional] [default to 'red']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/python/docs/AnotherFakeApi.md
new file mode 100644
index 000000000000..447ce3edde3a
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/AnotherFakeApi.md
@@ -0,0 +1,57 @@
+# petstore_api.AnotherFakeApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**call_123_test_special_tags**](AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
+
+
+# **call_123_test_special_tags**
+> Client call_123_test_special_tags(client)
+
+To test special tags
+
+To test special tags and operation ID starting with number
+
+### 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.AnotherFakeApi()
+client = petstore_api.Client() # Client | client model
+
+try:
+ # To test special tags
+ api_response = api_instance.call_123_test_special_tags(client)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **client** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+[[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/openapi3/client/petstore/python/docs/ApiResponse.md b/samples/openapi3/client/petstore/python/docs/ApiResponse.md
new file mode 100644
index 000000000000..8fc302305abe
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/ApiResponse.md
@@ -0,0 +1,12 @@
+# ApiResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**code** | **int** | | [optional]
+**type** | **str** | | [optional]
+**message** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python/docs/ArrayOfArrayOfNumberOnly.md
new file mode 100644
index 000000000000..aa3988ab1679
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/ArrayOfArrayOfNumberOnly.md
@@ -0,0 +1,10 @@
+# ArrayOfArrayOfNumberOnly
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**array_array_number** | **list[list[float]]** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python/docs/ArrayOfNumberOnly.md
new file mode 100644
index 000000000000..2c3de967aec6
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/ArrayOfNumberOnly.md
@@ -0,0 +1,10 @@
+# ArrayOfNumberOnly
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**array_number** | **list[float]** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/ArrayTest.md b/samples/openapi3/client/petstore/python/docs/ArrayTest.md
new file mode 100644
index 000000000000..6ab0d1378065
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/ArrayTest.md
@@ -0,0 +1,12 @@
+# ArrayTest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**array_of_string** | **list[str]** | | [optional]
+**array_array_of_integer** | **list[list[int]]** | | [optional]
+**array_array_of_model** | **list[list[ReadOnlyFirst]]** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/Capitalization.md b/samples/openapi3/client/petstore/python/docs/Capitalization.md
new file mode 100644
index 000000000000..85d88d239ee7
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/Capitalization.md
@@ -0,0 +1,15 @@
+# Capitalization
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**small_camel** | **str** | | [optional]
+**capital_camel** | **str** | | [optional]
+**small_snake** | **str** | | [optional]
+**capital_snake** | **str** | | [optional]
+**sca_eth_flow_points** | **str** | | [optional]
+**att_name** | **str** | Name of the pet | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/Cat.md b/samples/openapi3/client/petstore/python/docs/Cat.md
new file mode 100644
index 000000000000..8d30565d014e
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/Cat.md
@@ -0,0 +1,10 @@
+# Cat
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**declawed** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/Category.md b/samples/openapi3/client/petstore/python/docs/Category.md
new file mode 100644
index 000000000000..7e5c1e316499
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/Category.md
@@ -0,0 +1,11 @@
+# Category
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | | [optional]
+**name** | **str** | | [default to 'default-name']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/ClassModel.md b/samples/openapi3/client/petstore/python/docs/ClassModel.md
new file mode 100644
index 000000000000..7f6f6d172116
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/ClassModel.md
@@ -0,0 +1,10 @@
+# ClassModel
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**_class** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/Client.md b/samples/openapi3/client/petstore/python/docs/Client.md
new file mode 100644
index 000000000000..88e99384f92c
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/Client.md
@@ -0,0 +1,10 @@
+# Client
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**client** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/DefaultApi.md b/samples/openapi3/client/petstore/python/docs/DefaultApi.md
new file mode 100644
index 000000000000..097a4e1d8cb8
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/DefaultApi.md
@@ -0,0 +1,50 @@
+# petstore_api.DefaultApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**foo_get**](DefaultApi.md#foo_get) | **GET** /foo |
+
+
+# **foo_get**
+> InlineResponseDefault foo_get()
+
+
+
+### 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.DefaultApi()
+
+try:
+ api_response = api_instance.foo_get()
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling DefaultApi->foo_get: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**InlineResponseDefault**](InlineResponseDefault.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+[[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/openapi3/client/petstore/python/docs/Dog.md b/samples/openapi3/client/petstore/python/docs/Dog.md
new file mode 100644
index 000000000000..f727487975c4
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/Dog.md
@@ -0,0 +1,10 @@
+# Dog
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**breed** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/EnumArrays.md b/samples/openapi3/client/petstore/python/docs/EnumArrays.md
new file mode 100644
index 000000000000..e15a5f1fd049
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/EnumArrays.md
@@ -0,0 +1,11 @@
+# EnumArrays
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**just_symbol** | **str** | | [optional]
+**array_enum** | **list[str]** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/EnumClass.md b/samples/openapi3/client/petstore/python/docs/EnumClass.md
new file mode 100644
index 000000000000..67f017becd0c
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/EnumClass.md
@@ -0,0 +1,9 @@
+# EnumClass
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/EnumTest.md b/samples/openapi3/client/petstore/python/docs/EnumTest.md
new file mode 100644
index 000000000000..c4c1630250ff
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/EnumTest.md
@@ -0,0 +1,14 @@
+# EnumTest
+
+## Properties
+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]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/FakeApi.md b/samples/openapi3/client/petstore/python/docs/FakeApi.md
new file mode 100644
index 000000000000..a85346268229
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/FakeApi.md
@@ -0,0 +1,637 @@
+# petstore_api.FakeApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**fake_outer_boolean_serialize**](FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
+[**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_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
+[**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
+[**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
+[**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
+[**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data
+
+
+# **fake_outer_boolean_serialize**
+> bool fake_outer_boolean_serialize(body=body)
+
+
+
+Test serialization of outer boolean types
+
+### Example
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = petstore_api.FakeApi()
+body = True # bool | Input boolean as post body (optional)
+
+try:
+ api_response = api_instance.fake_outer_boolean_serialize(body=body)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | **bool**| Input boolean as post body | [optional]
+
+### Return type
+
+**bool**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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(outer_composite=outer_composite)
+
+
+
+Test serialization of object with outer number type
+
+### 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()
+outer_composite = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional)
+
+try:
+ 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)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
+
+### Return type
+
+[**OuterComposite**](OuterComposite.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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_number_serialize**
+> float fake_outer_number_serialize(body=body)
+
+
+
+Test serialization of outer number types
+
+### Example
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = petstore_api.FakeApi()
+body = 3.4 # float | Input number as post body (optional)
+
+try:
+ api_response = api_instance.fake_outer_number_serialize(body=body)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | **float**| Input number as post body | [optional]
+
+### Return type
+
+**float**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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_string_serialize**
+> str fake_outer_string_serialize(body=body)
+
+
+
+Test serialization of outer string types
+
+### Example
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = petstore_api.FakeApi()
+body = 'body_example' # str | Input string as post body (optional)
+
+try:
+ api_response = api_instance.fake_outer_string_serialize(body=body)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | **str**| Input string as post body | [optional]
+
+### Return type
+
+**str**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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_file_schema**
+> test_body_with_file_schema(file_schema_test_class)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### 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()
+file_schema_test_class = petstore_api.FileSchemaTestClass() # FileSchemaTestClass |
+
+try:
+ api_instance.test_body_with_file_schema(file_schema_test_class)
+except ApiException as e:
+ print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **file_schema_test_class** | [**FileSchemaTestClass**](FileSchemaTestClass.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_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(client)
+
+To test \"client\" model
+
+To test \"client\" model
+
+### 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()
+client = petstore_api.Client() # Client | client model
+
+try:
+ # To test \"client\" model
+ 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)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **client** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **test_endpoint_parameters**
+> test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback)
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+### Example
+
+* Basic Authentication (http_basic_test):
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+configuration = petstore_api.Configuration()
+# Configure HTTP basic authorization: http_basic_test
+configuration.username = 'YOUR_USERNAME'
+configuration.password = 'YOUR_PASSWORD'
+
+# create an instance of the API class
+api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration))
+number = 3.4 # float | None
+double = 3.4 # float | None
+pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None
+byte = 'byte_example' # str | None
+integer = 56 # int | None (optional)
+int32 = 56 # int | None (optional)
+int64 = 56 # int | None (optional)
+float = 3.4 # float | None (optional)
+string = 'string_example' # 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)
+param_callback = 'param_callback_example' # str | None (optional)
+
+try:
+ # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback)
+except ApiException as e:
+ print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **number** | **float**| None |
+ **double** | **float**| None |
+ **pattern_without_delimiter** | **str**| None |
+ **byte** | **str**| None |
+ **integer** | **int**| None | [optional]
+ **int32** | **int**| None | [optional]
+ **int64** | **int**| None | [optional]
+ **float** | **float**| None | [optional]
+ **string** | **str**| None | [optional]
+ **binary** | **file**| None | [optional]
+ **date** | **date**| None | [optional]
+ **date_time** | **datetime**| None | [optional]
+ **password** | **str**| None | [optional]
+ **param_callback** | **str**| None | [optional]
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[http_basic_test](../README.md#http_basic_test)
+
+### HTTP request headers
+
+ - **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_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
+
+To test enum parameters
+
+### 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()
+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 = 3.4 # float | Query parameter enum test (double) (optional)
+enum_form_string_array = '$' # list[str] | Form parameter enum test (string array) (optional) (default to '$')
+enum_form_string = '-efg' # str | Form parameter enum test (string) (optional) (default to '-efg')
+
+try:
+ # To test enum parameters
+ 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)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **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]**](str.md)| Form parameter enum test (string array) | [optional] [default to '$']
+ **enum_form_string** | **str**| Form parameter enum test (string) | [optional] [default to '-efg']
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **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_group_parameters**
+> test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group)
+
+Fake endpoint to test group parameters (optional)
+
+Fake endpoint to test group parameters (optional)
+
+### 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()
+required_string_group = 56 # int | Required String in group parameters
+required_boolean_group = True # bool | Required Boolean in group parameters
+required_int64_group = 56 # int | Required Integer in group parameters
+string_group = 56 # int | String in group parameters (optional)
+boolean_group = True # bool | Boolean in group parameters (optional)
+int64_group = 56 # int | Integer in group parameters (optional)
+
+try:
+ # Fake endpoint to test group parameters (optional)
+ api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group)
+except ApiException as e:
+ print("Exception when calling FakeApi->test_group_parameters: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **required_string_group** | **int**| Required String in group parameters |
+ **required_boolean_group** | **bool**| Required Boolean in group parameters |
+ **required_int64_group** | **int**| Required Integer in group parameters |
+ **string_group** | **int**| String in group parameters | [optional]
+ **boolean_group** | **bool**| Boolean in group parameters | [optional]
+ **int64_group** | **int**| Integer in group parameters | [optional]
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **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(request_body)
+
+test inline additionalProperties
+
+### 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()
+request_body = {'key': 'request_body_example'} # dict(str, str) | request body
+
+try:
+ # test inline additionalProperties
+ api_instance.test_inline_additional_properties(request_body)
+except ApiException as e:
+ print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **request_body** | [**dict(str, str)**](str.md)| request body |
+
+### 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_json_form_data**
+> test_json_form_data(param, param2)
+
+test json serialization of form data
+
+### 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()
+param = 'param_example' # str | field1
+param2 = 'param2_example' # str | field2
+
+try:
+ # test json serialization of form data
+ api_instance.test_json_form_data(param, param2)
+except ApiException as e:
+ print("Exception when calling FakeApi->test_json_form_data: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **param** | **str**| field1 |
+ **param2** | **str**| field2 |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **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/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md
new file mode 100644
index 000000000000..9a37c461b601
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md
@@ -0,0 +1,64 @@
+# petstore_api.FakeClassnameTags123Api
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**test_classname**](FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case
+
+
+# **test_classname**
+> Client test_classname(client)
+
+To test class name in snake case
+
+To test class name in snake case
+
+### Example
+
+* Api Key Authentication (api_key_query):
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+configuration = petstore_api.Configuration()
+# Configure API key authorization: api_key_query
+configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['api_key_query'] = 'Bearer'
+
+# create an instance of the API class
+api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration))
+client = petstore_api.Client() # Client | client model
+
+try:
+ # To test class name in snake case
+ api_response = api_instance.test_classname(client)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **client** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+[api_key_query](../README.md#api_key_query)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+[[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/openapi3/client/petstore/python/docs/File.md b/samples/openapi3/client/petstore/python/docs/File.md
new file mode 100644
index 000000000000..6a925f0a7af4
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/File.md
@@ -0,0 +1,10 @@
+# File
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**source_uri** | **str** | Test capitalization | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/FileSchemaTestClass.md b/samples/openapi3/client/petstore/python/docs/FileSchemaTestClass.md
new file mode 100644
index 000000000000..dc3722289887
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/FileSchemaTestClass.md
@@ -0,0 +1,11 @@
+# FileSchemaTestClass
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**file** | [**File**](File.md) | | [optional]
+**files** | [**list[File]**](File.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/Foo.md b/samples/openapi3/client/petstore/python/docs/Foo.md
new file mode 100644
index 000000000000..c55aa2cf103c
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/Foo.md
@@ -0,0 +1,10 @@
+# Foo
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bar** | **str** | | [optional] [default to 'bar']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/FormatTest.md b/samples/openapi3/client/petstore/python/docs/FormatTest.md
new file mode 100644
index 000000000000..d503d24bfa40
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/FormatTest.md
@@ -0,0 +1,24 @@
+# FormatTest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**integer** | **int** | | [optional]
+**int32** | **int** | | [optional]
+**int64** | **int** | | [optional]
+**number** | **float** | |
+**float** | **float** | | [optional]
+**double** | **float** | | [optional]
+**string** | **str** | | [optional]
+**byte** | **str** | |
+**binary** | **file** | | [optional]
+**date** | **date** | |
+**date_time** | **datetime** | | [optional]
+**uuid** | **str** | | [optional]
+**password** | **str** | |
+**pattern_with_digits** | **str** | A string that is a 10 digit number. Can have leading zeros. | [optional]
+**pattern_with_digits_and_delimiter** | **str** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/python/docs/HasOnlyReadOnly.md
new file mode 100644
index 000000000000..44ad450b52c5
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/HasOnlyReadOnly.md
@@ -0,0 +1,11 @@
+# HasOnlyReadOnly
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bar** | **str** | | [optional]
+**foo** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/InlineObject.md b/samples/openapi3/client/petstore/python/docs/InlineObject.md
new file mode 100644
index 000000000000..f567ea188ce0
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/InlineObject.md
@@ -0,0 +1,11 @@
+# InlineObject
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | Updated name of the pet | [optional]
+**status** | **str** | Updated status of the pet | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/InlineObject1.md b/samples/openapi3/client/petstore/python/docs/InlineObject1.md
new file mode 100644
index 000000000000..42d38efa3013
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/InlineObject1.md
@@ -0,0 +1,11 @@
+# InlineObject1
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**additional_metadata** | **str** | Additional data to pass to server | [optional]
+**file** | **file** | file to upload | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/InlineObject2.md b/samples/openapi3/client/petstore/python/docs/InlineObject2.md
new file mode 100644
index 000000000000..9bfba12f6f15
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/InlineObject2.md
@@ -0,0 +1,11 @@
+# InlineObject2
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**enum_form_string_array** | **list[str]** | Form parameter enum test (string array) | [optional]
+**enum_form_string** | **str** | Form parameter enum test (string) | [optional] [default to '-efg']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/InlineObject3.md b/samples/openapi3/client/petstore/python/docs/InlineObject3.md
new file mode 100644
index 000000000000..ef9845fcd9c6
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/InlineObject3.md
@@ -0,0 +1,23 @@
+# InlineObject3
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**integer** | **int** | None | [optional]
+**int32** | **int** | None | [optional]
+**int64** | **int** | None | [optional]
+**number** | **float** | None |
+**float** | **float** | None | [optional]
+**double** | **float** | None |
+**string** | **str** | None | [optional]
+**pattern_without_delimiter** | **str** | None |
+**byte** | **str** | None |
+**binary** | **file** | None | [optional]
+**date** | **date** | None | [optional]
+**date_time** | **datetime** | None | [optional]
+**password** | **str** | None | [optional]
+**callback** | **str** | None | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/InlineObject4.md b/samples/openapi3/client/petstore/python/docs/InlineObject4.md
new file mode 100644
index 000000000000..07574d0d0769
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/InlineObject4.md
@@ -0,0 +1,11 @@
+# InlineObject4
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**param** | **str** | field1 |
+**param2** | **str** | field2 |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/InlineObject5.md b/samples/openapi3/client/petstore/python/docs/InlineObject5.md
new file mode 100644
index 000000000000..c4502f70f9c8
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/InlineObject5.md
@@ -0,0 +1,11 @@
+# InlineObject5
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**additional_metadata** | **str** | Additional data to pass to server | [optional]
+**required_file** | **file** | file to upload |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/InlineResponseDefault.md b/samples/openapi3/client/petstore/python/docs/InlineResponseDefault.md
new file mode 100644
index 000000000000..9c754420f24a
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/InlineResponseDefault.md
@@ -0,0 +1,10 @@
+# InlineResponseDefault
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**string** | [**Foo**](Foo.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/List.md b/samples/openapi3/client/petstore/python/docs/List.md
new file mode 100644
index 000000000000..11f4f3a05f32
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/List.md
@@ -0,0 +1,10 @@
+# List
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**_123_list** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/MapTest.md b/samples/openapi3/client/petstore/python/docs/MapTest.md
new file mode 100644
index 000000000000..a5601691f885
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/MapTest.md
@@ -0,0 +1,13 @@
+# MapTest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**map_map_of_string** | **dict(str, dict(str, str))** | | [optional]
+**map_of_enum_string** | **dict(str, str)** | | [optional]
+**direct_map** | **dict(str, bool)** | | [optional]
+**indirect_map** | **dict(str, bool)** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md
new file mode 100644
index 000000000000..b9808d5275e5
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -0,0 +1,12 @@
+# MixedPropertiesAndAdditionalPropertiesClass
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**uuid** | **str** | | [optional]
+**date_time** | **datetime** | | [optional]
+**map** | [**dict(str, Animal)**](Animal.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/Model200Response.md b/samples/openapi3/client/petstore/python/docs/Model200Response.md
new file mode 100644
index 000000000000..30f47cae5210
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/Model200Response.md
@@ -0,0 +1,11 @@
+# Model200Response
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **int** | | [optional]
+**_class** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/ModelReturn.md b/samples/openapi3/client/petstore/python/docs/ModelReturn.md
new file mode 100644
index 000000000000..2b03798e3016
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/ModelReturn.md
@@ -0,0 +1,10 @@
+# ModelReturn
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**_return** | **int** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/Name.md b/samples/openapi3/client/petstore/python/docs/Name.md
new file mode 100644
index 000000000000..542da3f04768
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/Name.md
@@ -0,0 +1,13 @@
+# Name
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **int** | |
+**snake_case** | **int** | | [optional]
+**_property** | **str** | | [optional]
+**_123_number** | **int** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/NumberOnly.md b/samples/openapi3/client/petstore/python/docs/NumberOnly.md
new file mode 100644
index 000000000000..93a0fde7b931
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/NumberOnly.md
@@ -0,0 +1,10 @@
+# NumberOnly
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**just_number** | **float** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/Order.md b/samples/openapi3/client/petstore/python/docs/Order.md
new file mode 100644
index 000000000000..b5f7b22d34cf
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/Order.md
@@ -0,0 +1,15 @@
+# Order
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | | [optional]
+**pet_id** | **int** | | [optional]
+**quantity** | **int** | | [optional]
+**ship_date** | **datetime** | | [optional]
+**status** | **str** | Order Status | [optional]
+**complete** | **bool** | | [optional] [default to False]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/OuterComposite.md b/samples/openapi3/client/petstore/python/docs/OuterComposite.md
new file mode 100644
index 000000000000..bab07ad559eb
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/OuterComposite.md
@@ -0,0 +1,12 @@
+# OuterComposite
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**my_number** | **float** | | [optional]
+**my_string** | **str** | | [optional]
+**my_boolean** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/OuterEnum.md b/samples/openapi3/client/petstore/python/docs/OuterEnum.md
new file mode 100644
index 000000000000..06d413b01680
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/OuterEnum.md
@@ -0,0 +1,9 @@
+# OuterEnum
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/Pet.md b/samples/openapi3/client/petstore/python/docs/Pet.md
new file mode 100644
index 000000000000..f9ea079075d1
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/Pet.md
@@ -0,0 +1,15 @@
+# Pet
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | | [optional]
+**category** | [**Category**](Category.md) | | [optional]
+**name** | **str** | | [default to 'doggie']
+**photo_urls** | **list[str]** | |
+**tags** | [**list[Tag]**](Tag.md) | | [optional]
+**status** | **str** | pet status in the store | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/PetApi.md b/samples/openapi3/client/petstore/python/docs/PetApi.md
new file mode 100644
index 000000000000..4101863e3561
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/PetApi.md
@@ -0,0 +1,494 @@
+# petstore_api.PetApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
+[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
+[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
+[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
+[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
+[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
+[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
+[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
+[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
+
+
+# **add_pet**
+> add_pet(pet)
+
+Add a new pet to the store
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
+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(pet)
+except ApiException as e:
+ print("Exception when calling PetApi->add_pet: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json, application/xml
+ - **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)
+
+# **delete_pet**
+> delete_pet(pet_id, api_key=api_key)
+
+Deletes a pet
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
+pet_id = 56 # int | Pet id to delete
+api_key = 'api_key_example' # str | (optional)
+
+try:
+ # Deletes a pet
+ api_instance.delete_pet(pet_id, api_key=api_key)
+except ApiException as e:
+ print("Exception when calling PetApi->delete_pet: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet_id** | **int**| Pet id to delete |
+ **api_key** | **str**| | [optional]
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **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)
+
+# **find_pets_by_status**
+> list[Pet] find_pets_by_status(status)
+
+Finds Pets by status
+
+Multiple status values can be provided with comma separated strings
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
+status = ['status_example'] # list[str] | Status values that need to be considered for filter
+
+try:
+ # Finds Pets by status
+ api_response = api_instance.find_pets_by_status(status)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PetApi->find_pets_by_status: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **status** | [**list[str]**](str.md)| Status values that need to be considered for filter |
+
+### Return type
+
+[**list[Pet]**](Pet.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+[[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)
+
+# **find_pets_by_tags**
+> list[Pet] find_pets_by_tags(tags)
+
+Finds Pets by tags
+
+Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
+tags = ['tags_example'] # list[str] | Tags to filter by
+
+try:
+ # Finds Pets by tags
+ api_response = api_instance.find_pets_by_tags(tags)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **tags** | [**list[str]**](str.md)| Tags to filter by |
+
+### Return type
+
+[**list[Pet]**](Pet.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+[[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)
+
+# **get_pet_by_id**
+> Pet get_pet_by_id(pet_id)
+
+Find pet by ID
+
+Returns a single pet
+
+### Example
+
+* Api Key Authentication (api_key):
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+configuration = petstore_api.Configuration()
+# Configure API key authorization: api_key
+configuration.api_key['api_key'] = 'YOUR_API_KEY'
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['api_key'] = 'Bearer'
+
+# create an instance of the API class
+api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
+pet_id = 56 # int | ID of pet to return
+
+try:
+ # Find pet by ID
+ api_response = api_instance.get_pet_by_id(pet_id)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PetApi->get_pet_by_id: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet_id** | **int**| ID of pet to return |
+
+### Return type
+
+[**Pet**](Pet.md)
+
+### Authorization
+
+[api_key](../README.md#api_key)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+[[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(pet)
+
+Update an existing pet
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
+pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store
+
+try:
+ # Update an existing pet
+ api_instance.update_pet(pet)
+except ApiException as e:
+ print("Exception when calling PetApi->update_pet: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json, application/xml
+ - **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_pet_with_form**
+> update_pet_with_form(pet_id, name=name, status=status)
+
+Updates a pet in the store with form data
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
+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)
+
+try:
+ # Updates a pet in the store with form data
+ api_instance.update_pet_with_form(pet_id, name=name, status=status)
+except ApiException as e:
+ print("Exception when calling PetApi->update_pet_with_form: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet_id** | **int**| ID of pet that needs to be updated |
+ **name** | **str**| Updated name of the pet | [optional]
+ **status** | **str**| Updated status of the pet | [optional]
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **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)
+
+# **upload_file**
+> ApiResponse upload_file(pet_id, additional_metadata=additional_metadata, file=file)
+
+uploads an image
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
+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' # file | file to upload (optional)
+
+try:
+ # uploads an image
+ api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PetApi->upload_file: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet_id** | **int**| ID of pet to update |
+ **additional_metadata** | **str**| Additional data to pass to server | [optional]
+ **file** | **file**| file to upload | [optional]
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
+[[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)
+
+# **upload_file_with_required_file**
+> ApiResponse upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata)
+
+uploads an image (required)
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+configuration = petstore_api.Configuration()
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration))
+pet_id = 56 # int | ID of pet to update
+required_file = '/path/to/file' # file | file to upload
+additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
+
+try:
+ # uploads an image (required)
+ api_response = api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet_id** | **int**| ID of pet to update |
+ **required_file** | **file**| file to upload |
+ **additional_metadata** | **str**| Additional data to pass to server | [optional]
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
+[[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/openapi3/client/petstore/python/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/python/docs/ReadOnlyFirst.md
new file mode 100644
index 000000000000..93fed253d01c
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/ReadOnlyFirst.md
@@ -0,0 +1,11 @@
+# ReadOnlyFirst
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bar** | **str** | | [optional]
+**baz** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/SpecialModelName.md b/samples/openapi3/client/petstore/python/docs/SpecialModelName.md
new file mode 100644
index 000000000000..022ee19169ce
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/SpecialModelName.md
@@ -0,0 +1,10 @@
+# SpecialModelName
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**special_property_name** | **int** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/StoreApi.md b/samples/openapi3/client/petstore/python/docs/StoreApi.md
new file mode 100644
index 000000000000..86e368b93428
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/StoreApi.md
@@ -0,0 +1,204 @@
+# petstore_api.StoreApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
+[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
+[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID
+[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
+
+
+# **delete_order**
+> delete_order(order_id)
+
+Delete purchase order by ID
+
+For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+
+### 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.StoreApi()
+order_id = 'order_id_example' # str | ID of the order that needs to be deleted
+
+try:
+ # Delete purchase order by ID
+ api_instance.delete_order(order_id)
+except ApiException as e:
+ print("Exception when calling StoreApi->delete_order: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **order_id** | **str**| ID of the order that needs to be deleted |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **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)
+
+# **get_inventory**
+> dict(str, int) get_inventory()
+
+Returns pet inventories by status
+
+Returns a map of status codes to quantities
+
+### Example
+
+* Api Key Authentication (api_key):
+```python
+from __future__ import print_function
+import time
+import petstore_api
+from petstore_api.rest import ApiException
+from pprint import pprint
+configuration = petstore_api.Configuration()
+# Configure API key authorization: api_key
+configuration.api_key['api_key'] = 'YOUR_API_KEY'
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['api_key'] = 'Bearer'
+
+# create an instance of the API class
+api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration))
+
+try:
+ # Returns pet inventories by status
+ api_response = api_instance.get_inventory()
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling StoreApi->get_inventory: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+**dict(str, int)**
+
+### Authorization
+
+[api_key](../README.md#api_key)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+[[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)
+
+# **get_order_by_id**
+> Order get_order_by_id(order_id)
+
+Find purchase order by ID
+
+For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+
+### 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.StoreApi()
+order_id = 56 # int | ID of pet that needs to be fetched
+
+try:
+ # Find purchase order by ID
+ api_response = api_instance.get_order_by_id(order_id)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling StoreApi->get_order_by_id: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **order_id** | **int**| ID of pet that needs to be fetched |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+[[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(order)
+
+Place an order for a pet
+
+### 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.StoreApi()
+order = petstore_api.Order() # Order | order placed for purchasing the pet
+
+try:
+ # Place an order for a pet
+ api_response = api_instance.place_order(order)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling StoreApi->place_order: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **order** | [**Order**](Order.md)| order placed for purchasing the pet |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/xml, application/json
+
+[[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/openapi3/client/petstore/python/docs/Tag.md b/samples/openapi3/client/petstore/python/docs/Tag.md
new file mode 100644
index 000000000000..243cd98eda69
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/Tag.md
@@ -0,0 +1,11 @@
+# Tag
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | | [optional]
+**name** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/User.md b/samples/openapi3/client/petstore/python/docs/User.md
new file mode 100644
index 000000000000..443ac123fdca
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/User.md
@@ -0,0 +1,17 @@
+# User
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | | [optional]
+**username** | **str** | | [optional]
+**first_name** | **str** | | [optional]
+**last_name** | **str** | | [optional]
+**email** | **str** | | [optional]
+**password** | **str** | | [optional]
+**phone** | **str** | | [optional]
+**user_status** | **int** | User Status | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/python/docs/UserApi.md b/samples/openapi3/client/petstore/python/docs/UserApi.md
new file mode 100644
index 000000000000..cf5e653878c0
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/UserApi.md
@@ -0,0 +1,384 @@
+# petstore_api.UserApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**create_user**](UserApi.md#create_user) | **POST** /user | Create user
+[**create_users_with_array_input**](UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
+[**create_users_with_list_input**](UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
+[**delete_user**](UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user
+[**get_user_by_name**](UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name
+[**login_user**](UserApi.md#login_user) | **GET** /user/login | Logs user into the system
+[**logout_user**](UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session
+[**update_user**](UserApi.md#update_user) | **PUT** /user/{username} | Updated user
+
+
+# **create_user**
+> create_user(user)
+
+Create user
+
+This can only be done by the logged in 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.UserApi()
+user = petstore_api.User() # User | Created user object
+
+try:
+ # Create user
+ api_instance.create_user(user)
+except ApiException as e:
+ print("Exception when calling UserApi->create_user: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **user** | [**User**](User.md)| Created user object |
+
+### 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)
+
+# **create_users_with_array_input**
+> create_users_with_array_input(user)
+
+Creates list of users with given input array
+
+### 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.UserApi()
+user = NULL # list[User] | List of user object
+
+try:
+ # Creates list of users with given input array
+ 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)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **user** | [**list[User]**](list.md)| List of user object |
+
+### 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)
+
+# **create_users_with_list_input**
+> create_users_with_list_input(user)
+
+Creates list of users with given input array
+
+### 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.UserApi()
+user = NULL # list[User] | List of user object
+
+try:
+ # Creates list of users with given input array
+ 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)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **user** | [**list[User]**](list.md)| List of user object |
+
+### 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)
+
+# **delete_user**
+> delete_user(username)
+
+Delete user
+
+This can only be done by the logged in 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.UserApi()
+username = 'username_example' # str | The name that needs to be deleted
+
+try:
+ # Delete user
+ api_instance.delete_user(username)
+except ApiException as e:
+ print("Exception when calling UserApi->delete_user: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **str**| The name that needs to be deleted |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **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)
+
+# **get_user_by_name**
+> User get_user_by_name(username)
+
+Get user by user name
+
+### 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.UserApi()
+username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
+
+try:
+ # Get user by user name
+ api_response = api_instance.get_user_by_name(username)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling UserApi->get_user_by_name: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **str**| The name that needs to be fetched. Use user1 for testing. |
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+[[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)
+
+# **login_user**
+> str login_user(username, password)
+
+Logs user into the system
+
+### 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.UserApi()
+username = 'username_example' # str | The user name for login
+password = 'password_example' # str | The password for login in clear text
+
+try:
+ # Logs user into the system
+ api_response = api_instance.login_user(username, password)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling UserApi->login_user: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **str**| The user name for login |
+ **password** | **str**| The password for login in clear text |
+
+### Return type
+
+**str**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+[[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)
+
+# **logout_user**
+> logout_user()
+
+Logs out current logged in user session
+
+### 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.UserApi()
+
+try:
+ # Logs out current logged in user session
+ api_instance.logout_user()
+except ApiException as e:
+ print("Exception when calling UserApi->logout_user: %s\n" % e)
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **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, user)
+
+Updated user
+
+This can only be done by the logged in 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.UserApi()
+username = 'username_example' # str | name that need to be deleted
+user = petstore_api.User() # User | Updated user object
+
+try:
+ # Updated user
+ api_instance.update_user(username, user)
+except ApiException as e:
+ print("Exception when calling UserApi->update_user: %s\n" % e)
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **str**| name that need to be deleted |
+ **user** | [**User**](User.md)| Updated user object |
+
+### 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)
+
diff --git a/samples/openapi3/client/petstore/python/git_push.sh b/samples/openapi3/client/petstore/python/git_push.sh
new file mode 100644
index 000000000000..8442b80bb445
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/git_push.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
+#
+# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
+
+git_user_id=$1
+git_repo_id=$2
+release_note=$3
+
+if [ "$git_user_id" = "" ]; then
+ git_user_id="GIT_USER_ID"
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
+fi
+
+if [ "$git_repo_id" = "" ]; then
+ git_repo_id="GIT_REPO_ID"
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
+fi
+
+if [ "$release_note" = "" ]; then
+ release_note="Minor update"
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
+fi
+
+# Initialize the local directory as a Git repository
+git init
+
+# Adds the files in the local repository and stages them for commit.
+git add .
+
+# Commits the tracked changes and prepares them to be pushed to a remote repository.
+git commit -m "$release_note"
+
+# Sets the new remote
+git_remote=`git remote`
+if [ "$git_remote" = "" ]; then # git remote not defined
+
+ if [ "$GIT_TOKEN" = "" ]; then
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
+ else
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
+ fi
+
+fi
+
+git pull origin master
+
+# Pushes (Forces) the changes in the local repository up to the remote repository
+echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
+git push origin master 2>&1 | grep -v 'To https'
+
diff --git a/samples/openapi3/client/petstore/python/petstore_api/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/__init__.py
new file mode 100644
index 000000000000..4ee9bd7e0381
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/__init__.py
@@ -0,0 +1,73 @@
+# coding: utf-8
+
+# flake8: noqa
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+__version__ = "1.0.0"
+
+# import apis into sdk package
+from petstore_api.api.another_fake_api import AnotherFakeApi
+from petstore_api.api.default_api import DefaultApi
+from petstore_api.api.fake_api import FakeApi
+from petstore_api.api.fake_classname_tags_123_api import FakeClassnameTags123Api
+from petstore_api.api.pet_api import PetApi
+from petstore_api.api.store_api import StoreApi
+from petstore_api.api.user_api import UserApi
+
+# import ApiClient
+from petstore_api.api_client import ApiClient
+from petstore_api.configuration import Configuration
+# import models into sdk package
+from petstore_api.models.additional_properties_class import AdditionalPropertiesClass
+from petstore_api.models.animal import Animal
+from petstore_api.models.api_response import ApiResponse
+from petstore_api.models.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly
+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
+from petstore_api.models.file import File
+from petstore_api.models.file_schema_test_class import FileSchemaTestClass
+from petstore_api.models.foo import Foo
+from petstore_api.models.format_test import FormatTest
+from petstore_api.models.has_only_read_only import HasOnlyReadOnly
+from petstore_api.models.inline_object import InlineObject
+from petstore_api.models.inline_object1 import InlineObject1
+from petstore_api.models.inline_object2 import InlineObject2
+from petstore_api.models.inline_object3 import InlineObject3
+from petstore_api.models.inline_object4 import InlineObject4
+from petstore_api.models.inline_object5 import InlineObject5
+from petstore_api.models.inline_response_default import InlineResponseDefault
+from petstore_api.models.list import List
+from petstore_api.models.map_test import MapTest
+from petstore_api.models.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass
+from petstore_api.models.model200_response import Model200Response
+from petstore_api.models.model_return import ModelReturn
+from petstore_api.models.name import Name
+from petstore_api.models.number_only import NumberOnly
+from petstore_api.models.order import Order
+from petstore_api.models.outer_composite import OuterComposite
+from petstore_api.models.outer_enum import OuterEnum
+from petstore_api.models.pet import Pet
+from petstore_api.models.read_only_first import ReadOnlyFirst
+from petstore_api.models.special_model_name import SpecialModelName
+from petstore_api.models.tag import Tag
+from petstore_api.models.user import User
diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/api/__init__.py
new file mode 100644
index 000000000000..fa4e54a80091
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/api/__init__.py
@@ -0,0 +1,12 @@
+from __future__ import absolute_import
+
+# flake8: noqa
+
+# import apis into api package
+from petstore_api.api.another_fake_api import AnotherFakeApi
+from petstore_api.api.default_api import DefaultApi
+from petstore_api.api.fake_api import FakeApi
+from petstore_api.api.fake_classname_tags_123_api import FakeClassnameTags123Api
+from petstore_api.api.pet_api import PetApi
+from petstore_api.api.store_api import StoreApi
+from petstore_api.api.user_api import UserApi
diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py
new file mode 100644
index 000000000000..782f7fd07b35
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py
@@ -0,0 +1,133 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import re # noqa: F401
+
+# python 2 and python 3 compatibility library
+import six
+
+from petstore_api.api_client import ApiClient
+
+
+class AnotherFakeApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def call_123_test_special_tags(self, client, **kwargs): # noqa: E501
+ """To test special tags # noqa: E501
+
+ To test special tags and operation ID starting with number # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.call_123_test_special_tags(client, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :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_req'):
+ return self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501
+ else:
+ (data) = self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501
+ return data
+
+ def call_123_test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501
+ """To test special tags # noqa: E501
+
+ To test special tags and operation ID starting with number # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.call_123_test_special_tags_with_http_info(client, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param Client client: client model (required)
+ :return: Client
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['client'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method call_123_test_special_tags" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'client' is set
+ if ('client' not in local_var_params or
+ local_var_params['client'] is None):
+ raise ValueError("Missing the required parameter `client` when calling `call_123_test_special_tags`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'client' in local_var_params:
+ body_params = local_var_params['client']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # 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(
+ '/another-fake/dummy', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='Client', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py
new file mode 100644
index 000000000000..035f2697a667
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py
@@ -0,0 +1,119 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import re # noqa: F401
+
+# python 2 and python 3 compatibility library
+import six
+
+from petstore_api.api_client import ApiClient
+
+
+class DefaultApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def foo_get(self, **kwargs): # noqa: E501
+ """foo_get # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.foo_get(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :return: InlineResponseDefault
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.foo_get_with_http_info(**kwargs) # noqa: E501
+ else:
+ (data) = self.foo_get_with_http_info(**kwargs) # noqa: E501
+ return data
+
+ def foo_get_with_http_info(self, **kwargs): # noqa: E501
+ """foo_get # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.foo_get_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :return: InlineResponseDefault
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method foo_get" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/foo', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='InlineResponseDefault', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py
new file mode 100644
index 000000000000..b29ea904dd08
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py
@@ -0,0 +1,1342 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import re # noqa: F401
+
+# python 2 and python 3 compatibility library
+import six
+
+from petstore_api.api_client import ApiClient
+
+
+class FakeApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def fake_outer_boolean_serialize(self, **kwargs): # noqa: E501
+ """fake_outer_boolean_serialize # noqa: E501
+
+ Test serialization of outer boolean types # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.fake_outer_boolean_serialize(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param bool body: Input boolean as post body
+ :return: bool
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501
+ else:
+ (data) = self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501
+ return data
+
+ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501
+ """fake_outer_boolean_serialize # noqa: E501
+
+ Test serialization of outer boolean types # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.fake_outer_boolean_serialize_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param bool body: Input boolean as post body
+ :return: bool
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['body'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method fake_outer_boolean_serialize" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # 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
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/fake/outer/boolean', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='bool', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def fake_outer_composite_serialize(self, **kwargs): # noqa: E501
+ """fake_outer_composite_serialize # noqa: E501
+
+ Test serialization of object with outer number type # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.fake_outer_composite_serialize(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param OuterComposite outer_composite: Input composite as post body
+ :return: OuterComposite
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501
+ else:
+ (data) = self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501
+ return data
+
+ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501
+ """fake_outer_composite_serialize # noqa: E501
+
+ Test serialization of object with outer number type # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.fake_outer_composite_serialize_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param OuterComposite outer_composite: Input composite as post body
+ :return: OuterComposite
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['outer_composite'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method fake_outer_composite_serialize" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'outer_composite' in local_var_params:
+ body_params = local_var_params['outer_composite']
+ # 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
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/fake/outer/composite', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='OuterComposite', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def fake_outer_number_serialize(self, **kwargs): # noqa: E501
+ """fake_outer_number_serialize # noqa: E501
+
+ Test serialization of outer number types # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.fake_outer_number_serialize(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param float body: Input number as post body
+ :return: float
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501
+ else:
+ (data) = self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501
+ return data
+
+ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501
+ """fake_outer_number_serialize # noqa: E501
+
+ Test serialization of outer number types # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.fake_outer_number_serialize_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param float body: Input number as post body
+ :return: float
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['body'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method fake_outer_number_serialize" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # 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
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/fake/outer/number', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='float', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def fake_outer_string_serialize(self, **kwargs): # noqa: E501
+ """fake_outer_string_serialize # noqa: E501
+
+ Test serialization of outer string types # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.fake_outer_string_serialize(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str body: Input string as post body
+ :return: str
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501
+ else:
+ (data) = self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501
+ return data
+
+ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501
+ """fake_outer_string_serialize # noqa: E501
+
+ Test serialization of outer string types # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.fake_outer_string_serialize_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str body: Input string as post body
+ :return: str
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['body'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method fake_outer_string_serialize" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # 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
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/fake/outer/string', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='str', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def test_body_with_file_schema(self, file_schema_test_class, **kwargs): # noqa: E501
+ """test_body_with_file_schema # noqa: E501
+
+ For this test, the body for this request much reference a schema named `File`. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.test_body_with_file_schema(file_schema_test_class, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param FileSchemaTestClass file_schema_test_class: (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501
+ else:
+ (data) = self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501
+ return data
+
+ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kwargs): # noqa: E501
+ """test_body_with_file_schema # noqa: E501
+
+ For this test, the body for this request much reference a schema named `File`. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.test_body_with_file_schema_with_http_info(file_schema_test_class, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param FileSchemaTestClass file_schema_test_class: (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['file_schema_test_class'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method test_body_with_file_schema" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'file_schema_test_class' is set
+ if ('file_schema_test_class' not in local_var_params or
+ local_var_params['file_schema_test_class'] is None):
+ raise ValueError("Missing the required parameter `file_schema_test_class` when calling `test_body_with_file_schema`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'file_schema_test_class' in local_var_params:
+ body_params = local_var_params['file_schema_test_class']
+ # 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-file-schema', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ 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_req=True
+ >>> thread = api.test_body_with_query_params(query, user, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req 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_req'):
+ 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_req=True
+ >>> thread = api.test_body_with_query_params_with_http_info(query, user, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str query: (required)
+ :param User user: (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['query', 'user'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method test_body_with_query_params" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'query' is set
+ if ('query' not in local_var_params or
+ local_var_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 local_var_params or
+ local_var_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 local_var_params:
+ query_params.append(('query', local_var_params['query'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'user' in local_var_params:
+ body_params = local_var_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_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_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_req=True
+ >>> thread = api.test_client_model(client, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :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_req'):
+ return self.test_client_model_with_http_info(client, **kwargs) # noqa: E501
+ else:
+ (data) = self.test_client_model_with_http_info(client, **kwargs) # noqa: E501
+ return data
+
+ 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_req=True
+ >>> thread = api.test_client_model_with_http_info(client, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param Client client: client model (required)
+ :return: Client
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['client'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method test_client_model" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'client' is set
+ if ('client' not in local_var_params or
+ local_var_params['client'] is None):
+ raise ValueError("Missing the required parameter `client` when calling `test_client_model`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'client' in local_var_params:
+ body_params = local_var_params['client']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # 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', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='Client', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def test_endpoint_parameters(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501
+ """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
+
+ Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param float number: None (required)
+ :param float double: None (required)
+ :param str pattern_without_delimiter: None (required)
+ :param str byte: None (required)
+ :param int integer: None
+ :param int int32: None
+ :param int int64: None
+ :param float float: None
+ :param str string: None
+ :param file binary: None
+ :param date date: None
+ :param datetime date_time: None
+ :param str password: None
+ :param str param_callback: None
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501
+ else:
+ (data) = self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501
+ return data
+
+ def test_endpoint_parameters_with_http_info(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501
+ """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
+
+ Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param float number: None (required)
+ :param float double: None (required)
+ :param str pattern_without_delimiter: None (required)
+ :param str byte: None (required)
+ :param int integer: None
+ :param int int32: None
+ :param int int64: None
+ :param float float: None
+ :param str string: None
+ :param file binary: None
+ :param date date: None
+ :param datetime date_time: None
+ :param str password: None
+ :param str param_callback: None
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['number', 'double', 'pattern_without_delimiter', 'byte', 'integer', 'int32', 'int64', 'float', 'string', 'binary', 'date', 'date_time', 'password', 'param_callback'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method test_endpoint_parameters" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'number' is set
+ if ('number' not in local_var_params or
+ local_var_params['number'] is None):
+ raise ValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") # noqa: E501
+ # verify the required parameter 'double' is set
+ if ('double' not in local_var_params or
+ local_var_params['double'] is None):
+ raise ValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`") # noqa: E501
+ # verify the required parameter 'pattern_without_delimiter' is set
+ if ('pattern_without_delimiter' not in local_var_params or
+ local_var_params['pattern_without_delimiter'] is None):
+ raise ValueError("Missing the required parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`") # noqa: E501
+ # verify the required parameter 'byte' is set
+ if ('byte' not in local_var_params or
+ local_var_params['byte'] is None):
+ raise ValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501
+
+ if 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501
+ raise ValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`") # noqa: E501
+ if 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501
+ raise ValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`") # noqa: E501
+ if 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501
+ 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 local_var_params and local_var_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 local_var_params and not re.search(r'^[A-Z].*', local_var_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 local_var_params and local_var_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
+ if 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501
+ raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10`") # noqa: E501
+ if 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501
+ raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501
+ if 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501
+ raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`") # noqa: E501
+ if 'float' in local_var_params and local_var_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 local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501
+ raise ValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") # noqa: E501
+ if ('password' in local_var_params and
+ len(local_var_params['password']) > 64):
+ raise ValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`") # noqa: E501
+ if ('password' in local_var_params and
+ len(local_var_params['password']) < 10):
+ raise ValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+ if 'integer' in local_var_params:
+ form_params.append(('integer', local_var_params['integer'])) # noqa: E501
+ if 'int32' in local_var_params:
+ form_params.append(('int32', local_var_params['int32'])) # noqa: E501
+ if 'int64' in local_var_params:
+ form_params.append(('int64', local_var_params['int64'])) # noqa: E501
+ if 'number' in local_var_params:
+ form_params.append(('number', local_var_params['number'])) # noqa: E501
+ if 'float' in local_var_params:
+ form_params.append(('float', local_var_params['float'])) # noqa: E501
+ if 'double' in local_var_params:
+ form_params.append(('double', local_var_params['double'])) # noqa: E501
+ if 'string' in local_var_params:
+ form_params.append(('string', local_var_params['string'])) # noqa: E501
+ if 'pattern_without_delimiter' in local_var_params:
+ form_params.append(('pattern_without_delimiter', local_var_params['pattern_without_delimiter'])) # noqa: E501
+ if 'byte' in local_var_params:
+ form_params.append(('byte', local_var_params['byte'])) # noqa: E501
+ if 'binary' in local_var_params:
+ local_var_files['binary'] = local_var_params['binary'] # noqa: E501
+ if 'date' in local_var_params:
+ form_params.append(('date', local_var_params['date'])) # noqa: E501
+ if 'date_time' in local_var_params:
+ form_params.append(('dateTime', local_var_params['date_time'])) # noqa: E501
+ if 'password' in local_var_params:
+ form_params.append(('password', local_var_params['password'])) # noqa: E501
+ if 'param_callback' in local_var_params:
+ form_params.append(('callback', local_var_params['param_callback'])) # noqa: E501
+
+ body_params = None
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/x-www-form-urlencoded']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['http_basic_test'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/fake', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def test_enum_parameters(self, **kwargs): # noqa: E501
+ """To test enum parameters # noqa: E501
+
+ To test enum parameters # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.test_enum_parameters(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :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.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501
+ else:
+ (data) = self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501
+ return data
+
+ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501
+ """To test enum parameters # noqa: E501
+
+ To test enum parameters # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.test_enum_parameters_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :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.
+ """
+
+ local_var_params = locals()
+
+ 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_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method test_enum_parameters" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'enum_query_string_array' in local_var_params:
+ query_params.append(('enum_query_string_array', local_var_params['enum_query_string_array'])) # noqa: E501
+ collection_formats['enum_query_string_array'] = 'multi' # noqa: E501
+ if 'enum_query_string' in local_var_params:
+ query_params.append(('enum_query_string', local_var_params['enum_query_string'])) # noqa: E501
+ if 'enum_query_integer' in local_var_params:
+ query_params.append(('enum_query_integer', local_var_params['enum_query_integer'])) # noqa: E501
+ if 'enum_query_double' in local_var_params:
+ query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501
+
+ header_params = {}
+ if 'enum_header_string_array' in local_var_params:
+ header_params['enum_header_string_array'] = local_var_params['enum_header_string_array'] # noqa: E501
+ collection_formats['enum_header_string_array'] = 'csv' # noqa: E501
+ if 'enum_header_string' in local_var_params:
+ header_params['enum_header_string'] = local_var_params['enum_header_string'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+ if 'enum_form_string_array' in local_var_params:
+ form_params.append(('enum_form_string_array', local_var_params['enum_form_string_array'])) # noqa: E501
+ collection_formats['enum_form_string_array'] = 'csv' # noqa: E501
+ if 'enum_form_string' in local_var_params:
+ form_params.append(('enum_form_string', local_var_params['enum_form_string'])) # noqa: E501
+
+ body_params = None
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/x-www-form-urlencoded']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/fake', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def test_group_parameters(self, required_string_group, required_boolean_group, required_int64_group, **kwargs): # noqa: E501
+ """Fake endpoint to test group parameters (optional) # noqa: E501
+
+ Fake endpoint to test group parameters (optional) # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int required_string_group: Required String in group parameters (required)
+ :param bool required_boolean_group: Required Boolean in group parameters (required)
+ :param int required_int64_group: Required Integer in group parameters (required)
+ :param int string_group: String in group parameters
+ :param bool boolean_group: Boolean in group parameters
+ :param int int64_group: Integer in group parameters
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501
+ else:
+ (data) = self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501
+ return data
+
+ def test_group_parameters_with_http_info(self, required_string_group, required_boolean_group, required_int64_group, **kwargs): # noqa: E501
+ """Fake endpoint to test group parameters (optional) # noqa: E501
+
+ Fake endpoint to test group parameters (optional) # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int required_string_group: Required String in group parameters (required)
+ :param bool required_boolean_group: Required Boolean in group parameters (required)
+ :param int required_int64_group: Required Integer in group parameters (required)
+ :param int string_group: String in group parameters
+ :param bool boolean_group: Boolean in group parameters
+ :param int int64_group: Integer in group parameters
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['required_string_group', 'required_boolean_group', 'required_int64_group', 'string_group', 'boolean_group', 'int64_group'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method test_group_parameters" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'required_string_group' is set
+ if ('required_string_group' not in local_var_params or
+ local_var_params['required_string_group'] is None):
+ raise ValueError("Missing the required parameter `required_string_group` when calling `test_group_parameters`") # noqa: E501
+ # verify the required parameter 'required_boolean_group' is set
+ if ('required_boolean_group' not in local_var_params or
+ local_var_params['required_boolean_group'] is None):
+ raise ValueError("Missing the required parameter `required_boolean_group` when calling `test_group_parameters`") # noqa: E501
+ # verify the required parameter 'required_int64_group' is set
+ if ('required_int64_group' not in local_var_params or
+ local_var_params['required_int64_group'] is None):
+ raise ValueError("Missing the required parameter `required_int64_group` when calling `test_group_parameters`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'required_string_group' in local_var_params:
+ query_params.append(('required_string_group', local_var_params['required_string_group'])) # noqa: E501
+ if 'required_int64_group' in local_var_params:
+ query_params.append(('required_int64_group', local_var_params['required_int64_group'])) # noqa: E501
+ if 'string_group' in local_var_params:
+ query_params.append(('string_group', local_var_params['string_group'])) # noqa: E501
+ if 'int64_group' in local_var_params:
+ query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501
+
+ header_params = {}
+ if 'required_boolean_group' in local_var_params:
+ header_params['required_boolean_group'] = local_var_params['required_boolean_group'] # noqa: E501
+ if 'boolean_group' in local_var_params:
+ header_params['boolean_group'] = local_var_params['boolean_group'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/fake', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def test_inline_additional_properties(self, request_body, **kwargs): # noqa: E501
+ """test inline additionalProperties # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.test_inline_additional_properties(request_body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param dict(str, 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_req'):
+ return self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501
+ else:
+ (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, request_body, **kwargs): # noqa: E501
+ """test inline additionalProperties # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.test_inline_additional_properties_with_http_info(request_body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param dict(str, str) request_body: request body (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['request_body'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method test_inline_additional_properties" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'request_body' is set
+ if ('request_body' not in local_var_params or
+ local_var_params['request_body'] is None):
+ raise ValueError("Missing the required parameter `request_body` when calling `test_inline_additional_properties`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'request_body' in local_var_params:
+ body_params = local_var_params['request_body']
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/fake/inline-additionalProperties', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def test_json_form_data(self, param, param2, **kwargs): # noqa: E501
+ """test json serialization of form data # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.test_json_form_data(param, param2, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str param: field1 (required)
+ :param str param2: field2 (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501
+ else:
+ (data) = self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501
+ return data
+
+ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: E501
+ """test json serialization of form data # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.test_json_form_data_with_http_info(param, param2, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str param: field1 (required)
+ :param str param2: field2 (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['param', 'param2'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method test_json_form_data" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'param' is set
+ if ('param' not in local_var_params or
+ local_var_params['param'] is None):
+ raise ValueError("Missing the required parameter `param` when calling `test_json_form_data`") # noqa: E501
+ # verify the required parameter 'param2' is set
+ if ('param2' not in local_var_params or
+ local_var_params['param2'] is None):
+ raise ValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+ if 'param' in local_var_params:
+ form_params.append(('param', local_var_params['param'])) # noqa: E501
+ if 'param2' in local_var_params:
+ form_params.append(('param2', local_var_params['param2'])) # noqa: E501
+
+ body_params = None
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/x-www-form-urlencoded']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/fake/jsonFormData', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py
new file mode 100644
index 000000000000..80e03e6626ee
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py
@@ -0,0 +1,133 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import re # noqa: F401
+
+# python 2 and python 3 compatibility library
+import six
+
+from petstore_api.api_client import ApiClient
+
+
+class FakeClassnameTags123Api(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ 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_req=True
+ >>> thread = api.test_classname(client, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :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_req'):
+ return self.test_classname_with_http_info(client, **kwargs) # noqa: E501
+ else:
+ (data) = self.test_classname_with_http_info(client, **kwargs) # noqa: E501
+ return data
+
+ 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_req=True
+ >>> thread = api.test_classname_with_http_info(client, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param Client client: client model (required)
+ :return: Client
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['client'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method test_classname" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'client' is set
+ if ('client' not in local_var_params or
+ local_var_params['client'] is None):
+ raise ValueError("Missing the required parameter `client` when calling `test_classname`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'client' in local_var_params:
+ body_params = local_var_params['client']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # 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 = ['api_key_query'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/fake_classname_test', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='Client', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py
new file mode 100644
index 000000000000..cee0e90ab5c1
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py
@@ -0,0 +1,923 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import re # noqa: F401
+
+# python 2 and python 3 compatibility library
+import six
+
+from petstore_api.api_client import ApiClient
+
+
+class PetApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def add_pet(self, pet, **kwargs): # noqa: E501
+ """Add a new pet to the store # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.add_pet(pet, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :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_req'):
+ return self.add_pet_with_http_info(pet, **kwargs) # noqa: E501
+ else:
+ (data) = self.add_pet_with_http_info(pet, **kwargs) # noqa: E501
+ return data
+
+ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501
+ """Add a new pet to the store # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.add_pet_with_http_info(pet, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :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.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['pet'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method add_pet" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'pet' is set
+ if ('pet' not in local_var_params or
+ local_var_params['pet'] is None):
+ raise ValueError("Missing the required parameter `pet` when calling `add_pet`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'pet' in local_var_params:
+ body_params = local_var_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
+
+ # Authentication setting
+ auth_settings = ['petstore_auth'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/pet', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_pet(self, pet_id, **kwargs): # noqa: E501
+ """Deletes a pet # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_pet(pet_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int pet_id: Pet id to delete (required)
+ :param str api_key:
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501
+ return data
+
+ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501
+ """Deletes a pet # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_pet_with_http_info(pet_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int pet_id: Pet id to delete (required)
+ :param str api_key:
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['pet_id', 'api_key'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_pet" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'pet_id' is set
+ if ('pet_id' not in local_var_params or
+ local_var_params['pet_id'] is None):
+ raise ValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'pet_id' in local_var_params:
+ path_params['petId'] = local_var_params['pet_id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+ if 'api_key' in local_var_params:
+ header_params['api_key'] = local_var_params['api_key'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # Authentication setting
+ auth_settings = ['petstore_auth'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/pet/{petId}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def find_pets_by_status(self, status, **kwargs): # noqa: E501
+ """Finds Pets by status # noqa: E501
+
+ Multiple status values can be provided with comma separated strings # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.find_pets_by_status(status, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param list[str] status: Status values that need to be considered for filter (required)
+ :return: list[Pet]
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501
+ else:
+ (data) = self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501
+ return data
+
+ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501
+ """Finds Pets by status # noqa: E501
+
+ Multiple status values can be provided with comma separated strings # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.find_pets_by_status_with_http_info(status, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param list[str] status: Status values that need to be considered for filter (required)
+ :return: list[Pet]
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['status'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method find_pets_by_status" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'status' is set
+ if ('status' not in local_var_params or
+ local_var_params['status'] is None):
+ raise ValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'status' in local_var_params:
+ query_params.append(('status', local_var_params['status'])) # noqa: E501
+ collection_formats['status'] = 'csv' # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ 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
+
+ return self.api_client.call_api(
+ '/pet/findByStatus', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[Pet]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def find_pets_by_tags(self, tags, **kwargs): # noqa: E501
+ """Finds Pets by tags # noqa: E501
+
+ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.find_pets_by_tags(tags, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param list[str] tags: Tags to filter by (required)
+ :return: list[Pet]
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501
+ else:
+ (data) = self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501
+ return data
+
+ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501
+ """Finds Pets by tags # noqa: E501
+
+ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.find_pets_by_tags_with_http_info(tags, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param list[str] tags: Tags to filter by (required)
+ :return: list[Pet]
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['tags'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method find_pets_by_tags" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'tags' is set
+ if ('tags' not in local_var_params or
+ local_var_params['tags'] is None):
+ raise ValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'tags' in local_var_params:
+ query_params.append(('tags', local_var_params['tags'])) # noqa: E501
+ collection_formats['tags'] = 'csv' # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ 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
+
+ return self.api_client.call_api(
+ '/pet/findByTags', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='list[Pet]', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_pet_by_id(self, pet_id, **kwargs): # noqa: E501
+ """Find pet by ID # noqa: E501
+
+ Returns a single pet # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_pet_by_id(pet_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int pet_id: ID of pet to return (required)
+ :return: Pet
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501
+ return data
+
+ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501
+ """Find pet by ID # noqa: E501
+
+ Returns a single pet # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_pet_by_id_with_http_info(pet_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int pet_id: ID of pet to return (required)
+ :return: Pet
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['pet_id'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_pet_by_id" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'pet_id' is set
+ if ('pet_id' not in local_var_params or
+ local_var_params['pet_id'] is None):
+ raise ValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'pet_id' in local_var_params:
+ path_params['petId'] = local_var_params['pet_id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ 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 = ['api_key'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/pet/{petId}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='Pet', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def update_pet(self, pet, **kwargs): # noqa: E501
+ """Update an existing pet # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.update_pet(pet, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :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_req'):
+ return self.update_pet_with_http_info(pet, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_pet_with_http_info(pet, **kwargs) # noqa: E501
+ return data
+
+ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501
+ """Update an existing pet # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.update_pet_with_http_info(pet, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :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.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['pet'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_pet" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'pet' is set
+ if ('pet' not in local_var_params or
+ local_var_params['pet'] is None):
+ raise ValueError("Missing the required parameter `pet` when calling `update_pet`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'pet' in local_var_params:
+ body_params = local_var_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
+
+ # Authentication setting
+ auth_settings = ['petstore_auth'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/pet', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def update_pet_with_form(self, pet_id, **kwargs): # noqa: E501
+ """Updates a pet in the store with form data # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.update_pet_with_form(pet_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int pet_id: ID of pet that needs to be updated (required)
+ :param str name: Updated name of the pet
+ :param str status: Updated status of the pet
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501
+ return data
+
+ 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
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.update_pet_with_form_with_http_info(pet_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int pet_id: ID of pet that needs to be updated (required)
+ :param str name: Updated name of the pet
+ :param str status: Updated status of the pet
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['pet_id', 'name', 'status'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_pet_with_form" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'pet_id' is set
+ if ('pet_id' not in local_var_params or
+ local_var_params['pet_id'] is None):
+ raise ValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'pet_id' in local_var_params:
+ path_params['petId'] = local_var_params['pet_id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+ if 'name' in local_var_params:
+ form_params.append(('name', local_var_params['name'])) # noqa: E501
+ if 'status' in local_var_params:
+ form_params.append(('status', local_var_params['status'])) # noqa: E501
+
+ body_params = None
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/x-www-form-urlencoded']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['petstore_auth'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/pet/{petId}', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def upload_file(self, pet_id, **kwargs): # noqa: E501
+ """uploads an image # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.upload_file(pet_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int pet_id: ID of pet to update (required)
+ :param str additional_metadata: Additional data to pass to server
+ :param file file: file to upload
+ :return: ApiResponse
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501
+ return data
+
+ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501
+ """uploads an image # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.upload_file_with_http_info(pet_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int pet_id: ID of pet to update (required)
+ :param str additional_metadata: Additional data to pass to server
+ :param file file: file to upload
+ :return: ApiResponse
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['pet_id', 'additional_metadata', 'file'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method upload_file" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'pet_id' is set
+ if ('pet_id' not in local_var_params or
+ local_var_params['pet_id'] is None):
+ raise ValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'pet_id' in local_var_params:
+ path_params['petId'] = local_var_params['pet_id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+ if 'additional_metadata' in local_var_params:
+ form_params.append(('additionalMetadata', local_var_params['additional_metadata'])) # noqa: E501
+ if 'file' in local_var_params:
+ local_var_files['file'] = local_var_params['file'] # noqa: E501
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['multipart/form-data']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['petstore_auth'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/pet/{petId}/uploadImage', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='ApiResponse', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def upload_file_with_required_file(self, pet_id, required_file, **kwargs): # noqa: E501
+ """uploads an image (required) # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.upload_file_with_required_file(pet_id, required_file, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int pet_id: ID of pet to update (required)
+ :param file required_file: file to upload (required)
+ :param str additional_metadata: Additional data to pass to server
+ :return: ApiResponse
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501
+ else:
+ (data) = self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501
+ return data
+
+ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, **kwargs): # noqa: E501
+ """uploads an image (required) # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.upload_file_with_required_file_with_http_info(pet_id, required_file, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int pet_id: ID of pet to update (required)
+ :param file required_file: file to upload (required)
+ :param str additional_metadata: Additional data to pass to server
+ :return: ApiResponse
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['pet_id', 'required_file', 'additional_metadata'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method upload_file_with_required_file" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'pet_id' is set
+ if ('pet_id' not in local_var_params or
+ local_var_params['pet_id'] is None):
+ raise ValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501
+ # verify the required parameter 'required_file' is set
+ if ('required_file' not in local_var_params or
+ local_var_params['required_file'] is None):
+ raise ValueError("Missing the required parameter `required_file` when calling `upload_file_with_required_file`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'pet_id' in local_var_params:
+ path_params['petId'] = local_var_params['pet_id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+ if 'additional_metadata' in local_var_params:
+ form_params.append(('additionalMetadata', local_var_params['additional_metadata'])) # noqa: E501
+ if 'required_file' in local_var_params:
+ local_var_files['requiredFile'] = local_var_params['required_file'] # noqa: E501
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['multipart/form-data']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['petstore_auth'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/fake/{petId}/uploadImageWithRequiredFile', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='ApiResponse', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py
new file mode 100644
index 000000000000..5ef48fac2a78
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py
@@ -0,0 +1,411 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import re # noqa: F401
+
+# python 2 and python 3 compatibility library
+import six
+
+from petstore_api.api_client import ApiClient
+
+
+class StoreApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def delete_order(self, order_id, **kwargs): # noqa: E501
+ """Delete purchase order by ID # noqa: E501
+
+ For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_order(order_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str order_id: ID of the order that needs to be deleted (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501
+ return data
+
+ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501
+ """Delete purchase order by ID # noqa: E501
+
+ For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_order_with_http_info(order_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str order_id: ID of the order that needs to be deleted (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['order_id'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_order" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'order_id' is set
+ if ('order_id' not in local_var_params or
+ local_var_params['order_id'] is None):
+ raise ValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'order_id' in local_var_params:
+ path_params['order_id'] = local_var_params['order_id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/store/order/{order_id}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_inventory(self, **kwargs): # noqa: E501
+ """Returns pet inventories by status # noqa: E501
+
+ Returns a map of status codes to quantities # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_inventory(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :return: dict(str, int)
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.get_inventory_with_http_info(**kwargs) # noqa: E501
+ else:
+ (data) = self.get_inventory_with_http_info(**kwargs) # noqa: E501
+ return data
+
+ def get_inventory_with_http_info(self, **kwargs): # noqa: E501
+ """Returns pet inventories by status # noqa: E501
+
+ Returns a map of status codes to quantities # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_inventory_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :return: dict(str, int)
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_inventory" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['api_key'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/store/inventory', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='dict(str, int)', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_order_by_id(self, order_id, **kwargs): # noqa: E501
+ """Find purchase order by ID # noqa: E501
+
+ For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_order_by_id(order_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int order_id: ID of pet that needs to be fetched (required)
+ :return: Order
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501
+ return data
+
+ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501
+ """Find purchase order by ID # noqa: E501
+
+ For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_order_by_id_with_http_info(order_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int order_id: ID of pet that needs to be fetched (required)
+ :return: Order
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['order_id'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_order_by_id" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'order_id' is set
+ if ('order_id' not in local_var_params or
+ local_var_params['order_id'] is None):
+ raise ValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501
+
+ if 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501
+ raise ValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5`") # noqa: E501
+ if 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501
+ raise ValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1`") # noqa: E501
+ collection_formats = {}
+
+ path_params = {}
+ if 'order_id' in local_var_params:
+ path_params['order_id'] = local_var_params['order_id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ 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
+
+ return self.api_client.call_api(
+ '/store/order/{order_id}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='Order', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def place_order(self, order, **kwargs): # noqa: E501
+ """Place an order for a pet # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.place_order(order, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :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_req'):
+ return self.place_order_with_http_info(order, **kwargs) # noqa: E501
+ else:
+ (data) = self.place_order_with_http_info(order, **kwargs) # noqa: E501
+ return data
+
+ def place_order_with_http_info(self, order, **kwargs): # noqa: E501
+ """Place an order for a pet # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.place_order_with_http_info(order, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param Order order: order placed for purchasing the pet (required)
+ :return: Order
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['order'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method place_order" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'order' is set
+ if ('order' not in local_var_params or
+ local_var_params['order'] is None):
+ raise ValueError("Missing the required parameter `order` when calling `place_order`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'order' in local_var_params:
+ body_params = local_var_params['order']
+ # 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/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/store/order', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='Order', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py
new file mode 100644
index 000000000000..bb02a2a472cb
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py
@@ -0,0 +1,791 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import re # noqa: F401
+
+# python 2 and python 3 compatibility library
+import six
+
+from petstore_api.api_client import ApiClient
+
+
+class UserApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ 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_req=True
+ >>> thread = api.create_user(user, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :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_req'):
+ return self.create_user_with_http_info(user, **kwargs) # noqa: E501
+ else:
+ (data) = self.create_user_with_http_info(user, **kwargs) # noqa: E501
+ return data
+
+ 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_req=True
+ >>> thread = api.create_user_with_http_info(user, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param User user: Created user object (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['user'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_user" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'user' is set
+ if ('user' not in local_var_params or
+ local_var_params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `create_user`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'user' in local_var_params:
+ body_params = local_var_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(
+ '/user', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def create_users_with_array_input(self, user, **kwargs): # noqa: E501
+ """Creates list of users with given input array # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.create_users_with_array_input(user, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :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_req'):
+ 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(user, **kwargs) # noqa: E501
+ return data
+
+ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: E501
+ """Creates list of users with given input array # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.create_users_with_array_input_with_http_info(user, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param list[User] user: List of user object (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['user'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_users_with_array_input" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'user' is set
+ if ('user' not in local_var_params or
+ local_var_params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `create_users_with_array_input`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'user' in local_var_params:
+ body_params = local_var_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(
+ '/user/createWithArray', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def create_users_with_list_input(self, user, **kwargs): # noqa: E501
+ """Creates list of users with given input array # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.create_users_with_list_input(user, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :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_req'):
+ 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(user, **kwargs) # noqa: E501
+ return data
+
+ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: E501
+ """Creates list of users with given input array # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.create_users_with_list_input_with_http_info(user, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param list[User] user: List of user object (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['user'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_users_with_list_input" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'user' is set
+ if ('user' not in local_var_params or
+ local_var_params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `create_users_with_list_input`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'user' in local_var_params:
+ body_params = local_var_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(
+ '/user/createWithList', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_user(self, username, **kwargs): # noqa: E501
+ """Delete 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_req=True
+ >>> thread = api.delete_user(username, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str username: The name that needs to be deleted (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.delete_user_with_http_info(username, **kwargs) # noqa: E501
+ else:
+ (data) = self.delete_user_with_http_info(username, **kwargs) # noqa: E501
+ return data
+
+ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501
+ """Delete 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_req=True
+ >>> thread = api.delete_user_with_http_info(username, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str username: The name that needs to be deleted (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['username'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_user" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'username' is set
+ if ('username' not in local_var_params or
+ local_var_params['username'] is None):
+ raise ValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'username' in local_var_params:
+ path_params['username'] = local_var_params['username'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/user/{username}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_user_by_name(self, username, **kwargs): # noqa: E501
+ """Get user by user name # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_user_by_name(username, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str username: The name that needs to be fetched. Use user1 for testing. (required)
+ :return: User
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501
+ else:
+ (data) = self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501
+ return data
+
+ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501
+ """Get user by user name # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_user_by_name_with_http_info(username, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str username: The name that needs to be fetched. Use user1 for testing. (required)
+ :return: User
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['username'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_user_by_name" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'username' is set
+ if ('username' not in local_var_params or
+ local_var_params['username'] is None):
+ raise ValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'username' in local_var_params:
+ path_params['username'] = local_var_params['username'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ 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
+
+ return self.api_client.call_api(
+ '/user/{username}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='User', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def login_user(self, username, password, **kwargs): # noqa: E501
+ """Logs user into the system # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.login_user(username, password, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str username: The user name for login (required)
+ :param str password: The password for login in clear text (required)
+ :return: str
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501
+ else:
+ (data) = self.login_user_with_http_info(username, password, **kwargs) # noqa: E501
+ return data
+
+ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501
+ """Logs user into the system # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.login_user_with_http_info(username, password, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str username: The user name for login (required)
+ :param str password: The password for login in clear text (required)
+ :return: str
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['username', 'password'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method login_user" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'username' is set
+ if ('username' not in local_var_params or
+ local_var_params['username'] is None):
+ raise ValueError("Missing the required parameter `username` when calling `login_user`") # noqa: E501
+ # verify the required parameter 'password' is set
+ if ('password' not in local_var_params or
+ local_var_params['password'] is None):
+ raise ValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'username' in local_var_params:
+ query_params.append(('username', local_var_params['username'])) # noqa: E501
+ if 'password' in local_var_params:
+ query_params.append(('password', local_var_params['password'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ 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
+
+ return self.api_client.call_api(
+ '/user/login', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='str', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def logout_user(self, **kwargs): # noqa: E501
+ """Logs out current logged in user session # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.logout_user(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.logout_user_with_http_info(**kwargs) # noqa: E501
+ else:
+ (data) = self.logout_user_with_http_info(**kwargs) # noqa: E501
+ return data
+
+ def logout_user_with_http_info(self, **kwargs): # noqa: E501
+ """Logs out current logged in user session # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.logout_user_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method logout_user" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/user/logout', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ 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_req=True
+ >>> thread = api.update_user(username, user, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str username: name that need to be deleted (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_req'):
+ return self.update_user_with_http_info(username, user, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_user_with_http_info(username, user, **kwargs) # noqa: E501
+ return data
+
+ 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_req=True
+ >>> thread = api.update_user_with_http_info(username, user, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str username: name that need to be deleted (required)
+ :param User user: Updated user object (required)
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = ['username', 'user'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_user" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'username' is set
+ if ('username' not in local_var_params or
+ local_var_params['username'] is None):
+ raise ValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501
+ # verify the required parameter 'user' is set
+ if ('user' not in local_var_params or
+ local_var_params['user'] is None):
+ raise ValueError("Missing the required parameter `user` when calling `update_user`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'username' in local_var_params:
+ path_params['username'] = local_var_params['username'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'user' in local_var_params:
+ body_params = local_var_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(
+ '/user/{username}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None, # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py
new file mode 100644
index 000000000000..a79d7ccf7425
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py
@@ -0,0 +1,634 @@
+# coding: utf-8
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+from __future__ import absolute_import
+
+import datetime
+import json
+import mimetypes
+from multiprocessing.pool import ThreadPool
+import os
+import re
+import tempfile
+
+# python 2 and python 3 compatibility library
+import six
+from six.moves.urllib.parse import quote
+
+from petstore_api.configuration import Configuration
+import petstore_api.models
+from petstore_api import rest
+
+
+class ApiClient(object):
+ """Generic API client for OpenAPI client library builds.
+
+ OpenAPI generic API client. This client handles the client-
+ server communication, and is invariant across implementations. Specifics of
+ the methods and models for each application are generated from the OpenAPI
+ templates.
+
+ NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+ Do not edit the class manually.
+
+ :param configuration: .Configuration object for this client
+ :param header_name: a header to pass when making calls to the API.
+ :param header_value: a header value to pass when making calls to
+ the API.
+ :param cookie: a cookie to include in the header when making calls
+ to the API
+ :param pool_threads: The number of threads to use for async requests
+ to the API. More threads means more concurrent API requests.
+ """
+
+ PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
+ NATIVE_TYPES_MAPPING = {
+ 'int': int,
+ 'long': int if six.PY3 else long, # noqa: F821
+ 'float': float,
+ 'str': str,
+ 'bool': bool,
+ 'date': datetime.date,
+ 'datetime': datetime.datetime,
+ 'object': object,
+ }
+ _pool = None
+
+ def __init__(self, configuration=None, header_name=None, header_value=None,
+ cookie=None, pool_threads=1):
+ if configuration is None:
+ configuration = Configuration()
+ self.configuration = configuration
+ self.pool_threads = pool_threads
+
+ self.rest_client = rest.RESTClientObject(configuration)
+ self.default_headers = {}
+ if header_name is not None:
+ self.default_headers[header_name] = header_value
+ self.cookie = cookie
+ # Set default User-Agent.
+ self.user_agent = 'OpenAPI-Generator/1.0.0/python'
+
+ def __del__(self):
+ if self._pool:
+ self._pool.close()
+ self._pool.join()
+ self._pool = None
+
+ @property
+ def pool(self):
+ """Create thread pool on first request
+ avoids instantiating unused threadpool for blocking clients.
+ """
+ if self._pool is None:
+ self._pool = ThreadPool(self.pool_threads)
+ return self._pool
+
+ @property
+ def user_agent(self):
+ """User agent for this API client"""
+ return self.default_headers['User-Agent']
+
+ @user_agent.setter
+ def user_agent(self, value):
+ self.default_headers['User-Agent'] = value
+
+ def set_default_header(self, header_name, header_value):
+ self.default_headers[header_name] = header_value
+
+ def __call_api(
+ self, resource_path, method, path_params=None,
+ query_params=None, header_params=None, body=None, post_params=None,
+ files=None, response_type=None, auth_settings=None,
+ _return_http_data_only=None, collection_formats=None,
+ _preload_content=True, _request_timeout=None):
+
+ config = self.configuration
+
+ # header parameters
+ header_params = header_params or {}
+ header_params.update(self.default_headers)
+ if self.cookie:
+ header_params['Cookie'] = self.cookie
+ if header_params:
+ header_params = self.sanitize_for_serialization(header_params)
+ header_params = dict(self.parameters_to_tuples(header_params,
+ collection_formats))
+
+ # path parameters
+ if path_params:
+ path_params = self.sanitize_for_serialization(path_params)
+ path_params = self.parameters_to_tuples(path_params,
+ collection_formats)
+ for k, v in path_params:
+ # specified safe chars, encode everything
+ resource_path = resource_path.replace(
+ '{%s}' % k,
+ quote(str(v), safe=config.safe_chars_for_path_param)
+ )
+
+ # query parameters
+ if query_params:
+ query_params = self.sanitize_for_serialization(query_params)
+ query_params = self.parameters_to_tuples(query_params,
+ collection_formats)
+
+ # post parameters
+ if post_params or files:
+ post_params = self.prepare_post_parameters(post_params, files)
+ post_params = self.sanitize_for_serialization(post_params)
+ post_params = self.parameters_to_tuples(post_params,
+ collection_formats)
+
+ # auth setting
+ self.update_params_for_auth(header_params, query_params, auth_settings)
+
+ # body
+ if body:
+ body = self.sanitize_for_serialization(body)
+
+ # request url
+ url = self.configuration.host + resource_path
+
+ # perform request and return response
+ response_data = self.request(
+ method, url, query_params=query_params, headers=header_params,
+ post_params=post_params, body=body,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout)
+
+ self.last_response = response_data
+
+ return_data = response_data
+ if _preload_content:
+ # deserialize response data
+ if response_type:
+ return_data = self.deserialize(response_data, response_type)
+ else:
+ return_data = None
+
+ if _return_http_data_only:
+ return (return_data)
+ else:
+ return (return_data, response_data.status,
+ response_data.getheaders())
+
+ def sanitize_for_serialization(self, obj):
+ """Builds a JSON POST object.
+
+ If obj is None, return None.
+ If obj is str, int, long, float, bool, return directly.
+ If obj is datetime.datetime, datetime.date
+ convert to string in iso8601 format.
+ If obj is list, sanitize each element in the list.
+ If obj is dict, return the dict.
+ If obj is OpenAPI model, return the properties dict.
+
+ :param obj: The data to serialize.
+ :return: The serialized form of data.
+ """
+ if obj is None:
+ return None
+ elif isinstance(obj, self.PRIMITIVE_TYPES):
+ return obj
+ elif isinstance(obj, list):
+ return [self.sanitize_for_serialization(sub_obj)
+ for sub_obj in obj]
+ elif isinstance(obj, tuple):
+ return tuple(self.sanitize_for_serialization(sub_obj)
+ for sub_obj in obj)
+ elif isinstance(obj, (datetime.datetime, datetime.date)):
+ return obj.isoformat()
+
+ if isinstance(obj, dict):
+ obj_dict = obj
+ else:
+ # Convert model obj to dict except
+ # attributes `openapi_types`, `attribute_map`
+ # and attributes which value is not None.
+ # Convert attribute name to json key in
+ # model definition for request.
+ obj_dict = {obj.attribute_map[attr]: getattr(obj, attr)
+ for attr, _ in six.iteritems(obj.openapi_types)
+ if getattr(obj, attr) is not None}
+
+ return {key: self.sanitize_for_serialization(val)
+ for key, val in six.iteritems(obj_dict)}
+
+ def deserialize(self, response, response_type):
+ """Deserializes response into an object.
+
+ :param response: RESTResponse object to be deserialized.
+ :param response_type: class literal for
+ deserialized object, or string of class name.
+
+ :return: deserialized object.
+ """
+ # handle file downloading
+ # save response body into a tmp file and return the instance
+ if response_type == "file":
+ return self.__deserialize_file(response)
+
+ # fetch data from response object
+ try:
+ data = json.loads(response.data)
+ except ValueError:
+ data = response.data
+
+ return self.__deserialize(data, response_type)
+
+ def __deserialize(self, data, klass):
+ """Deserializes dict, list, str into an object.
+
+ :param data: dict, list or str.
+ :param klass: class literal, or string of class name.
+
+ :return: object.
+ """
+ if data is None:
+ return None
+
+ if type(klass) == str:
+ if klass.startswith('list['):
+ sub_kls = re.match(r'list\[(.*)\]', klass).group(1)
+ return [self.__deserialize(sub_data, sub_kls)
+ for sub_data in data]
+
+ if klass.startswith('dict('):
+ sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2)
+ return {k: self.__deserialize(v, sub_kls)
+ for k, v in six.iteritems(data)}
+
+ # convert str to class
+ if klass in self.NATIVE_TYPES_MAPPING:
+ klass = self.NATIVE_TYPES_MAPPING[klass]
+ else:
+ klass = getattr(petstore_api.models, klass)
+
+ if klass in self.PRIMITIVE_TYPES:
+ return self.__deserialize_primitive(data, klass)
+ elif klass == object:
+ return self.__deserialize_object(data)
+ elif klass == datetime.date:
+ return self.__deserialize_date(data)
+ elif klass == datetime.datetime:
+ return self.__deserialize_datatime(data)
+ else:
+ return self.__deserialize_model(data, klass)
+
+ def call_api(self, resource_path, method,
+ path_params=None, query_params=None, header_params=None,
+ body=None, post_params=None, files=None,
+ response_type=None, auth_settings=None, async_req=None,
+ _return_http_data_only=None, collection_formats=None,
+ _preload_content=True, _request_timeout=None):
+ """Makes the HTTP request (synchronous) and returns deserialized data.
+
+ To make an async_req request, set the async_req parameter.
+
+ :param resource_path: Path to method endpoint.
+ :param method: Method to call.
+ :param path_params: Path parameters in the url.
+ :param query_params: Query parameters in the url.
+ :param header_params: Header parameters to be
+ placed in the request header.
+ :param body: Request body.
+ :param post_params dict: Request post form parameters,
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
+ :param auth_settings list: Auth Settings names for the request.
+ :param response: Response data type.
+ :param files dict: key -> filename, value -> filepath,
+ for `multipart/form-data`.
+ :param async_req bool: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param collection_formats: dict of collection formats for path, query,
+ header, and post parameters.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return:
+ If async_req parameter is True,
+ the request will be called asynchronously.
+ The method will return the request thread.
+ If parameter async_req is False or missing,
+ then the method will return the response directly.
+ """
+ if not async_req:
+ return self.__call_api(resource_path, method,
+ path_params, query_params, header_params,
+ body, post_params, files,
+ response_type, auth_settings,
+ _return_http_data_only, collection_formats,
+ _preload_content, _request_timeout)
+ else:
+ thread = self.pool.apply_async(self.__call_api, (resource_path,
+ method, path_params, query_params,
+ header_params, body,
+ post_params, files,
+ response_type, auth_settings,
+ _return_http_data_only,
+ collection_formats,
+ _preload_content, _request_timeout))
+ return thread
+
+ def request(self, method, url, query_params=None, headers=None,
+ post_params=None, body=None, _preload_content=True,
+ _request_timeout=None):
+ """Makes the HTTP request using RESTClient."""
+ if method == "GET":
+ return self.rest_client.GET(url,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ headers=headers)
+ elif method == "HEAD":
+ return self.rest_client.HEAD(url,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ headers=headers)
+ elif method == "OPTIONS":
+ return self.rest_client.OPTIONS(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "POST":
+ return self.rest_client.POST(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "PUT":
+ return self.rest_client.PUT(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "PATCH":
+ return self.rest_client.PATCH(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "DELETE":
+ return self.rest_client.DELETE(url,
+ query_params=query_params,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ else:
+ raise ValueError(
+ "http method must be `GET`, `HEAD`, `OPTIONS`,"
+ " `POST`, `PATCH`, `PUT` or `DELETE`."
+ )
+
+ def parameters_to_tuples(self, params, collection_formats):
+ """Get parameters as list of tuples, formatting collections.
+
+ :param params: Parameters as dict or list of two-tuples
+ :param dict collection_formats: Parameter collection formats
+ :return: Parameters as list of tuples, collections formatted
+ """
+ new_params = []
+ if collection_formats is None:
+ collection_formats = {}
+ for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501
+ if k in collection_formats:
+ collection_format = collection_formats[k]
+ if collection_format == 'multi':
+ new_params.extend((k, value) for value in v)
+ else:
+ if collection_format == 'ssv':
+ delimiter = ' '
+ elif collection_format == 'tsv':
+ delimiter = '\t'
+ elif collection_format == 'pipes':
+ delimiter = '|'
+ else: # csv is the default
+ delimiter = ','
+ new_params.append(
+ (k, delimiter.join(str(value) for value in v)))
+ else:
+ new_params.append((k, v))
+ return new_params
+
+ def prepare_post_parameters(self, post_params=None, files=None):
+ """Builds form parameters.
+
+ :param post_params: Normal form parameters.
+ :param files: File parameters.
+ :return: Form parameters with files.
+ """
+ params = []
+
+ if post_params:
+ params = post_params
+
+ if files:
+ for k, v in six.iteritems(files):
+ if not v:
+ continue
+ file_names = v if type(v) is list else [v]
+ for n in file_names:
+ with open(n, 'rb') as f:
+ filename = os.path.basename(f.name)
+ filedata = f.read()
+ mimetype = (mimetypes.guess_type(filename)[0] or
+ 'application/octet-stream')
+ params.append(
+ tuple([k, tuple([filename, filedata, mimetype])]))
+
+ return params
+
+ def select_header_accept(self, accepts):
+ """Returns `Accept` based on an array of accepts provided.
+
+ :param accepts: List of headers.
+ :return: Accept (e.g. application/json).
+ """
+ if not accepts:
+ return
+
+ accepts = [x.lower() for x in accepts]
+
+ if 'application/json' in accepts:
+ return 'application/json'
+ else:
+ return ', '.join(accepts)
+
+ def select_header_content_type(self, content_types):
+ """Returns `Content-Type` based on an array of content_types provided.
+
+ :param content_types: List of content-types.
+ :return: Content-Type (e.g. application/json).
+ """
+ if not content_types:
+ return 'application/json'
+
+ content_types = [x.lower() for x in content_types]
+
+ if 'application/json' in content_types or '*/*' in content_types:
+ return 'application/json'
+ else:
+ return content_types[0]
+
+ def update_params_for_auth(self, headers, querys, auth_settings):
+ """Updates header and query params based on authentication setting.
+
+ :param headers: Header parameters dict to be updated.
+ :param querys: Query parameters tuple list to be updated.
+ :param auth_settings: Authentication setting identifiers list.
+ """
+ if not auth_settings:
+ return
+
+ for auth in auth_settings:
+ auth_setting = self.configuration.auth_settings().get(auth)
+ if auth_setting:
+ if not auth_setting['value']:
+ continue
+ elif auth_setting['in'] == 'header':
+ headers[auth_setting['key']] = auth_setting['value']
+ elif auth_setting['in'] == 'query':
+ querys.append((auth_setting['key'], auth_setting['value']))
+ else:
+ raise ValueError(
+ 'Authentication token must be in `query` or `header`'
+ )
+
+ def __deserialize_file(self, response):
+ """Deserializes body to file
+
+ Saves response body into a file in a temporary folder,
+ using the filename from the `Content-Disposition` header if provided.
+
+ :param response: RESTResponse.
+ :return: file path.
+ """
+ fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)
+ os.close(fd)
+ os.remove(path)
+
+ content_disposition = response.getheader("Content-Disposition")
+ if content_disposition:
+ filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?',
+ content_disposition).group(1)
+ path = os.path.join(os.path.dirname(path), filename)
+
+ with open(path, "wb") as f:
+ f.write(response.data)
+
+ return path
+
+ def __deserialize_primitive(self, data, klass):
+ """Deserializes string to primitive type.
+
+ :param data: str.
+ :param klass: class literal.
+
+ :return: int, long, float, str, bool.
+ """
+ try:
+ return klass(data)
+ except UnicodeEncodeError:
+ return six.text_type(data)
+ except TypeError:
+ return data
+
+ def __deserialize_object(self, value):
+ """Return an original value.
+
+ :return: object.
+ """
+ return value
+
+ def __deserialize_date(self, string):
+ """Deserializes string to date.
+
+ :param string: str.
+ :return: date.
+ """
+ try:
+ from dateutil.parser import parse
+ return parse(string).date()
+ except ImportError:
+ return string
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason="Failed to parse `{0}` as date object".format(string)
+ )
+
+ def __deserialize_datatime(self, string):
+ """Deserializes string to datetime.
+
+ The string should be in iso8601 datetime format.
+
+ :param string: str.
+ :return: datetime.
+ """
+ try:
+ from dateutil.parser import parse
+ return parse(string)
+ except ImportError:
+ return string
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason=(
+ "Failed to parse `{0}` as datetime object"
+ .format(string)
+ )
+ )
+
+ def __deserialize_model(self, data, klass):
+ """Deserializes list or dict to model.
+
+ :param data: dict, list.
+ :param klass: class literal.
+ :return: model object.
+ """
+
+ if not klass.openapi_types and not hasattr(klass,
+ 'get_real_child_model'):
+ return data
+
+ kwargs = {}
+ if klass.openapi_types is not None:
+ for attr, attr_type in six.iteritems(klass.openapi_types):
+ if (data is not None and
+ klass.attribute_map[attr] in data and
+ isinstance(data, (list, dict))):
+ value = data[klass.attribute_map[attr]]
+ kwargs[attr] = self.__deserialize(value, attr_type)
+
+ instance = klass(**kwargs)
+
+ if hasattr(instance, 'get_real_child_model'):
+ klass_name = instance.get_real_child_model(data)
+ if klass_name:
+ instance = self.__deserialize(data, klass_name)
+ return instance
diff --git a/samples/openapi3/client/petstore/python/petstore_api/configuration.py b/samples/openapi3/client/petstore/python/petstore_api/configuration.py
new file mode 100644
index 000000000000..dee2fbabeddb
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/configuration.py
@@ -0,0 +1,344 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import copy
+import logging
+import multiprocessing
+import sys
+import urllib3
+
+import six
+from six.moves import http_client as httplib
+
+
+class TypeWithDefault(type):
+ def __init__(cls, name, bases, dct):
+ super(TypeWithDefault, cls).__init__(name, bases, dct)
+ cls._default = None
+
+ def __call__(cls):
+ if cls._default is None:
+ cls._default = type.__call__(cls)
+ return copy.copy(cls._default)
+
+ def set_default(cls, default):
+ cls._default = copy.copy(default)
+
+
+class Configuration(six.with_metaclass(TypeWithDefault, object)):
+ """NOTE: This class is auto generated by OpenAPI Generator
+
+ Ref: https://openapi-generator.tech
+ Do not edit the class manually.
+ """
+
+ def __init__(self):
+ """Constructor"""
+ # Default Base url
+ self.host = "http://petstore.swagger.io:80/v2"
+ # Temp file folder for downloading files
+ self.temp_folder_path = None
+
+ # Authentication Settings
+ # dict to store API key(s)
+ self.api_key = {}
+ # dict to store API prefix (e.g. Bearer)
+ self.api_key_prefix = {}
+ # Username for HTTP basic authentication
+ self.username = ""
+ # Password for HTTP basic authentication
+ self.password = ""
+
+ # access token for OAuth
+ self.access_token = ""
+
+ # Logging Settings
+ self.logger = {}
+ self.logger["package_logger"] = logging.getLogger("petstore_api")
+ self.logger["urllib3_logger"] = logging.getLogger("urllib3")
+ # Log format
+ self.logger_format = '%(asctime)s %(levelname)s %(message)s'
+ # Log stream handler
+ self.logger_stream_handler = None
+ # Log file handler
+ self.logger_file_handler = None
+ # Debug file location
+ self.logger_file = None
+ # Debug switch
+ self.debug = False
+
+ # SSL/TLS verification
+ # Set this to false to skip verifying SSL certificate when calling API
+ # from https server.
+ self.verify_ssl = True
+ # Set this to customize the certificate file to verify the peer.
+ self.ssl_ca_cert = None
+ # client certificate file
+ self.cert_file = None
+ # client key file
+ self.key_file = None
+ # Set this to True/False to enable/disable SSL hostname verification.
+ self.assert_hostname = None
+
+ # urllib3 connection pool's maximum number of connections saved
+ # per pool. urllib3 uses 1 connection as default value, but this is
+ # not the best value when you are making a lot of possibly parallel
+ # requests to the same host, which is often the case here.
+ # cpu_count * 5 is used as default value to increase performance.
+ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
+
+ # Proxy URL
+ self.proxy = None
+ # Safe chars for path_param
+ self.safe_chars_for_path_param = ''
+
+ @property
+ def logger_file(self):
+ """The logger file.
+
+ If the logger_file is None, then add stream handler and remove file
+ handler. Otherwise, add file handler and remove stream handler.
+
+ :param value: The logger_file path.
+ :type: str
+ """
+ return self.__logger_file
+
+ @logger_file.setter
+ def logger_file(self, value):
+ """The logger file.
+
+ If the logger_file is None, then add stream handler and remove file
+ handler. Otherwise, add file handler and remove stream handler.
+
+ :param value: The logger_file path.
+ :type: str
+ """
+ self.__logger_file = value
+ if self.__logger_file:
+ # If set logging file,
+ # then add file handler and remove stream handler.
+ self.logger_file_handler = logging.FileHandler(self.__logger_file)
+ self.logger_file_handler.setFormatter(self.logger_formatter)
+ for _, logger in six.iteritems(self.logger):
+ logger.addHandler(self.logger_file_handler)
+
+ @property
+ def debug(self):
+ """Debug status
+
+ :param value: The debug status, True or False.
+ :type: bool
+ """
+ return self.__debug
+
+ @debug.setter
+ def debug(self, value):
+ """Debug status
+
+ :param value: The debug status, True or False.
+ :type: bool
+ """
+ self.__debug = value
+ if self.__debug:
+ # if debug status is True, turn on debug logging
+ for _, logger in six.iteritems(self.logger):
+ logger.setLevel(logging.DEBUG)
+ # turn on httplib debug
+ httplib.HTTPConnection.debuglevel = 1
+ else:
+ # if debug status is False, turn off debug logging,
+ # setting log level to default `logging.WARNING`
+ for _, logger in six.iteritems(self.logger):
+ logger.setLevel(logging.WARNING)
+ # turn off httplib debug
+ httplib.HTTPConnection.debuglevel = 0
+
+ @property
+ def logger_format(self):
+ """The logger format.
+
+ The logger_formatter will be updated when sets logger_format.
+
+ :param value: The format string.
+ :type: str
+ """
+ return self.__logger_format
+
+ @logger_format.setter
+ def logger_format(self, value):
+ """The logger format.
+
+ The logger_formatter will be updated when sets logger_format.
+
+ :param value: The format string.
+ :type: str
+ """
+ self.__logger_format = value
+ self.logger_formatter = logging.Formatter(self.__logger_format)
+
+ def get_api_key_with_prefix(self, identifier):
+ """Gets API key (with prefix if set).
+
+ :param identifier: The identifier of apiKey.
+ :return: The token for api key authentication.
+ """
+ if (self.api_key.get(identifier) and
+ self.api_key_prefix.get(identifier)):
+ return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501
+ elif self.api_key.get(identifier):
+ return self.api_key[identifier]
+
+ def get_basic_auth_token(self):
+ """Gets HTTP basic authentication header (string).
+
+ :return: The token for basic HTTP authentication.
+ """
+ return urllib3.util.make_headers(
+ basic_auth=self.username + ':' + self.password
+ ).get('authorization')
+
+ def auth_settings(self):
+ """Gets Auth Settings dict for api client.
+
+ :return: The Auth Settings information dict.
+ """
+ return {
+ 'api_key':
+ {
+ 'type': 'api_key',
+ 'in': 'header',
+ 'key': 'api_key',
+ 'value': self.get_api_key_with_prefix('api_key')
+ },
+ 'api_key_query':
+ {
+ 'type': 'api_key',
+ 'in': 'query',
+ 'key': 'api_key_query',
+ 'value': self.get_api_key_with_prefix('api_key_query')
+ },
+ 'http_basic_test':
+ {
+ 'type': 'basic',
+ 'in': 'header',
+ 'key': 'Authorization',
+ 'value': self.get_basic_auth_token()
+ },
+
+ 'petstore_auth':
+ {
+ 'type': 'oauth2',
+ 'in': 'header',
+ 'key': 'Authorization',
+ 'value': 'Bearer ' + self.access_token
+ },
+
+ }
+
+ def to_debug_report(self):
+ """Gets the essential information for debugging.
+
+ :return: The report for debugging.
+ """
+ return "Python SDK Debug Report:\n"\
+ "OS: {env}\n"\
+ "Python Version: {pyversion}\n"\
+ "Version of the API: 1.0.0\n"\
+ "SDK Package Version: 1.0.0".\
+ format(env=sys.platform, pyversion=sys.version)
+
+ def get_host_settings(self):
+ """Gets an array of host settings
+
+ :return: An array of host settings
+ """
+ return [
+ {
+ 'url': "http://{server}.swagger.io:{port}/v2",
+ 'description': "petstore server",
+ 'variables': {
+ 'server': {
+ 'description': "No description provided",
+ 'default_value': "petstore",
+ 'enum_values': [
+ "petstore",
+ "qa-petstore",
+ "dev-petstore"
+ ]
+ },
+ 'port': {
+ 'description': "No description provided",
+ 'default_value': "80",
+ 'enum_values': [
+ "80",
+ "8080"
+ ]
+ }
+ }
+ },
+ {
+ 'url': "https://localhost:8080/{version}",
+ 'description': "The local server",
+ 'variables': {
+ 'version': {
+ 'description': "No description provided",
+ 'default_value': "v2",
+ 'enum_values': [
+ "v1",
+ "v2"
+ ]
+ }
+ }
+ }
+ ]
+
+ def get_host_from_settings(self, index, variables={}):
+ """Gets host URL based on the index and variables
+ :param index: array index of the host settings
+ :param variables: hash of variable and the corresponding value
+ :return: URL based on host settings
+ """
+
+ servers = self.get_host_settings()
+
+ # check array index out of bound
+ if index < 0 or index >= len(servers):
+ raise ValueError(
+ "Invalid index {} when selecting the host settings. Must be less than {}" # noqa: E501
+ .format(index, len(servers)))
+
+ server = servers[index]
+ url = server['url']
+
+ # go through variable and assign a value
+ for variable_name in server['variables']:
+ if variable_name in variables:
+ if variables[variable_name] in server['variables'][
+ variable_name]['enum_values']:
+ url = url.replace("{" + variable_name + "}",
+ variables[variable_name])
+ else:
+ raise ValueError(
+ "The variable `{}` in the host URL has invalid value {}. Must be {}." # noqa: E501
+ .format(
+ variable_name, variables[variable_name],
+ server['variables'][variable_name]['enum_values']))
+ else:
+ # use default value
+ url = url.replace(
+ "{" + variable_name + "}",
+ server['variables'][variable_name]['default_value'])
+
+ return url
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py
new file mode 100644
index 000000000000..7850d84c1ae1
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py
@@ -0,0 +1,58 @@
+# coding: utf-8
+
+# flake8: noqa
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+# import models into model package
+from petstore_api.models.additional_properties_class import AdditionalPropertiesClass
+from petstore_api.models.animal import Animal
+from petstore_api.models.api_response import ApiResponse
+from petstore_api.models.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly
+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
+from petstore_api.models.file import File
+from petstore_api.models.file_schema_test_class import FileSchemaTestClass
+from petstore_api.models.foo import Foo
+from petstore_api.models.format_test import FormatTest
+from petstore_api.models.has_only_read_only import HasOnlyReadOnly
+from petstore_api.models.inline_object import InlineObject
+from petstore_api.models.inline_object1 import InlineObject1
+from petstore_api.models.inline_object2 import InlineObject2
+from petstore_api.models.inline_object3 import InlineObject3
+from petstore_api.models.inline_object4 import InlineObject4
+from petstore_api.models.inline_object5 import InlineObject5
+from petstore_api.models.inline_response_default import InlineResponseDefault
+from petstore_api.models.list import List
+from petstore_api.models.map_test import MapTest
+from petstore_api.models.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass
+from petstore_api.models.model200_response import Model200Response
+from petstore_api.models.model_return import ModelReturn
+from petstore_api.models.name import Name
+from petstore_api.models.number_only import NumberOnly
+from petstore_api.models.order import Order
+from petstore_api.models.outer_composite import OuterComposite
+from petstore_api.models.outer_enum import OuterEnum
+from petstore_api.models.pet import Pet
+from petstore_api.models.read_only_first import ReadOnlyFirst
+from petstore_api.models.special_model_name import SpecialModelName
+from petstore_api.models.tag import Tag
+from petstore_api.models.user import User
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py
new file mode 100644
index 000000000000..dc4648ae1c7f
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py
@@ -0,0 +1,138 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class AdditionalPropertiesClass(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'map_property': 'dict(str, str)',
+ 'map_of_map_property': 'dict(str, dict(str, str))'
+ }
+
+ attribute_map = {
+ 'map_property': 'map_property',
+ 'map_of_map_property': 'map_of_map_property'
+ }
+
+ def __init__(self, map_property=None, map_of_map_property=None): # noqa: E501
+ """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501
+
+ self._map_property = None
+ self._map_of_map_property = None
+ self.discriminator = None
+
+ if map_property is not None:
+ self.map_property = map_property
+ if map_of_map_property is not None:
+ self.map_of_map_property = map_of_map_property
+
+ @property
+ def map_property(self):
+ """Gets the map_property of this AdditionalPropertiesClass. # noqa: E501
+
+
+ :return: The map_property of this AdditionalPropertiesClass. # noqa: E501
+ :rtype: dict(str, str)
+ """
+ return self._map_property
+
+ @map_property.setter
+ def map_property(self, map_property):
+ """Sets the map_property of this AdditionalPropertiesClass.
+
+
+ :param map_property: The map_property of this AdditionalPropertiesClass. # noqa: E501
+ :type: dict(str, str)
+ """
+
+ self._map_property = map_property
+
+ @property
+ def map_of_map_property(self):
+ """Gets the map_of_map_property of this AdditionalPropertiesClass. # noqa: E501
+
+
+ :return: The map_of_map_property of this AdditionalPropertiesClass. # noqa: E501
+ :rtype: dict(str, dict(str, str))
+ """
+ return self._map_of_map_property
+
+ @map_of_map_property.setter
+ def map_of_map_property(self, map_of_map_property):
+ """Sets the map_of_map_property of this AdditionalPropertiesClass.
+
+
+ :param map_of_map_property: The map_of_map_property of this AdditionalPropertiesClass. # noqa: E501
+ :type: dict(str, dict(str, str))
+ """
+
+ self._map_of_map_property = map_of_map_property
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, AdditionalPropertiesClass):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/animal.py b/samples/openapi3/client/petstore/python/petstore_api/models/animal.py
new file mode 100644
index 000000000000..abd6f705e5e8
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/animal.py
@@ -0,0 +1,150 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Animal(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'class_name': 'str',
+ 'color': 'str'
+ }
+
+ attribute_map = {
+ 'class_name': 'className',
+ 'color': 'color'
+ }
+
+ discriminator_value_class_map = {
+ 'Dog': 'Dog',
+ 'Cat': 'Cat'
+ }
+
+ def __init__(self, class_name=None, color='red'): # noqa: E501
+ """Animal - a model defined in OpenAPI""" # noqa: E501
+
+ self._class_name = None
+ self._color = None
+ self.discriminator = 'class_name'
+
+ self.class_name = class_name
+ if color is not None:
+ self.color = color
+
+ @property
+ def class_name(self):
+ """Gets the class_name of this Animal. # noqa: E501
+
+
+ :return: The class_name of this Animal. # noqa: E501
+ :rtype: str
+ """
+ return self._class_name
+
+ @class_name.setter
+ def class_name(self, class_name):
+ """Sets the class_name of this Animal.
+
+
+ :param class_name: The class_name of this Animal. # noqa: E501
+ :type: str
+ """
+ if class_name is None:
+ raise ValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501
+
+ self._class_name = class_name
+
+ @property
+ def color(self):
+ """Gets the color of this Animal. # noqa: E501
+
+
+ :return: The color of this Animal. # noqa: E501
+ :rtype: str
+ """
+ return self._color
+
+ @color.setter
+ def color(self, color):
+ """Sets the color of this Animal.
+
+
+ :param color: The color of this Animal. # noqa: E501
+ :type: str
+ """
+
+ self._color = color
+
+ def get_real_child_model(self, data):
+ """Returns the real base class specified by the discriminator"""
+ discriminator_key = self.attribute_map[self.discriminator]
+ discriminator_value = data[discriminator_key]
+ return self.discriminator_value_class_map.get(discriminator_value)
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Animal):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py b/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py
new file mode 100644
index 000000000000..e62983030491
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py
@@ -0,0 +1,164 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ApiResponse(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'code': 'int',
+ 'type': 'str',
+ 'message': 'str'
+ }
+
+ attribute_map = {
+ 'code': 'code',
+ 'type': 'type',
+ 'message': 'message'
+ }
+
+ def __init__(self, code=None, type=None, message=None): # noqa: E501
+ """ApiResponse - a model defined in OpenAPI""" # noqa: E501
+
+ self._code = None
+ self._type = None
+ self._message = None
+ self.discriminator = None
+
+ if code is not None:
+ self.code = code
+ if type is not None:
+ self.type = type
+ if message is not None:
+ self.message = message
+
+ @property
+ def code(self):
+ """Gets the code of this ApiResponse. # noqa: E501
+
+
+ :return: The code of this ApiResponse. # noqa: E501
+ :rtype: int
+ """
+ return self._code
+
+ @code.setter
+ def code(self, code):
+ """Sets the code of this ApiResponse.
+
+
+ :param code: The code of this ApiResponse. # noqa: E501
+ :type: int
+ """
+
+ self._code = code
+
+ @property
+ def type(self):
+ """Gets the type of this ApiResponse. # noqa: E501
+
+
+ :return: The type of this ApiResponse. # noqa: E501
+ :rtype: str
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this ApiResponse.
+
+
+ :param type: The type of this ApiResponse. # noqa: E501
+ :type: str
+ """
+
+ self._type = type
+
+ @property
+ def message(self):
+ """Gets the message of this ApiResponse. # noqa: E501
+
+
+ :return: The message of this ApiResponse. # noqa: E501
+ :rtype: str
+ """
+ return self._message
+
+ @message.setter
+ def message(self, message):
+ """Sets the message of this ApiResponse.
+
+
+ :param message: The message of this ApiResponse. # noqa: E501
+ :type: str
+ """
+
+ self._message = message
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ApiResponse):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py
new file mode 100644
index 000000000000..fde218a4661c
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ArrayOfArrayOfNumberOnly(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'array_array_number': 'list[list[float]]'
+ }
+
+ attribute_map = {
+ 'array_array_number': 'ArrayArrayNumber'
+ }
+
+ def __init__(self, array_array_number=None): # noqa: E501
+ """ArrayOfArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501
+
+ self._array_array_number = None
+ self.discriminator = None
+
+ if array_array_number is not None:
+ self.array_array_number = array_array_number
+
+ @property
+ def array_array_number(self):
+ """Gets the array_array_number of this ArrayOfArrayOfNumberOnly. # noqa: E501
+
+
+ :return: The array_array_number of this ArrayOfArrayOfNumberOnly. # noqa: E501
+ :rtype: list[list[float]]
+ """
+ return self._array_array_number
+
+ @array_array_number.setter
+ def array_array_number(self, array_array_number):
+ """Sets the array_array_number of this ArrayOfArrayOfNumberOnly.
+
+
+ :param array_array_number: The array_array_number of this ArrayOfArrayOfNumberOnly. # noqa: E501
+ :type: list[list[float]]
+ """
+
+ self._array_array_number = array_array_number
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ArrayOfArrayOfNumberOnly):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py
new file mode 100644
index 000000000000..8999e563c4a6
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ArrayOfNumberOnly(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'array_number': 'list[float]'
+ }
+
+ attribute_map = {
+ 'array_number': 'ArrayNumber'
+ }
+
+ def __init__(self, array_number=None): # noqa: E501
+ """ArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501
+
+ self._array_number = None
+ self.discriminator = None
+
+ if array_number is not None:
+ self.array_number = array_number
+
+ @property
+ def array_number(self):
+ """Gets the array_number of this ArrayOfNumberOnly. # noqa: E501
+
+
+ :return: The array_number of this ArrayOfNumberOnly. # noqa: E501
+ :rtype: list[float]
+ """
+ return self._array_number
+
+ @array_number.setter
+ def array_number(self, array_number):
+ """Sets the array_number of this ArrayOfNumberOnly.
+
+
+ :param array_number: The array_number of this ArrayOfNumberOnly. # noqa: E501
+ :type: list[float]
+ """
+
+ self._array_number = array_number
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ArrayOfNumberOnly):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py
new file mode 100644
index 000000000000..05cc108139a5
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py
@@ -0,0 +1,164 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ArrayTest(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'array_of_string': 'list[str]',
+ 'array_array_of_integer': 'list[list[int]]',
+ 'array_array_of_model': 'list[list[ReadOnlyFirst]]'
+ }
+
+ attribute_map = {
+ 'array_of_string': 'array_of_string',
+ 'array_array_of_integer': 'array_array_of_integer',
+ 'array_array_of_model': 'array_array_of_model'
+ }
+
+ def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None): # noqa: E501
+ """ArrayTest - a model defined in OpenAPI""" # noqa: E501
+
+ self._array_of_string = None
+ self._array_array_of_integer = None
+ self._array_array_of_model = None
+ self.discriminator = None
+
+ if array_of_string is not None:
+ self.array_of_string = array_of_string
+ if array_array_of_integer is not None:
+ self.array_array_of_integer = array_array_of_integer
+ if array_array_of_model is not None:
+ self.array_array_of_model = array_array_of_model
+
+ @property
+ def array_of_string(self):
+ """Gets the array_of_string of this ArrayTest. # noqa: E501
+
+
+ :return: The array_of_string of this ArrayTest. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._array_of_string
+
+ @array_of_string.setter
+ def array_of_string(self, array_of_string):
+ """Sets the array_of_string of this ArrayTest.
+
+
+ :param array_of_string: The array_of_string of this ArrayTest. # noqa: E501
+ :type: list[str]
+ """
+
+ self._array_of_string = array_of_string
+
+ @property
+ def array_array_of_integer(self):
+ """Gets the array_array_of_integer of this ArrayTest. # noqa: E501
+
+
+ :return: The array_array_of_integer of this ArrayTest. # noqa: E501
+ :rtype: list[list[int]]
+ """
+ return self._array_array_of_integer
+
+ @array_array_of_integer.setter
+ def array_array_of_integer(self, array_array_of_integer):
+ """Sets the array_array_of_integer of this ArrayTest.
+
+
+ :param array_array_of_integer: The array_array_of_integer of this ArrayTest. # noqa: E501
+ :type: list[list[int]]
+ """
+
+ self._array_array_of_integer = array_array_of_integer
+
+ @property
+ def array_array_of_model(self):
+ """Gets the array_array_of_model of this ArrayTest. # noqa: E501
+
+
+ :return: The array_array_of_model of this ArrayTest. # noqa: E501
+ :rtype: list[list[ReadOnlyFirst]]
+ """
+ return self._array_array_of_model
+
+ @array_array_of_model.setter
+ def array_array_of_model(self, array_array_of_model):
+ """Sets the array_array_of_model of this ArrayTest.
+
+
+ :param array_array_of_model: The array_array_of_model of this ArrayTest. # noqa: E501
+ :type: list[list[ReadOnlyFirst]]
+ """
+
+ self._array_array_of_model = array_array_of_model
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ArrayTest):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py b/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py
new file mode 100644
index 000000000000..923f5c4aae86
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py
@@ -0,0 +1,244 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Capitalization(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'small_camel': 'str',
+ 'capital_camel': 'str',
+ 'small_snake': 'str',
+ 'capital_snake': 'str',
+ 'sca_eth_flow_points': 'str',
+ 'att_name': 'str'
+ }
+
+ attribute_map = {
+ 'small_camel': 'smallCamel',
+ 'capital_camel': 'CapitalCamel',
+ 'small_snake': 'small_Snake',
+ 'capital_snake': 'Capital_Snake',
+ 'sca_eth_flow_points': 'SCA_ETH_Flow_Points',
+ 'att_name': 'ATT_NAME'
+ }
+
+ def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None): # noqa: E501
+ """Capitalization - a model defined in OpenAPI""" # noqa: E501
+
+ self._small_camel = None
+ self._capital_camel = None
+ self._small_snake = None
+ self._capital_snake = None
+ self._sca_eth_flow_points = None
+ self._att_name = None
+ self.discriminator = None
+
+ if small_camel is not None:
+ self.small_camel = small_camel
+ if capital_camel is not None:
+ self.capital_camel = capital_camel
+ if small_snake is not None:
+ self.small_snake = small_snake
+ if capital_snake is not None:
+ self.capital_snake = capital_snake
+ if sca_eth_flow_points is not None:
+ self.sca_eth_flow_points = sca_eth_flow_points
+ if att_name is not None:
+ self.att_name = att_name
+
+ @property
+ def small_camel(self):
+ """Gets the small_camel of this Capitalization. # noqa: E501
+
+
+ :return: The small_camel of this Capitalization. # noqa: E501
+ :rtype: str
+ """
+ return self._small_camel
+
+ @small_camel.setter
+ def small_camel(self, small_camel):
+ """Sets the small_camel of this Capitalization.
+
+
+ :param small_camel: The small_camel of this Capitalization. # noqa: E501
+ :type: str
+ """
+
+ self._small_camel = small_camel
+
+ @property
+ def capital_camel(self):
+ """Gets the capital_camel of this Capitalization. # noqa: E501
+
+
+ :return: The capital_camel of this Capitalization. # noqa: E501
+ :rtype: str
+ """
+ return self._capital_camel
+
+ @capital_camel.setter
+ def capital_camel(self, capital_camel):
+ """Sets the capital_camel of this Capitalization.
+
+
+ :param capital_camel: The capital_camel of this Capitalization. # noqa: E501
+ :type: str
+ """
+
+ self._capital_camel = capital_camel
+
+ @property
+ def small_snake(self):
+ """Gets the small_snake of this Capitalization. # noqa: E501
+
+
+ :return: The small_snake of this Capitalization. # noqa: E501
+ :rtype: str
+ """
+ return self._small_snake
+
+ @small_snake.setter
+ def small_snake(self, small_snake):
+ """Sets the small_snake of this Capitalization.
+
+
+ :param small_snake: The small_snake of this Capitalization. # noqa: E501
+ :type: str
+ """
+
+ self._small_snake = small_snake
+
+ @property
+ def capital_snake(self):
+ """Gets the capital_snake of this Capitalization. # noqa: E501
+
+
+ :return: The capital_snake of this Capitalization. # noqa: E501
+ :rtype: str
+ """
+ return self._capital_snake
+
+ @capital_snake.setter
+ def capital_snake(self, capital_snake):
+ """Sets the capital_snake of this Capitalization.
+
+
+ :param capital_snake: The capital_snake of this Capitalization. # noqa: E501
+ :type: str
+ """
+
+ self._capital_snake = capital_snake
+
+ @property
+ def sca_eth_flow_points(self):
+ """Gets the sca_eth_flow_points of this Capitalization. # noqa: E501
+
+
+ :return: The sca_eth_flow_points of this Capitalization. # noqa: E501
+ :rtype: str
+ """
+ return self._sca_eth_flow_points
+
+ @sca_eth_flow_points.setter
+ def sca_eth_flow_points(self, sca_eth_flow_points):
+ """Sets the sca_eth_flow_points of this Capitalization.
+
+
+ :param sca_eth_flow_points: The sca_eth_flow_points of this Capitalization. # noqa: E501
+ :type: str
+ """
+
+ self._sca_eth_flow_points = sca_eth_flow_points
+
+ @property
+ def att_name(self):
+ """Gets the att_name of this Capitalization. # noqa: E501
+
+ Name of the pet # noqa: E501
+
+ :return: The att_name of this Capitalization. # noqa: E501
+ :rtype: str
+ """
+ return self._att_name
+
+ @att_name.setter
+ def att_name(self, att_name):
+ """Sets the att_name of this Capitalization.
+
+ Name of the pet # noqa: E501
+
+ :param att_name: The att_name of this Capitalization. # noqa: E501
+ :type: str
+ """
+
+ self._att_name = att_name
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Capitalization):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/cat.py b/samples/openapi3/client/petstore/python/petstore_api/models/cat.py
new file mode 100644
index 000000000000..c5c87a6b1118
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/cat.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Cat(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'declawed': 'bool'
+ }
+
+ attribute_map = {
+ 'declawed': 'declawed'
+ }
+
+ def __init__(self, declawed=None): # noqa: E501
+ """Cat - a model defined in OpenAPI""" # noqa: E501
+
+ self._declawed = None
+ self.discriminator = None
+
+ if declawed is not None:
+ self.declawed = declawed
+
+ @property
+ def declawed(self):
+ """Gets the declawed of this Cat. # noqa: E501
+
+
+ :return: The declawed of this Cat. # noqa: E501
+ :rtype: bool
+ """
+ return self._declawed
+
+ @declawed.setter
+ def declawed(self, declawed):
+ """Sets the declawed of this Cat.
+
+
+ :param declawed: The declawed of this Cat. # noqa: E501
+ :type: bool
+ """
+
+ self._declawed = declawed
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Cat):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/category.py b/samples/openapi3/client/petstore/python/petstore_api/models/category.py
new file mode 100644
index 000000000000..5b2f79eaec8d
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/category.py
@@ -0,0 +1,139 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Category(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'int',
+ 'name': 'str'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'name': 'name'
+ }
+
+ def __init__(self, id=None, name='default-name'): # noqa: E501
+ """Category - a model defined in OpenAPI""" # noqa: E501
+
+ self._id = None
+ self._name = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ self.name = name
+
+ @property
+ def id(self):
+ """Gets the id of this Category. # noqa: E501
+
+
+ :return: The id of this Category. # noqa: E501
+ :rtype: int
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this Category.
+
+
+ :param id: The id of this Category. # noqa: E501
+ :type: int
+ """
+
+ self._id = id
+
+ @property
+ def name(self):
+ """Gets the name of this Category. # noqa: E501
+
+
+ :return: The name of this Category. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this Category.
+
+
+ :param name: The name of this Category. # noqa: E501
+ :type: str
+ """
+ if name is None:
+ raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
+
+ self._name = name
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Category):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py
new file mode 100644
index 000000000000..e207ba41ec92
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ClassModel(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ '_class': 'str'
+ }
+
+ attribute_map = {
+ '_class': '_class'
+ }
+
+ def __init__(self, _class=None): # noqa: E501
+ """ClassModel - a model defined in OpenAPI""" # noqa: E501
+
+ self.__class = None
+ self.discriminator = None
+
+ if _class is not None:
+ self._class = _class
+
+ @property
+ def _class(self):
+ """Gets the _class of this ClassModel. # noqa: E501
+
+
+ :return: The _class of this ClassModel. # noqa: E501
+ :rtype: str
+ """
+ return self.__class
+
+ @_class.setter
+ def _class(self, _class):
+ """Sets the _class of this ClassModel.
+
+
+ :param _class: The _class of this ClassModel. # noqa: E501
+ :type: str
+ """
+
+ self.__class = _class
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ClassModel):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/client.py b/samples/openapi3/client/petstore/python/petstore_api/models/client.py
new file mode 100644
index 000000000000..e742468e7763
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/client.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Client(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'client': 'str'
+ }
+
+ attribute_map = {
+ 'client': 'client'
+ }
+
+ def __init__(self, client=None): # noqa: E501
+ """Client - a model defined in OpenAPI""" # noqa: E501
+
+ self._client = None
+ self.discriminator = None
+
+ if client is not None:
+ self.client = client
+
+ @property
+ def client(self):
+ """Gets the client of this Client. # noqa: E501
+
+
+ :return: The client of this Client. # noqa: E501
+ :rtype: str
+ """
+ return self._client
+
+ @client.setter
+ def client(self, client):
+ """Sets the client of this Client.
+
+
+ :param client: The client of this Client. # noqa: E501
+ :type: str
+ """
+
+ self._client = client
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Client):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/dog.py b/samples/openapi3/client/petstore/python/petstore_api/models/dog.py
new file mode 100644
index 000000000000..c2bc8f745d15
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/dog.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Dog(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'breed': 'str'
+ }
+
+ attribute_map = {
+ 'breed': 'breed'
+ }
+
+ def __init__(self, breed=None): # noqa: E501
+ """Dog - a model defined in OpenAPI""" # noqa: E501
+
+ self._breed = None
+ self.discriminator = None
+
+ if breed is not None:
+ self.breed = breed
+
+ @property
+ def breed(self):
+ """Gets the breed of this Dog. # noqa: E501
+
+
+ :return: The breed of this Dog. # noqa: E501
+ :rtype: str
+ """
+ return self._breed
+
+ @breed.setter
+ def breed(self, breed):
+ """Sets the breed of this Dog.
+
+
+ :param breed: The breed of this Dog. # noqa: E501
+ :type: str
+ """
+
+ self._breed = breed
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Dog):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py
new file mode 100644
index 000000000000..df4363c356c3
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class EnumArrays(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'just_symbol': 'str',
+ 'array_enum': 'list[str]'
+ }
+
+ attribute_map = {
+ 'just_symbol': 'just_symbol',
+ 'array_enum': 'array_enum'
+ }
+
+ def __init__(self, just_symbol=None, array_enum=None): # noqa: E501
+ """EnumArrays - a model defined in OpenAPI""" # noqa: E501
+
+ self._just_symbol = None
+ self._array_enum = None
+ self.discriminator = None
+
+ if just_symbol is not None:
+ self.just_symbol = just_symbol
+ if array_enum is not None:
+ self.array_enum = array_enum
+
+ @property
+ def just_symbol(self):
+ """Gets the just_symbol of this EnumArrays. # noqa: E501
+
+
+ :return: The just_symbol of this EnumArrays. # noqa: E501
+ :rtype: str
+ """
+ return self._just_symbol
+
+ @just_symbol.setter
+ def just_symbol(self, just_symbol):
+ """Sets the just_symbol of this EnumArrays.
+
+
+ :param just_symbol: The just_symbol of this EnumArrays. # noqa: E501
+ :type: str
+ """
+ allowed_values = [">=", "$"] # noqa: E501
+ if just_symbol not in allowed_values:
+ raise ValueError(
+ "Invalid value for `just_symbol` ({0}), must be one of {1}" # noqa: E501
+ .format(just_symbol, allowed_values)
+ )
+
+ self._just_symbol = just_symbol
+
+ @property
+ def array_enum(self):
+ """Gets the array_enum of this EnumArrays. # noqa: E501
+
+
+ :return: The array_enum of this EnumArrays. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._array_enum
+
+ @array_enum.setter
+ def array_enum(self, array_enum):
+ """Sets the array_enum of this EnumArrays.
+
+
+ :param array_enum: The array_enum of this EnumArrays. # noqa: E501
+ :type: list[str]
+ """
+ allowed_values = ["fish", "crab"] # noqa: E501
+ if not set(array_enum).issubset(set(allowed_values)):
+ raise ValueError(
+ "Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501
+ .format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501
+ ", ".join(map(str, allowed_values)))
+ )
+
+ self._array_enum = array_enum
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, EnumArrays):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_class.py
new file mode 100644
index 000000000000..182197d8aa6e
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_class.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class EnumClass(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ allowed enum values
+ """
+ _ABC = "_abc"
+ _EFG = "-efg"
+ _XYZ_ = "(xyz)"
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ }
+
+ attribute_map = {
+ }
+
+ def __init__(self): # noqa: E501
+ """EnumClass - a model defined in OpenAPI""" # noqa: E501
+ self.discriminator = None
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, EnumClass):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py
new file mode 100644
index 000000000000..0fd60c4a351d
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py
@@ -0,0 +1,241 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class EnumTest(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'enum_string': 'str',
+ 'enum_string_required': 'str',
+ 'enum_integer': 'int',
+ 'enum_number': 'float',
+ 'outer_enum': 'OuterEnum'
+ }
+
+ 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_string_required=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501
+ """EnumTest - a model defined in OpenAPI""" # noqa: E501
+
+ self._enum_string = None
+ self._enum_string_required = None
+ self._enum_integer = None
+ self._enum_number = None
+ self._outer_enum = None
+ self.discriminator = None
+
+ 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:
+ self.enum_number = enum_number
+ if outer_enum is not None:
+ self.outer_enum = outer_enum
+
+ @property
+ def enum_string(self):
+ """Gets the enum_string of this EnumTest. # noqa: E501
+
+
+ :return: The enum_string of this EnumTest. # noqa: E501
+ :rtype: str
+ """
+ return self._enum_string
+
+ @enum_string.setter
+ def enum_string(self, enum_string):
+ """Sets the enum_string of this EnumTest.
+
+
+ :param enum_string: The enum_string of this EnumTest. # noqa: E501
+ :type: str
+ """
+ allowed_values = ["UPPER", "lower", ""] # noqa: E501
+ if enum_string not in allowed_values:
+ raise ValueError(
+ "Invalid value for `enum_string` ({0}), must be one of {1}" # noqa: E501
+ .format(enum_string, allowed_values)
+ )
+
+ 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
+
+
+ :return: The enum_integer of this EnumTest. # noqa: E501
+ :rtype: int
+ """
+ return self._enum_integer
+
+ @enum_integer.setter
+ def enum_integer(self, enum_integer):
+ """Sets the enum_integer of this EnumTest.
+
+
+ :param enum_integer: The enum_integer of this EnumTest. # noqa: E501
+ :type: int
+ """
+ allowed_values = [1, -1] # noqa: E501
+ if enum_integer not in allowed_values:
+ raise ValueError(
+ "Invalid value for `enum_integer` ({0}), must be one of {1}" # noqa: E501
+ .format(enum_integer, allowed_values)
+ )
+
+ self._enum_integer = enum_integer
+
+ @property
+ def enum_number(self):
+ """Gets the enum_number of this EnumTest. # noqa: E501
+
+
+ :return: The enum_number of this EnumTest. # noqa: E501
+ :rtype: float
+ """
+ return self._enum_number
+
+ @enum_number.setter
+ def enum_number(self, enum_number):
+ """Sets the enum_number of this EnumTest.
+
+
+ :param enum_number: The enum_number of this EnumTest. # noqa: E501
+ :type: float
+ """
+ allowed_values = [1.1, -1.2] # noqa: E501
+ if enum_number not in allowed_values:
+ raise ValueError(
+ "Invalid value for `enum_number` ({0}), must be one of {1}" # noqa: E501
+ .format(enum_number, allowed_values)
+ )
+
+ self._enum_number = enum_number
+
+ @property
+ def outer_enum(self):
+ """Gets the outer_enum of this EnumTest. # noqa: E501
+
+
+ :return: The outer_enum of this EnumTest. # noqa: E501
+ :rtype: OuterEnum
+ """
+ return self._outer_enum
+
+ @outer_enum.setter
+ def outer_enum(self, outer_enum):
+ """Sets the outer_enum of this EnumTest.
+
+
+ :param outer_enum: The outer_enum of this EnumTest. # noqa: E501
+ :type: OuterEnum
+ """
+
+ self._outer_enum = outer_enum
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, EnumTest):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/file.py b/samples/openapi3/client/petstore/python/petstore_api/models/file.py
new file mode 100644
index 000000000000..34d77c3b4cf8
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/file.py
@@ -0,0 +1,114 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class File(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'source_uri': 'str'
+ }
+
+ attribute_map = {
+ 'source_uri': 'sourceURI'
+ }
+
+ def __init__(self, source_uri=None): # noqa: E501
+ """File - a model defined in OpenAPI""" # noqa: E501
+
+ self._source_uri = None
+ self.discriminator = None
+
+ if source_uri is not None:
+ self.source_uri = source_uri
+
+ @property
+ def source_uri(self):
+ """Gets the source_uri of this File. # noqa: E501
+
+ Test capitalization # noqa: E501
+
+ :return: The source_uri of this File. # noqa: E501
+ :rtype: str
+ """
+ return self._source_uri
+
+ @source_uri.setter
+ def source_uri(self, source_uri):
+ """Sets the source_uri of this File.
+
+ Test capitalization # noqa: E501
+
+ :param source_uri: The source_uri of this File. # noqa: E501
+ :type: str
+ """
+
+ self._source_uri = source_uri
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, File):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py
new file mode 100644
index 000000000000..026822dee749
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py
@@ -0,0 +1,138 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class FileSchemaTestClass(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'file': 'File',
+ 'files': 'list[File]'
+ }
+
+ attribute_map = {
+ 'file': 'file',
+ 'files': 'files'
+ }
+
+ def __init__(self, file=None, files=None): # noqa: E501
+ """FileSchemaTestClass - a model defined in OpenAPI""" # noqa: E501
+
+ self._file = None
+ self._files = None
+ self.discriminator = None
+
+ if file is not None:
+ self.file = file
+ if files is not None:
+ self.files = files
+
+ @property
+ def file(self):
+ """Gets the file of this FileSchemaTestClass. # noqa: E501
+
+
+ :return: The file of this FileSchemaTestClass. # noqa: E501
+ :rtype: File
+ """
+ return self._file
+
+ @file.setter
+ def file(self, file):
+ """Sets the file of this FileSchemaTestClass.
+
+
+ :param file: The file of this FileSchemaTestClass. # noqa: E501
+ :type: File
+ """
+
+ self._file = file
+
+ @property
+ def files(self):
+ """Gets the files of this FileSchemaTestClass. # noqa: E501
+
+
+ :return: The files of this FileSchemaTestClass. # noqa: E501
+ :rtype: list[File]
+ """
+ return self._files
+
+ @files.setter
+ def files(self, files):
+ """Sets the files of this FileSchemaTestClass.
+
+
+ :param files: The files of this FileSchemaTestClass. # noqa: E501
+ :type: list[File]
+ """
+
+ self._files = files
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, FileSchemaTestClass):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/foo.py b/samples/openapi3/client/petstore/python/petstore_api/models/foo.py
new file mode 100644
index 000000000000..a34065b6cc2a
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/foo.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Foo(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'bar': 'str'
+ }
+
+ attribute_map = {
+ 'bar': 'bar'
+ }
+
+ def __init__(self, bar='bar'): # noqa: E501
+ """Foo - a model defined in OpenAPI""" # noqa: E501
+
+ self._bar = None
+ self.discriminator = None
+
+ if bar is not None:
+ self.bar = bar
+
+ @property
+ def bar(self):
+ """Gets the bar of this Foo. # noqa: E501
+
+
+ :return: The bar of this Foo. # noqa: E501
+ :rtype: str
+ """
+ return self._bar
+
+ @bar.setter
+ def bar(self, bar):
+ """Sets the bar of this Foo.
+
+
+ :param bar: The bar of this Foo. # noqa: E501
+ :type: str
+ """
+
+ self._bar = bar
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Foo):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py
new file mode 100644
index 000000000000..5e3eb721f124
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py
@@ -0,0 +1,514 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class FormatTest(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'integer': 'int',
+ 'int32': 'int',
+ 'int64': 'int',
+ 'number': 'float',
+ 'float': 'float',
+ 'double': 'float',
+ 'string': 'str',
+ 'byte': 'str',
+ 'binary': 'file',
+ 'date': 'date',
+ 'date_time': 'datetime',
+ 'uuid': 'str',
+ 'password': 'str',
+ 'pattern_with_digits': 'str',
+ 'pattern_with_digits_and_delimiter': 'str'
+ }
+
+ attribute_map = {
+ 'integer': 'integer',
+ 'int32': 'int32',
+ 'int64': 'int64',
+ 'number': 'number',
+ 'float': 'float',
+ 'double': 'double',
+ 'string': 'string',
+ 'byte': 'byte',
+ 'binary': 'binary',
+ 'date': 'date',
+ 'date_time': 'dateTime',
+ 'uuid': 'uuid',
+ 'password': 'password',
+ 'pattern_with_digits': 'pattern_with_digits',
+ 'pattern_with_digits_and_delimiter': 'pattern_with_digits_and_delimiter'
+ }
+
+ def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, pattern_with_digits=None, pattern_with_digits_and_delimiter=None): # noqa: E501
+ """FormatTest - a model defined in OpenAPI""" # noqa: E501
+
+ self._integer = None
+ self._int32 = None
+ self._int64 = None
+ self._number = None
+ self._float = None
+ self._double = None
+ self._string = None
+ self._byte = None
+ self._binary = None
+ self._date = None
+ self._date_time = None
+ self._uuid = None
+ self._password = None
+ self._pattern_with_digits = None
+ self._pattern_with_digits_and_delimiter = None
+ self.discriminator = None
+
+ if integer is not None:
+ self.integer = integer
+ if int32 is not None:
+ self.int32 = int32
+ if int64 is not None:
+ self.int64 = int64
+ self.number = number
+ if float is not None:
+ self.float = float
+ if double is not None:
+ self.double = double
+ if string is not None:
+ self.string = string
+ self.byte = byte
+ if binary is not None:
+ self.binary = binary
+ self.date = date
+ if date_time is not None:
+ self.date_time = date_time
+ if uuid is not None:
+ self.uuid = uuid
+ self.password = password
+ if pattern_with_digits is not None:
+ self.pattern_with_digits = pattern_with_digits
+ if pattern_with_digits_and_delimiter is not None:
+ self.pattern_with_digits_and_delimiter = pattern_with_digits_and_delimiter
+
+ @property
+ def integer(self):
+ """Gets the integer of this FormatTest. # noqa: E501
+
+
+ :return: The integer of this FormatTest. # noqa: E501
+ :rtype: int
+ """
+ return self._integer
+
+ @integer.setter
+ def integer(self, integer):
+ """Sets the integer of this FormatTest.
+
+
+ :param integer: The integer of this FormatTest. # noqa: E501
+ :type: int
+ """
+ if integer is not None and integer > 100: # noqa: E501
+ raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100`") # noqa: E501
+ if integer is not None and integer < 10: # noqa: E501
+ raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10`") # noqa: E501
+
+ self._integer = integer
+
+ @property
+ def int32(self):
+ """Gets the int32 of this FormatTest. # noqa: E501
+
+
+ :return: The int32 of this FormatTest. # noqa: E501
+ :rtype: int
+ """
+ return self._int32
+
+ @int32.setter
+ def int32(self, int32):
+ """Sets the int32 of this FormatTest.
+
+
+ :param int32: The int32 of this FormatTest. # noqa: E501
+ :type: int
+ """
+ if int32 is not None and int32 > 200: # noqa: E501
+ raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200`") # noqa: E501
+ if int32 is not None and int32 < 20: # noqa: E501
+ raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20`") # noqa: E501
+
+ self._int32 = int32
+
+ @property
+ def int64(self):
+ """Gets the int64 of this FormatTest. # noqa: E501
+
+
+ :return: The int64 of this FormatTest. # noqa: E501
+ :rtype: int
+ """
+ return self._int64
+
+ @int64.setter
+ def int64(self, int64):
+ """Sets the int64 of this FormatTest.
+
+
+ :param int64: The int64 of this FormatTest. # noqa: E501
+ :type: int
+ """
+
+ self._int64 = int64
+
+ @property
+ def number(self):
+ """Gets the number of this FormatTest. # noqa: E501
+
+
+ :return: The number of this FormatTest. # noqa: E501
+ :rtype: float
+ """
+ return self._number
+
+ @number.setter
+ def number(self, number):
+ """Sets the number of this FormatTest.
+
+
+ :param number: The number of this FormatTest. # noqa: E501
+ :type: float
+ """
+ if number is None:
+ raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501
+ if number is not None and number > 543.2: # noqa: E501
+ raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") # noqa: E501
+ if number is not None and number < 32.1: # noqa: E501
+ raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") # noqa: E501
+
+ self._number = number
+
+ @property
+ def float(self):
+ """Gets the float of this FormatTest. # noqa: E501
+
+
+ :return: The float of this FormatTest. # noqa: E501
+ :rtype: float
+ """
+ return self._float
+
+ @float.setter
+ def float(self, float):
+ """Sets the float of this FormatTest.
+
+
+ :param float: The float of this FormatTest. # noqa: E501
+ :type: float
+ """
+ if float is not None and float > 987.6: # noqa: E501
+ raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501
+ if float is not None and float < 54.3: # noqa: E501
+ raise ValueError("Invalid value for `float`, must be a value greater than or equal to `54.3`") # noqa: E501
+
+ self._float = float
+
+ @property
+ def double(self):
+ """Gets the double of this FormatTest. # noqa: E501
+
+
+ :return: The double of this FormatTest. # noqa: E501
+ :rtype: float
+ """
+ return self._double
+
+ @double.setter
+ def double(self, double):
+ """Sets the double of this FormatTest.
+
+
+ :param double: The double of this FormatTest. # noqa: E501
+ :type: float
+ """
+ if double is not None and double > 123.4: # noqa: E501
+ raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") # noqa: E501
+ if double is not None and double < 67.8: # noqa: E501
+ raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") # noqa: E501
+
+ self._double = double
+
+ @property
+ def string(self):
+ """Gets the string of this FormatTest. # noqa: E501
+
+
+ :return: The string of this FormatTest. # noqa: E501
+ :rtype: str
+ """
+ return self._string
+
+ @string.setter
+ def string(self, string):
+ """Sets the string of this FormatTest.
+
+
+ :param string: The string of this FormatTest. # noqa: E501
+ :type: str
+ """
+ if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501
+ raise ValueError(r"Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501
+
+ self._string = string
+
+ @property
+ def byte(self):
+ """Gets the byte of this FormatTest. # noqa: E501
+
+
+ :return: The byte of this FormatTest. # noqa: E501
+ :rtype: str
+ """
+ return self._byte
+
+ @byte.setter
+ def byte(self, byte):
+ """Sets the byte of this FormatTest.
+
+
+ :param byte: The byte of this FormatTest. # noqa: E501
+ :type: str
+ """
+ if byte is None:
+ raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501
+
+ self._byte = byte
+
+ @property
+ def binary(self):
+ """Gets the binary of this FormatTest. # noqa: E501
+
+
+ :return: The binary of this FormatTest. # noqa: E501
+ :rtype: file
+ """
+ return self._binary
+
+ @binary.setter
+ def binary(self, binary):
+ """Sets the binary of this FormatTest.
+
+
+ :param binary: The binary of this FormatTest. # noqa: E501
+ :type: file
+ """
+
+ self._binary = binary
+
+ @property
+ def date(self):
+ """Gets the date of this FormatTest. # noqa: E501
+
+
+ :return: The date of this FormatTest. # noqa: E501
+ :rtype: date
+ """
+ return self._date
+
+ @date.setter
+ def date(self, date):
+ """Sets the date of this FormatTest.
+
+
+ :param date: The date of this FormatTest. # noqa: E501
+ :type: date
+ """
+ if date is None:
+ raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501
+
+ self._date = date
+
+ @property
+ def date_time(self):
+ """Gets the date_time of this FormatTest. # noqa: E501
+
+
+ :return: The date_time of this FormatTest. # noqa: E501
+ :rtype: datetime
+ """
+ return self._date_time
+
+ @date_time.setter
+ def date_time(self, date_time):
+ """Sets the date_time of this FormatTest.
+
+
+ :param date_time: The date_time of this FormatTest. # noqa: E501
+ :type: datetime
+ """
+
+ self._date_time = date_time
+
+ @property
+ def uuid(self):
+ """Gets the uuid of this FormatTest. # noqa: E501
+
+
+ :return: The uuid of this FormatTest. # noqa: E501
+ :rtype: str
+ """
+ return self._uuid
+
+ @uuid.setter
+ def uuid(self, uuid):
+ """Sets the uuid of this FormatTest.
+
+
+ :param uuid: The uuid of this FormatTest. # noqa: E501
+ :type: str
+ """
+
+ self._uuid = uuid
+
+ @property
+ def password(self):
+ """Gets the password of this FormatTest. # noqa: E501
+
+
+ :return: The password of this FormatTest. # noqa: E501
+ :rtype: str
+ """
+ return self._password
+
+ @password.setter
+ def password(self, password):
+ """Sets the password of this FormatTest.
+
+
+ :param password: The password of this FormatTest. # noqa: E501
+ :type: str
+ """
+ if password is None:
+ raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501
+ if password is not None and len(password) > 64:
+ raise ValueError("Invalid value for `password`, length must be less than or equal to `64`") # noqa: E501
+ if password is not None and len(password) < 10:
+ raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") # noqa: E501
+
+ self._password = password
+
+ @property
+ def pattern_with_digits(self):
+ """Gets the pattern_with_digits of this FormatTest. # noqa: E501
+
+ A string that is a 10 digit number. Can have leading zeros. # noqa: E501
+
+ :return: The pattern_with_digits of this FormatTest. # noqa: E501
+ :rtype: str
+ """
+ return self._pattern_with_digits
+
+ @pattern_with_digits.setter
+ def pattern_with_digits(self, pattern_with_digits):
+ """Sets the pattern_with_digits of this FormatTest.
+
+ A string that is a 10 digit number. Can have leading zeros. # noqa: E501
+
+ :param pattern_with_digits: The pattern_with_digits of this FormatTest. # noqa: E501
+ :type: str
+ """
+ if pattern_with_digits is not None and not re.search(r'^\d{10}$', pattern_with_digits): # noqa: E501
+ raise ValueError(r"Invalid value for `pattern_with_digits`, must be a follow pattern or equal to `/^\d{10}$/`") # noqa: E501
+
+ self._pattern_with_digits = pattern_with_digits
+
+ @property
+ def pattern_with_digits_and_delimiter(self):
+ """Gets the pattern_with_digits_and_delimiter of this FormatTest. # noqa: E501
+
+ A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. # noqa: E501
+
+ :return: The pattern_with_digits_and_delimiter of this FormatTest. # noqa: E501
+ :rtype: str
+ """
+ return self._pattern_with_digits_and_delimiter
+
+ @pattern_with_digits_and_delimiter.setter
+ def pattern_with_digits_and_delimiter(self, pattern_with_digits_and_delimiter):
+ """Sets the pattern_with_digits_and_delimiter of this FormatTest.
+
+ A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. # noqa: E501
+
+ :param pattern_with_digits_and_delimiter: The pattern_with_digits_and_delimiter of this FormatTest. # noqa: E501
+ :type: str
+ """
+ if pattern_with_digits_and_delimiter is not None and not re.search(r'^image_\d{1,3}$', pattern_with_digits_and_delimiter, flags=re.IGNORECASE): # noqa: E501
+ raise ValueError(r"Invalid value for `pattern_with_digits_and_delimiter`, must be a follow pattern or equal to `/^image_\d{1,3}$/i`") # noqa: E501
+
+ self._pattern_with_digits_and_delimiter = pattern_with_digits_and_delimiter
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, FormatTest):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py
new file mode 100644
index 000000000000..41db3ff71958
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py
@@ -0,0 +1,138 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class HasOnlyReadOnly(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'bar': 'str',
+ 'foo': 'str'
+ }
+
+ attribute_map = {
+ 'bar': 'bar',
+ 'foo': 'foo'
+ }
+
+ def __init__(self, bar=None, foo=None): # noqa: E501
+ """HasOnlyReadOnly - a model defined in OpenAPI""" # noqa: E501
+
+ self._bar = None
+ self._foo = None
+ self.discriminator = None
+
+ if bar is not None:
+ self.bar = bar
+ if foo is not None:
+ self.foo = foo
+
+ @property
+ def bar(self):
+ """Gets the bar of this HasOnlyReadOnly. # noqa: E501
+
+
+ :return: The bar of this HasOnlyReadOnly. # noqa: E501
+ :rtype: str
+ """
+ return self._bar
+
+ @bar.setter
+ def bar(self, bar):
+ """Sets the bar of this HasOnlyReadOnly.
+
+
+ :param bar: The bar of this HasOnlyReadOnly. # noqa: E501
+ :type: str
+ """
+
+ self._bar = bar
+
+ @property
+ def foo(self):
+ """Gets the foo of this HasOnlyReadOnly. # noqa: E501
+
+
+ :return: The foo of this HasOnlyReadOnly. # noqa: E501
+ :rtype: str
+ """
+ return self._foo
+
+ @foo.setter
+ def foo(self, foo):
+ """Sets the foo of this HasOnlyReadOnly.
+
+
+ :param foo: The foo of this HasOnlyReadOnly. # noqa: E501
+ :type: str
+ """
+
+ self._foo = foo
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, HasOnlyReadOnly):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object.py
new file mode 100644
index 000000000000..290c0f211d5b
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class InlineObject(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'name': 'str',
+ 'status': 'str'
+ }
+
+ attribute_map = {
+ 'name': 'name',
+ 'status': 'status'
+ }
+
+ def __init__(self, name=None, status=None): # noqa: E501
+ """InlineObject - a model defined in OpenAPI""" # noqa: E501
+
+ self._name = None
+ self._status = None
+ self.discriminator = None
+
+ if name is not None:
+ self.name = name
+ if status is not None:
+ self.status = status
+
+ @property
+ def name(self):
+ """Gets the name of this InlineObject. # noqa: E501
+
+ Updated name of the pet # noqa: E501
+
+ :return: The name of this InlineObject. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this InlineObject.
+
+ Updated name of the pet # noqa: E501
+
+ :param name: The name of this InlineObject. # noqa: E501
+ :type: str
+ """
+
+ self._name = name
+
+ @property
+ def status(self):
+ """Gets the status of this InlineObject. # noqa: E501
+
+ Updated status of the pet # noqa: E501
+
+ :return: The status of this InlineObject. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this InlineObject.
+
+ Updated status of the pet # noqa: E501
+
+ :param status: The status of this InlineObject. # noqa: E501
+ :type: str
+ """
+
+ self._status = status
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, InlineObject):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object1.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object1.py
new file mode 100644
index 000000000000..d24a6947f1c6
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object1.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class InlineObject1(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'additional_metadata': 'str',
+ 'file': 'file'
+ }
+
+ attribute_map = {
+ 'additional_metadata': 'additionalMetadata',
+ 'file': 'file'
+ }
+
+ def __init__(self, additional_metadata=None, file=None): # noqa: E501
+ """InlineObject1 - a model defined in OpenAPI""" # noqa: E501
+
+ self._additional_metadata = None
+ self._file = None
+ self.discriminator = None
+
+ if additional_metadata is not None:
+ self.additional_metadata = additional_metadata
+ if file is not None:
+ self.file = file
+
+ @property
+ def additional_metadata(self):
+ """Gets the additional_metadata of this InlineObject1. # noqa: E501
+
+ Additional data to pass to server # noqa: E501
+
+ :return: The additional_metadata of this InlineObject1. # noqa: E501
+ :rtype: str
+ """
+ return self._additional_metadata
+
+ @additional_metadata.setter
+ def additional_metadata(self, additional_metadata):
+ """Sets the additional_metadata of this InlineObject1.
+
+ Additional data to pass to server # noqa: E501
+
+ :param additional_metadata: The additional_metadata of this InlineObject1. # noqa: E501
+ :type: str
+ """
+
+ self._additional_metadata = additional_metadata
+
+ @property
+ def file(self):
+ """Gets the file of this InlineObject1. # noqa: E501
+
+ file to upload # noqa: E501
+
+ :return: The file of this InlineObject1. # noqa: E501
+ :rtype: file
+ """
+ return self._file
+
+ @file.setter
+ def file(self, file):
+ """Sets the file of this InlineObject1.
+
+ file to upload # noqa: E501
+
+ :param file: The file of this InlineObject1. # noqa: E501
+ :type: file
+ """
+
+ self._file = file
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, InlineObject1):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py
new file mode 100644
index 000000000000..b6dffad6091d
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py
@@ -0,0 +1,155 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class InlineObject2(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'enum_form_string_array': 'list[str]',
+ 'enum_form_string': 'str'
+ }
+
+ attribute_map = {
+ 'enum_form_string_array': 'enum_form_string_array',
+ 'enum_form_string': 'enum_form_string'
+ }
+
+ def __init__(self, enum_form_string_array=None, enum_form_string='-efg'): # noqa: E501
+ """InlineObject2 - a model defined in OpenAPI""" # noqa: E501
+
+ self._enum_form_string_array = None
+ self._enum_form_string = None
+ self.discriminator = None
+
+ if enum_form_string_array is not None:
+ self.enum_form_string_array = enum_form_string_array
+ if enum_form_string is not None:
+ self.enum_form_string = enum_form_string
+
+ @property
+ def enum_form_string_array(self):
+ """Gets the enum_form_string_array of this InlineObject2. # noqa: E501
+
+ Form parameter enum test (string array) # noqa: E501
+
+ :return: The enum_form_string_array of this InlineObject2. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._enum_form_string_array
+
+ @enum_form_string_array.setter
+ def enum_form_string_array(self, enum_form_string_array):
+ """Sets the enum_form_string_array of this InlineObject2.
+
+ Form parameter enum test (string array) # noqa: E501
+
+ :param enum_form_string_array: The enum_form_string_array of this InlineObject2. # noqa: E501
+ :type: list[str]
+ """
+ allowed_values = [">", "$"] # noqa: E501
+ if not set(enum_form_string_array).issubset(set(allowed_values)):
+ raise ValueError(
+ "Invalid values for `enum_form_string_array` [{0}], must be a subset of [{1}]" # noqa: E501
+ .format(", ".join(map(str, set(enum_form_string_array) - set(allowed_values))), # noqa: E501
+ ", ".join(map(str, allowed_values)))
+ )
+
+ self._enum_form_string_array = enum_form_string_array
+
+ @property
+ def enum_form_string(self):
+ """Gets the enum_form_string of this InlineObject2. # noqa: E501
+
+ Form parameter enum test (string) # noqa: E501
+
+ :return: The enum_form_string of this InlineObject2. # noqa: E501
+ :rtype: str
+ """
+ return self._enum_form_string
+
+ @enum_form_string.setter
+ def enum_form_string(self, enum_form_string):
+ """Sets the enum_form_string of this InlineObject2.
+
+ Form parameter enum test (string) # noqa: E501
+
+ :param enum_form_string: The enum_form_string of this InlineObject2. # noqa: E501
+ :type: str
+ """
+ allowed_values = ["_abc", "-efg", "(xyz)"] # noqa: E501
+ if enum_form_string not in allowed_values:
+ raise ValueError(
+ "Invalid value for `enum_form_string` ({0}), must be one of {1}" # noqa: E501
+ .format(enum_form_string, allowed_values)
+ )
+
+ self._enum_form_string = enum_form_string
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, InlineObject2):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object3.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object3.py
new file mode 100644
index 000000000000..100f32c628aa
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object3.py
@@ -0,0 +1,508 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class InlineObject3(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'integer': 'int',
+ 'int32': 'int',
+ 'int64': 'int',
+ 'number': 'float',
+ 'float': 'float',
+ 'double': 'float',
+ 'string': 'str',
+ 'pattern_without_delimiter': 'str',
+ 'byte': 'str',
+ 'binary': 'file',
+ 'date': 'date',
+ 'date_time': 'datetime',
+ 'password': 'str',
+ 'callback': 'str'
+ }
+
+ attribute_map = {
+ 'integer': 'integer',
+ 'int32': 'int32',
+ 'int64': 'int64',
+ 'number': 'number',
+ 'float': 'float',
+ 'double': 'double',
+ 'string': 'string',
+ 'pattern_without_delimiter': 'pattern_without_delimiter',
+ 'byte': 'byte',
+ 'binary': 'binary',
+ 'date': 'date',
+ 'date_time': 'dateTime',
+ 'password': 'password',
+ 'callback': 'callback'
+ }
+
+ def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, pattern_without_delimiter=None, byte=None, binary=None, date=None, date_time=None, password=None, callback=None): # noqa: E501
+ """InlineObject3 - a model defined in OpenAPI""" # noqa: E501
+
+ self._integer = None
+ self._int32 = None
+ self._int64 = None
+ self._number = None
+ self._float = None
+ self._double = None
+ self._string = None
+ self._pattern_without_delimiter = None
+ self._byte = None
+ self._binary = None
+ self._date = None
+ self._date_time = None
+ self._password = None
+ self._callback = None
+ self.discriminator = None
+
+ if integer is not None:
+ self.integer = integer
+ if int32 is not None:
+ self.int32 = int32
+ if int64 is not None:
+ self.int64 = int64
+ self.number = number
+ if float is not None:
+ self.float = float
+ self.double = double
+ if string is not None:
+ self.string = string
+ self.pattern_without_delimiter = pattern_without_delimiter
+ self.byte = byte
+ if binary is not None:
+ self.binary = binary
+ if date is not None:
+ self.date = date
+ if date_time is not None:
+ self.date_time = date_time
+ if password is not None:
+ self.password = password
+ if callback is not None:
+ self.callback = callback
+
+ @property
+ def integer(self):
+ """Gets the integer of this InlineObject3. # noqa: E501
+
+ None # noqa: E501
+
+ :return: The integer of this InlineObject3. # noqa: E501
+ :rtype: int
+ """
+ return self._integer
+
+ @integer.setter
+ def integer(self, integer):
+ """Sets the integer of this InlineObject3.
+
+ None # noqa: E501
+
+ :param integer: The integer of this InlineObject3. # noqa: E501
+ :type: int
+ """
+ if integer is not None and integer > 100: # noqa: E501
+ raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100`") # noqa: E501
+ if integer is not None and integer < 10: # noqa: E501
+ raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10`") # noqa: E501
+
+ self._integer = integer
+
+ @property
+ def int32(self):
+ """Gets the int32 of this InlineObject3. # noqa: E501
+
+ None # noqa: E501
+
+ :return: The int32 of this InlineObject3. # noqa: E501
+ :rtype: int
+ """
+ return self._int32
+
+ @int32.setter
+ def int32(self, int32):
+ """Sets the int32 of this InlineObject3.
+
+ None # noqa: E501
+
+ :param int32: The int32 of this InlineObject3. # noqa: E501
+ :type: int
+ """
+ if int32 is not None and int32 > 200: # noqa: E501
+ raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200`") # noqa: E501
+ if int32 is not None and int32 < 20: # noqa: E501
+ raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20`") # noqa: E501
+
+ self._int32 = int32
+
+ @property
+ def int64(self):
+ """Gets the int64 of this InlineObject3. # noqa: E501
+
+ None # noqa: E501
+
+ :return: The int64 of this InlineObject3. # noqa: E501
+ :rtype: int
+ """
+ return self._int64
+
+ @int64.setter
+ def int64(self, int64):
+ """Sets the int64 of this InlineObject3.
+
+ None # noqa: E501
+
+ :param int64: The int64 of this InlineObject3. # noqa: E501
+ :type: int
+ """
+
+ self._int64 = int64
+
+ @property
+ def number(self):
+ """Gets the number of this InlineObject3. # noqa: E501
+
+ None # noqa: E501
+
+ :return: The number of this InlineObject3. # noqa: E501
+ :rtype: float
+ """
+ return self._number
+
+ @number.setter
+ def number(self, number):
+ """Sets the number of this InlineObject3.
+
+ None # noqa: E501
+
+ :param number: The number of this InlineObject3. # noqa: E501
+ :type: float
+ """
+ if number is None:
+ raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501
+ if number is not None and number > 543.2: # noqa: E501
+ raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") # noqa: E501
+ if number is not None and number < 32.1: # noqa: E501
+ raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") # noqa: E501
+
+ self._number = number
+
+ @property
+ def float(self):
+ """Gets the float of this InlineObject3. # noqa: E501
+
+ None # noqa: E501
+
+ :return: The float of this InlineObject3. # noqa: E501
+ :rtype: float
+ """
+ return self._float
+
+ @float.setter
+ def float(self, float):
+ """Sets the float of this InlineObject3.
+
+ None # noqa: E501
+
+ :param float: The float of this InlineObject3. # noqa: E501
+ :type: float
+ """
+ if float is not None and float > 987.6: # noqa: E501
+ raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501
+
+ self._float = float
+
+ @property
+ def double(self):
+ """Gets the double of this InlineObject3. # noqa: E501
+
+ None # noqa: E501
+
+ :return: The double of this InlineObject3. # noqa: E501
+ :rtype: float
+ """
+ return self._double
+
+ @double.setter
+ def double(self, double):
+ """Sets the double of this InlineObject3.
+
+ None # noqa: E501
+
+ :param double: The double of this InlineObject3. # noqa: E501
+ :type: float
+ """
+ if double is None:
+ raise ValueError("Invalid value for `double`, must not be `None`") # noqa: E501
+ if double is not None and double > 123.4: # noqa: E501
+ raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") # noqa: E501
+ if double is not None and double < 67.8: # noqa: E501
+ raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") # noqa: E501
+
+ self._double = double
+
+ @property
+ def string(self):
+ """Gets the string of this InlineObject3. # noqa: E501
+
+ None # noqa: E501
+
+ :return: The string of this InlineObject3. # noqa: E501
+ :rtype: str
+ """
+ return self._string
+
+ @string.setter
+ def string(self, string):
+ """Sets the string of this InlineObject3.
+
+ None # noqa: E501
+
+ :param string: The string of this InlineObject3. # noqa: E501
+ :type: str
+ """
+ if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501
+ raise ValueError(r"Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501
+
+ self._string = string
+
+ @property
+ def pattern_without_delimiter(self):
+ """Gets the pattern_without_delimiter of this InlineObject3. # noqa: E501
+
+ None # noqa: E501
+
+ :return: The pattern_without_delimiter of this InlineObject3. # noqa: E501
+ :rtype: str
+ """
+ return self._pattern_without_delimiter
+
+ @pattern_without_delimiter.setter
+ def pattern_without_delimiter(self, pattern_without_delimiter):
+ """Sets the pattern_without_delimiter of this InlineObject3.
+
+ None # noqa: E501
+
+ :param pattern_without_delimiter: The pattern_without_delimiter of this InlineObject3. # noqa: E501
+ :type: str
+ """
+ if pattern_without_delimiter is None:
+ raise ValueError("Invalid value for `pattern_without_delimiter`, must not be `None`") # noqa: E501
+ if pattern_without_delimiter is not None and not re.search(r'^[A-Z].*', pattern_without_delimiter): # noqa: E501
+ raise ValueError(r"Invalid value for `pattern_without_delimiter`, must be a follow pattern or equal to `/^[A-Z].*/`") # noqa: E501
+
+ self._pattern_without_delimiter = pattern_without_delimiter
+
+ @property
+ def byte(self):
+ """Gets the byte of this InlineObject3. # noqa: E501
+
+ None # noqa: E501
+
+ :return: The byte of this InlineObject3. # noqa: E501
+ :rtype: str
+ """
+ return self._byte
+
+ @byte.setter
+ def byte(self, byte):
+ """Sets the byte of this InlineObject3.
+
+ None # noqa: E501
+
+ :param byte: The byte of this InlineObject3. # noqa: E501
+ :type: str
+ """
+ if byte is None:
+ raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501
+
+ self._byte = byte
+
+ @property
+ def binary(self):
+ """Gets the binary of this InlineObject3. # noqa: E501
+
+ None # noqa: E501
+
+ :return: The binary of this InlineObject3. # noqa: E501
+ :rtype: file
+ """
+ return self._binary
+
+ @binary.setter
+ def binary(self, binary):
+ """Sets the binary of this InlineObject3.
+
+ None # noqa: E501
+
+ :param binary: The binary of this InlineObject3. # noqa: E501
+ :type: file
+ """
+
+ self._binary = binary
+
+ @property
+ def date(self):
+ """Gets the date of this InlineObject3. # noqa: E501
+
+ None # noqa: E501
+
+ :return: The date of this InlineObject3. # noqa: E501
+ :rtype: date
+ """
+ return self._date
+
+ @date.setter
+ def date(self, date):
+ """Sets the date of this InlineObject3.
+
+ None # noqa: E501
+
+ :param date: The date of this InlineObject3. # noqa: E501
+ :type: date
+ """
+
+ self._date = date
+
+ @property
+ def date_time(self):
+ """Gets the date_time of this InlineObject3. # noqa: E501
+
+ None # noqa: E501
+
+ :return: The date_time of this InlineObject3. # noqa: E501
+ :rtype: datetime
+ """
+ return self._date_time
+
+ @date_time.setter
+ def date_time(self, date_time):
+ """Sets the date_time of this InlineObject3.
+
+ None # noqa: E501
+
+ :param date_time: The date_time of this InlineObject3. # noqa: E501
+ :type: datetime
+ """
+
+ self._date_time = date_time
+
+ @property
+ def password(self):
+ """Gets the password of this InlineObject3. # noqa: E501
+
+ None # noqa: E501
+
+ :return: The password of this InlineObject3. # noqa: E501
+ :rtype: str
+ """
+ return self._password
+
+ @password.setter
+ def password(self, password):
+ """Sets the password of this InlineObject3.
+
+ None # noqa: E501
+
+ :param password: The password of this InlineObject3. # noqa: E501
+ :type: str
+ """
+ if password is not None and len(password) > 64:
+ raise ValueError("Invalid value for `password`, length must be less than or equal to `64`") # noqa: E501
+ if password is not None and len(password) < 10:
+ raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") # noqa: E501
+
+ self._password = password
+
+ @property
+ def callback(self):
+ """Gets the callback of this InlineObject3. # noqa: E501
+
+ None # noqa: E501
+
+ :return: The callback of this InlineObject3. # noqa: E501
+ :rtype: str
+ """
+ return self._callback
+
+ @callback.setter
+ def callback(self, callback):
+ """Sets the callback of this InlineObject3.
+
+ None # noqa: E501
+
+ :param callback: The callback of this InlineObject3. # noqa: E501
+ :type: str
+ """
+
+ self._callback = callback
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, InlineObject3):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object4.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object4.py
new file mode 100644
index 000000000000..f0e6032cfa3c
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object4.py
@@ -0,0 +1,144 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class InlineObject4(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'param': 'str',
+ 'param2': 'str'
+ }
+
+ attribute_map = {
+ 'param': 'param',
+ 'param2': 'param2'
+ }
+
+ def __init__(self, param=None, param2=None): # noqa: E501
+ """InlineObject4 - a model defined in OpenAPI""" # noqa: E501
+
+ self._param = None
+ self._param2 = None
+ self.discriminator = None
+
+ self.param = param
+ self.param2 = param2
+
+ @property
+ def param(self):
+ """Gets the param of this InlineObject4. # noqa: E501
+
+ field1 # noqa: E501
+
+ :return: The param of this InlineObject4. # noqa: E501
+ :rtype: str
+ """
+ return self._param
+
+ @param.setter
+ def param(self, param):
+ """Sets the param of this InlineObject4.
+
+ field1 # noqa: E501
+
+ :param param: The param of this InlineObject4. # noqa: E501
+ :type: str
+ """
+ if param is None:
+ raise ValueError("Invalid value for `param`, must not be `None`") # noqa: E501
+
+ self._param = param
+
+ @property
+ def param2(self):
+ """Gets the param2 of this InlineObject4. # noqa: E501
+
+ field2 # noqa: E501
+
+ :return: The param2 of this InlineObject4. # noqa: E501
+ :rtype: str
+ """
+ return self._param2
+
+ @param2.setter
+ def param2(self, param2):
+ """Sets the param2 of this InlineObject4.
+
+ field2 # noqa: E501
+
+ :param param2: The param2 of this InlineObject4. # noqa: E501
+ :type: str
+ """
+ if param2 is None:
+ raise ValueError("Invalid value for `param2`, must not be `None`") # noqa: E501
+
+ self._param2 = param2
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, InlineObject4):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object5.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object5.py
new file mode 100644
index 000000000000..8a51ff7ef951
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object5.py
@@ -0,0 +1,143 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class InlineObject5(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'additional_metadata': 'str',
+ 'required_file': 'file'
+ }
+
+ attribute_map = {
+ 'additional_metadata': 'additionalMetadata',
+ 'required_file': 'requiredFile'
+ }
+
+ def __init__(self, additional_metadata=None, required_file=None): # noqa: E501
+ """InlineObject5 - a model defined in OpenAPI""" # noqa: E501
+
+ self._additional_metadata = None
+ self._required_file = None
+ self.discriminator = None
+
+ if additional_metadata is not None:
+ self.additional_metadata = additional_metadata
+ self.required_file = required_file
+
+ @property
+ def additional_metadata(self):
+ """Gets the additional_metadata of this InlineObject5. # noqa: E501
+
+ Additional data to pass to server # noqa: E501
+
+ :return: The additional_metadata of this InlineObject5. # noqa: E501
+ :rtype: str
+ """
+ return self._additional_metadata
+
+ @additional_metadata.setter
+ def additional_metadata(self, additional_metadata):
+ """Sets the additional_metadata of this InlineObject5.
+
+ Additional data to pass to server # noqa: E501
+
+ :param additional_metadata: The additional_metadata of this InlineObject5. # noqa: E501
+ :type: str
+ """
+
+ self._additional_metadata = additional_metadata
+
+ @property
+ def required_file(self):
+ """Gets the required_file of this InlineObject5. # noqa: E501
+
+ file to upload # noqa: E501
+
+ :return: The required_file of this InlineObject5. # noqa: E501
+ :rtype: file
+ """
+ return self._required_file
+
+ @required_file.setter
+ def required_file(self, required_file):
+ """Sets the required_file of this InlineObject5.
+
+ file to upload # noqa: E501
+
+ :param required_file: The required_file of this InlineObject5. # noqa: E501
+ :type: file
+ """
+ if required_file is None:
+ raise ValueError("Invalid value for `required_file`, must not be `None`") # noqa: E501
+
+ self._required_file = required_file
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, InlineObject5):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_response_default.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_response_default.py
new file mode 100644
index 000000000000..68980531ed43
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_response_default.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class InlineResponseDefault(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'string': 'Foo'
+ }
+
+ attribute_map = {
+ 'string': 'string'
+ }
+
+ def __init__(self, string=None): # noqa: E501
+ """InlineResponseDefault - a model defined in OpenAPI""" # noqa: E501
+
+ self._string = None
+ self.discriminator = None
+
+ if string is not None:
+ self.string = string
+
+ @property
+ def string(self):
+ """Gets the string of this InlineResponseDefault. # noqa: E501
+
+
+ :return: The string of this InlineResponseDefault. # noqa: E501
+ :rtype: Foo
+ """
+ return self._string
+
+ @string.setter
+ def string(self, string):
+ """Sets the string of this InlineResponseDefault.
+
+
+ :param string: The string of this InlineResponseDefault. # noqa: E501
+ :type: Foo
+ """
+
+ self._string = string
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, InlineResponseDefault):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/list.py b/samples/openapi3/client/petstore/python/petstore_api/models/list.py
new file mode 100644
index 000000000000..08e12ad53104
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/list.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class List(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ '_123_list': 'str'
+ }
+
+ attribute_map = {
+ '_123_list': '123-list'
+ }
+
+ def __init__(self, _123_list=None): # noqa: E501
+ """List - a model defined in OpenAPI""" # noqa: E501
+
+ self.__123_list = None
+ self.discriminator = None
+
+ if _123_list is not None:
+ self._123_list = _123_list
+
+ @property
+ def _123_list(self):
+ """Gets the _123_list of this List. # noqa: E501
+
+
+ :return: The _123_list of this List. # noqa: E501
+ :rtype: str
+ """
+ return self.__123_list
+
+ @_123_list.setter
+ def _123_list(self, _123_list):
+ """Sets the _123_list of this List.
+
+
+ :param _123_list: The _123_list of this List. # noqa: E501
+ :type: str
+ """
+
+ self.__123_list = _123_list
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, List):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py
new file mode 100644
index 000000000000..f04bd2cc1421
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py
@@ -0,0 +1,197 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class MapTest(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'map_map_of_string': 'dict(str, dict(str, str))',
+ 'map_of_enum_string': 'dict(str, str)',
+ 'direct_map': 'dict(str, bool)',
+ 'indirect_map': 'dict(str, bool)'
+ }
+
+ attribute_map = {
+ 'map_map_of_string': 'map_map_of_string',
+ 'map_of_enum_string': 'map_of_enum_string',
+ 'direct_map': 'direct_map',
+ 'indirect_map': 'indirect_map'
+ }
+
+ def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None): # noqa: E501
+ """MapTest - a model defined in OpenAPI""" # noqa: E501
+
+ self._map_map_of_string = None
+ self._map_of_enum_string = None
+ self._direct_map = None
+ self._indirect_map = None
+ self.discriminator = None
+
+ if map_map_of_string is not None:
+ self.map_map_of_string = map_map_of_string
+ if map_of_enum_string is not None:
+ self.map_of_enum_string = map_of_enum_string
+ if direct_map is not None:
+ self.direct_map = direct_map
+ if indirect_map is not None:
+ self.indirect_map = indirect_map
+
+ @property
+ def map_map_of_string(self):
+ """Gets the map_map_of_string of this MapTest. # noqa: E501
+
+
+ :return: The map_map_of_string of this MapTest. # noqa: E501
+ :rtype: dict(str, dict(str, str))
+ """
+ return self._map_map_of_string
+
+ @map_map_of_string.setter
+ def map_map_of_string(self, map_map_of_string):
+ """Sets the map_map_of_string of this MapTest.
+
+
+ :param map_map_of_string: The map_map_of_string of this MapTest. # noqa: E501
+ :type: dict(str, dict(str, str))
+ """
+
+ self._map_map_of_string = map_map_of_string
+
+ @property
+ def map_of_enum_string(self):
+ """Gets the map_of_enum_string of this MapTest. # noqa: E501
+
+
+ :return: The map_of_enum_string of this MapTest. # noqa: E501
+ :rtype: dict(str, str)
+ """
+ return self._map_of_enum_string
+
+ @map_of_enum_string.setter
+ def map_of_enum_string(self, map_of_enum_string):
+ """Sets the map_of_enum_string of this MapTest.
+
+
+ :param map_of_enum_string: The map_of_enum_string of this MapTest. # noqa: E501
+ :type: dict(str, str)
+ """
+ allowed_values = ["UPPER", "lower"] # noqa: E501
+ if not set(map_of_enum_string.keys()).issubset(set(allowed_values)):
+ raise ValueError(
+ "Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501
+ .format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501
+ ", ".join(map(str, allowed_values)))
+ )
+
+ self._map_of_enum_string = map_of_enum_string
+
+ @property
+ def direct_map(self):
+ """Gets the direct_map of this MapTest. # noqa: E501
+
+
+ :return: The direct_map of this MapTest. # noqa: E501
+ :rtype: dict(str, bool)
+ """
+ return self._direct_map
+
+ @direct_map.setter
+ def direct_map(self, direct_map):
+ """Sets the direct_map of this MapTest.
+
+
+ :param direct_map: The direct_map of this MapTest. # noqa: E501
+ :type: dict(str, bool)
+ """
+
+ self._direct_map = direct_map
+
+ @property
+ def indirect_map(self):
+ """Gets the indirect_map of this MapTest. # noqa: E501
+
+
+ :return: The indirect_map of this MapTest. # noqa: E501
+ :rtype: dict(str, bool)
+ """
+ return self._indirect_map
+
+ @indirect_map.setter
+ def indirect_map(self, indirect_map):
+ """Sets the indirect_map of this MapTest.
+
+
+ :param indirect_map: The indirect_map of this MapTest. # noqa: E501
+ :type: dict(str, bool)
+ """
+
+ self._indirect_map = indirect_map
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MapTest):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py
new file mode 100644
index 000000000000..ecf67acc5e95
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py
@@ -0,0 +1,164 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class MixedPropertiesAndAdditionalPropertiesClass(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'uuid': 'str',
+ 'date_time': 'datetime',
+ 'map': 'dict(str, Animal)'
+ }
+
+ attribute_map = {
+ 'uuid': 'uuid',
+ 'date_time': 'dateTime',
+ 'map': 'map'
+ }
+
+ def __init__(self, uuid=None, date_time=None, map=None): # noqa: E501
+ """MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501
+
+ self._uuid = None
+ self._date_time = None
+ self._map = None
+ self.discriminator = None
+
+ if uuid is not None:
+ self.uuid = uuid
+ if date_time is not None:
+ self.date_time = date_time
+ if map is not None:
+ self.map = map
+
+ @property
+ def uuid(self):
+ """Gets the uuid of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
+
+
+ :return: The uuid of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
+ :rtype: str
+ """
+ return self._uuid
+
+ @uuid.setter
+ def uuid(self, uuid):
+ """Sets the uuid of this MixedPropertiesAndAdditionalPropertiesClass.
+
+
+ :param uuid: The uuid of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
+ :type: str
+ """
+
+ self._uuid = uuid
+
+ @property
+ def date_time(self):
+ """Gets the date_time of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
+
+
+ :return: The date_time of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
+ :rtype: datetime
+ """
+ return self._date_time
+
+ @date_time.setter
+ def date_time(self, date_time):
+ """Sets the date_time of this MixedPropertiesAndAdditionalPropertiesClass.
+
+
+ :param date_time: The date_time of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
+ :type: datetime
+ """
+
+ self._date_time = date_time
+
+ @property
+ def map(self):
+ """Gets the map of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
+
+
+ :return: The map of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
+ :rtype: dict(str, Animal)
+ """
+ return self._map
+
+ @map.setter
+ def map(self, map):
+ """Sets the map of this MixedPropertiesAndAdditionalPropertiesClass.
+
+
+ :param map: The map of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
+ :type: dict(str, Animal)
+ """
+
+ self._map = map
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py b/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py
new file mode 100644
index 000000000000..ec778cdcb74b
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py
@@ -0,0 +1,138 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Model200Response(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'name': 'int',
+ '_class': 'str'
+ }
+
+ attribute_map = {
+ 'name': 'name',
+ '_class': 'class'
+ }
+
+ def __init__(self, name=None, _class=None): # noqa: E501
+ """Model200Response - a model defined in OpenAPI""" # noqa: E501
+
+ self._name = None
+ self.__class = None
+ self.discriminator = None
+
+ if name is not None:
+ self.name = name
+ if _class is not None:
+ self._class = _class
+
+ @property
+ def name(self):
+ """Gets the name of this Model200Response. # noqa: E501
+
+
+ :return: The name of this Model200Response. # noqa: E501
+ :rtype: int
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this Model200Response.
+
+
+ :param name: The name of this Model200Response. # noqa: E501
+ :type: int
+ """
+
+ self._name = name
+
+ @property
+ def _class(self):
+ """Gets the _class of this Model200Response. # noqa: E501
+
+
+ :return: The _class of this Model200Response. # noqa: E501
+ :rtype: str
+ """
+ return self.__class
+
+ @_class.setter
+ def _class(self, _class):
+ """Sets the _class of this Model200Response.
+
+
+ :param _class: The _class of this Model200Response. # noqa: E501
+ :type: str
+ """
+
+ self.__class = _class
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Model200Response):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py b/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py
new file mode 100644
index 000000000000..3862245ef71d
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ModelReturn(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ '_return': 'int'
+ }
+
+ attribute_map = {
+ '_return': 'return'
+ }
+
+ def __init__(self, _return=None): # noqa: E501
+ """ModelReturn - a model defined in OpenAPI""" # noqa: E501
+
+ self.__return = None
+ self.discriminator = None
+
+ if _return is not None:
+ self._return = _return
+
+ @property
+ def _return(self):
+ """Gets the _return of this ModelReturn. # noqa: E501
+
+
+ :return: The _return of this ModelReturn. # noqa: E501
+ :rtype: int
+ """
+ return self.__return
+
+ @_return.setter
+ def _return(self, _return):
+ """Sets the _return of this ModelReturn.
+
+
+ :param _return: The _return of this ModelReturn. # noqa: E501
+ :type: int
+ """
+
+ self.__return = _return
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ModelReturn):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/name.py b/samples/openapi3/client/petstore/python/petstore_api/models/name.py
new file mode 100644
index 000000000000..b2e97e596a4d
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/name.py
@@ -0,0 +1,191 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Name(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'name': 'int',
+ 'snake_case': 'int',
+ '_property': 'str',
+ '_123_number': 'int'
+ }
+
+ attribute_map = {
+ 'name': 'name',
+ 'snake_case': 'snake_case',
+ '_property': 'property',
+ '_123_number': '123Number'
+ }
+
+ def __init__(self, name=None, snake_case=None, _property=None, _123_number=None): # noqa: E501
+ """Name - a model defined in OpenAPI""" # noqa: E501
+
+ self._name = None
+ self._snake_case = None
+ self.__property = None
+ self.__123_number = None
+ self.discriminator = None
+
+ self.name = name
+ if snake_case is not None:
+ self.snake_case = snake_case
+ if _property is not None:
+ self._property = _property
+ if _123_number is not None:
+ self._123_number = _123_number
+
+ @property
+ def name(self):
+ """Gets the name of this Name. # noqa: E501
+
+
+ :return: The name of this Name. # noqa: E501
+ :rtype: int
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this Name.
+
+
+ :param name: The name of this Name. # noqa: E501
+ :type: int
+ """
+ if name is None:
+ raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
+
+ self._name = name
+
+ @property
+ def snake_case(self):
+ """Gets the snake_case of this Name. # noqa: E501
+
+
+ :return: The snake_case of this Name. # noqa: E501
+ :rtype: int
+ """
+ return self._snake_case
+
+ @snake_case.setter
+ def snake_case(self, snake_case):
+ """Sets the snake_case of this Name.
+
+
+ :param snake_case: The snake_case of this Name. # noqa: E501
+ :type: int
+ """
+
+ self._snake_case = snake_case
+
+ @property
+ def _property(self):
+ """Gets the _property of this Name. # noqa: E501
+
+
+ :return: The _property of this Name. # noqa: E501
+ :rtype: str
+ """
+ return self.__property
+
+ @_property.setter
+ def _property(self, _property):
+ """Sets the _property of this Name.
+
+
+ :param _property: The _property of this Name. # noqa: E501
+ :type: str
+ """
+
+ self.__property = _property
+
+ @property
+ def _123_number(self):
+ """Gets the _123_number of this Name. # noqa: E501
+
+
+ :return: The _123_number of this Name. # noqa: E501
+ :rtype: int
+ """
+ return self.__123_number
+
+ @_123_number.setter
+ def _123_number(self, _123_number):
+ """Sets the _123_number of this Name.
+
+
+ :param _123_number: The _123_number of this Name. # noqa: E501
+ :type: int
+ """
+
+ self.__123_number = _123_number
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Name):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py
new file mode 100644
index 000000000000..ab39ee8195d4
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class NumberOnly(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'just_number': 'float'
+ }
+
+ attribute_map = {
+ 'just_number': 'JustNumber'
+ }
+
+ def __init__(self, just_number=None): # noqa: E501
+ """NumberOnly - a model defined in OpenAPI""" # noqa: E501
+
+ self._just_number = None
+ self.discriminator = None
+
+ if just_number is not None:
+ self.just_number = just_number
+
+ @property
+ def just_number(self):
+ """Gets the just_number of this NumberOnly. # noqa: E501
+
+
+ :return: The just_number of this NumberOnly. # noqa: E501
+ :rtype: float
+ """
+ return self._just_number
+
+ @just_number.setter
+ def just_number(self, just_number):
+ """Sets the just_number of this NumberOnly.
+
+
+ :param just_number: The just_number of this NumberOnly. # noqa: E501
+ :type: float
+ """
+
+ self._just_number = just_number
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, NumberOnly):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/order.py b/samples/openapi3/client/petstore/python/petstore_api/models/order.py
new file mode 100644
index 000000000000..697d84447cdc
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/order.py
@@ -0,0 +1,250 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Order(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'int',
+ 'pet_id': 'int',
+ 'quantity': 'int',
+ 'ship_date': 'datetime',
+ 'status': 'str',
+ 'complete': 'bool'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'pet_id': 'petId',
+ 'quantity': 'quantity',
+ 'ship_date': 'shipDate',
+ 'status': 'status',
+ 'complete': 'complete'
+ }
+
+ def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False): # noqa: E501
+ """Order - a model defined in OpenAPI""" # noqa: E501
+
+ self._id = None
+ self._pet_id = None
+ self._quantity = None
+ self._ship_date = None
+ self._status = None
+ self._complete = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if pet_id is not None:
+ self.pet_id = pet_id
+ if quantity is not None:
+ self.quantity = quantity
+ if ship_date is not None:
+ self.ship_date = ship_date
+ if status is not None:
+ self.status = status
+ if complete is not None:
+ self.complete = complete
+
+ @property
+ def id(self):
+ """Gets the id of this Order. # noqa: E501
+
+
+ :return: The id of this Order. # noqa: E501
+ :rtype: int
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this Order.
+
+
+ :param id: The id of this Order. # noqa: E501
+ :type: int
+ """
+
+ self._id = id
+
+ @property
+ def pet_id(self):
+ """Gets the pet_id of this Order. # noqa: E501
+
+
+ :return: The pet_id of this Order. # noqa: E501
+ :rtype: int
+ """
+ return self._pet_id
+
+ @pet_id.setter
+ def pet_id(self, pet_id):
+ """Sets the pet_id of this Order.
+
+
+ :param pet_id: The pet_id of this Order. # noqa: E501
+ :type: int
+ """
+
+ self._pet_id = pet_id
+
+ @property
+ def quantity(self):
+ """Gets the quantity of this Order. # noqa: E501
+
+
+ :return: The quantity of this Order. # noqa: E501
+ :rtype: int
+ """
+ return self._quantity
+
+ @quantity.setter
+ def quantity(self, quantity):
+ """Sets the quantity of this Order.
+
+
+ :param quantity: The quantity of this Order. # noqa: E501
+ :type: int
+ """
+
+ self._quantity = quantity
+
+ @property
+ def ship_date(self):
+ """Gets the ship_date of this Order. # noqa: E501
+
+
+ :return: The ship_date of this Order. # noqa: E501
+ :rtype: datetime
+ """
+ return self._ship_date
+
+ @ship_date.setter
+ def ship_date(self, ship_date):
+ """Sets the ship_date of this Order.
+
+
+ :param ship_date: The ship_date of this Order. # noqa: E501
+ :type: datetime
+ """
+
+ self._ship_date = ship_date
+
+ @property
+ def status(self):
+ """Gets the status of this Order. # noqa: E501
+
+ Order Status # noqa: E501
+
+ :return: The status of this Order. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this Order.
+
+ Order Status # noqa: E501
+
+ :param status: The status of this Order. # noqa: E501
+ :type: str
+ """
+ allowed_values = ["placed", "approved", "delivered"] # noqa: E501
+ if status not in allowed_values:
+ raise ValueError(
+ "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
+ .format(status, allowed_values)
+ )
+
+ self._status = status
+
+ @property
+ def complete(self):
+ """Gets the complete of this Order. # noqa: E501
+
+
+ :return: The complete of this Order. # noqa: E501
+ :rtype: bool
+ """
+ return self._complete
+
+ @complete.setter
+ def complete(self, complete):
+ """Sets the complete of this Order.
+
+
+ :param complete: The complete of this Order. # noqa: E501
+ :type: bool
+ """
+
+ self._complete = complete
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Order):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py
new file mode 100644
index 000000000000..b22b16c6fdcd
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py
@@ -0,0 +1,164 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class OuterComposite(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'my_number': 'float',
+ 'my_string': 'str',
+ 'my_boolean': 'bool'
+ }
+
+ attribute_map = {
+ 'my_number': 'my_number',
+ 'my_string': 'my_string',
+ 'my_boolean': 'my_boolean'
+ }
+
+ def __init__(self, my_number=None, my_string=None, my_boolean=None): # noqa: E501
+ """OuterComposite - a model defined in OpenAPI""" # noqa: E501
+
+ self._my_number = None
+ self._my_string = None
+ self._my_boolean = None
+ self.discriminator = None
+
+ if my_number is not None:
+ self.my_number = my_number
+ if my_string is not None:
+ self.my_string = my_string
+ if my_boolean is not None:
+ self.my_boolean = my_boolean
+
+ @property
+ def my_number(self):
+ """Gets the my_number of this OuterComposite. # noqa: E501
+
+
+ :return: The my_number of this OuterComposite. # noqa: E501
+ :rtype: float
+ """
+ return self._my_number
+
+ @my_number.setter
+ def my_number(self, my_number):
+ """Sets the my_number of this OuterComposite.
+
+
+ :param my_number: The my_number of this OuterComposite. # noqa: E501
+ :type: float
+ """
+
+ self._my_number = my_number
+
+ @property
+ def my_string(self):
+ """Gets the my_string of this OuterComposite. # noqa: E501
+
+
+ :return: The my_string of this OuterComposite. # noqa: E501
+ :rtype: str
+ """
+ return self._my_string
+
+ @my_string.setter
+ def my_string(self, my_string):
+ """Sets the my_string of this OuterComposite.
+
+
+ :param my_string: The my_string of this OuterComposite. # noqa: E501
+ :type: str
+ """
+
+ self._my_string = my_string
+
+ @property
+ def my_boolean(self):
+ """Gets the my_boolean of this OuterComposite. # noqa: E501
+
+
+ :return: The my_boolean of this OuterComposite. # noqa: E501
+ :rtype: bool
+ """
+ return self._my_boolean
+
+ @my_boolean.setter
+ def my_boolean(self, my_boolean):
+ """Sets the my_boolean of this OuterComposite.
+
+
+ :param my_boolean: The my_boolean of this OuterComposite. # noqa: E501
+ :type: bool
+ """
+
+ self._my_boolean = my_boolean
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, OuterComposite):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum.py
new file mode 100644
index 000000000000..10d6be19a4c9
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class OuterEnum(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ allowed enum values
+ """
+ PLACED = "placed"
+ APPROVED = "approved"
+ DELIVERED = "delivered"
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ }
+
+ attribute_map = {
+ }
+
+ def __init__(self): # noqa: E501
+ """OuterEnum - a model defined in OpenAPI""" # noqa: E501
+ self.discriminator = None
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, OuterEnum):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/pet.py b/samples/openapi3/client/petstore/python/petstore_api/models/pet.py
new file mode 100644
index 000000000000..3183f60c7971
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/pet.py
@@ -0,0 +1,252 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Pet(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'int',
+ 'category': 'Category',
+ 'name': 'str',
+ 'photo_urls': 'list[str]',
+ 'tags': 'list[Tag]',
+ 'status': 'str'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'category': 'category',
+ 'name': 'name',
+ 'photo_urls': 'photoUrls',
+ 'tags': 'tags',
+ 'status': 'status'
+ }
+
+ def __init__(self, id=None, category=None, name='doggie', photo_urls=None, tags=None, status=None): # noqa: E501
+ """Pet - a model defined in OpenAPI""" # noqa: E501
+
+ self._id = None
+ self._category = None
+ self._name = None
+ self._photo_urls = None
+ self._tags = None
+ self._status = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if category is not None:
+ self.category = category
+ self.name = name
+ self.photo_urls = photo_urls
+ if tags is not None:
+ self.tags = tags
+ if status is not None:
+ self.status = status
+
+ @property
+ def id(self):
+ """Gets the id of this Pet. # noqa: E501
+
+
+ :return: The id of this Pet. # noqa: E501
+ :rtype: int
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this Pet.
+
+
+ :param id: The id of this Pet. # noqa: E501
+ :type: int
+ """
+
+ self._id = id
+
+ @property
+ def category(self):
+ """Gets the category of this Pet. # noqa: E501
+
+
+ :return: The category of this Pet. # noqa: E501
+ :rtype: Category
+ """
+ return self._category
+
+ @category.setter
+ def category(self, category):
+ """Sets the category of this Pet.
+
+
+ :param category: The category of this Pet. # noqa: E501
+ :type: Category
+ """
+
+ self._category = category
+
+ @property
+ def name(self):
+ """Gets the name of this Pet. # noqa: E501
+
+
+ :return: The name of this Pet. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this Pet.
+
+
+ :param name: The name of this Pet. # noqa: E501
+ :type: str
+ """
+ if name is None:
+ raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
+
+ self._name = name
+
+ @property
+ def photo_urls(self):
+ """Gets the photo_urls of this Pet. # noqa: E501
+
+
+ :return: The photo_urls of this Pet. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._photo_urls
+
+ @photo_urls.setter
+ def photo_urls(self, photo_urls):
+ """Sets the photo_urls of this Pet.
+
+
+ :param photo_urls: The photo_urls of this Pet. # noqa: E501
+ :type: list[str]
+ """
+ if photo_urls is None:
+ raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501
+
+ self._photo_urls = photo_urls
+
+ @property
+ def tags(self):
+ """Gets the tags of this Pet. # noqa: E501
+
+
+ :return: The tags of this Pet. # noqa: E501
+ :rtype: list[Tag]
+ """
+ return self._tags
+
+ @tags.setter
+ def tags(self, tags):
+ """Sets the tags of this Pet.
+
+
+ :param tags: The tags of this Pet. # noqa: E501
+ :type: list[Tag]
+ """
+
+ self._tags = tags
+
+ @property
+ def status(self):
+ """Gets the status of this Pet. # noqa: E501
+
+ pet status in the store # noqa: E501
+
+ :return: The status of this Pet. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this Pet.
+
+ pet status in the store # noqa: E501
+
+ :param status: The status of this Pet. # noqa: E501
+ :type: str
+ """
+ allowed_values = ["available", "pending", "sold"] # noqa: E501
+ if status not in allowed_values:
+ raise ValueError(
+ "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
+ .format(status, allowed_values)
+ )
+
+ self._status = status
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Pet):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py b/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py
new file mode 100644
index 000000000000..2b257be18de4
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py
@@ -0,0 +1,138 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ReadOnlyFirst(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'bar': 'str',
+ 'baz': 'str'
+ }
+
+ attribute_map = {
+ 'bar': 'bar',
+ 'baz': 'baz'
+ }
+
+ def __init__(self, bar=None, baz=None): # noqa: E501
+ """ReadOnlyFirst - a model defined in OpenAPI""" # noqa: E501
+
+ self._bar = None
+ self._baz = None
+ self.discriminator = None
+
+ if bar is not None:
+ self.bar = bar
+ if baz is not None:
+ self.baz = baz
+
+ @property
+ def bar(self):
+ """Gets the bar of this ReadOnlyFirst. # noqa: E501
+
+
+ :return: The bar of this ReadOnlyFirst. # noqa: E501
+ :rtype: str
+ """
+ return self._bar
+
+ @bar.setter
+ def bar(self, bar):
+ """Sets the bar of this ReadOnlyFirst.
+
+
+ :param bar: The bar of this ReadOnlyFirst. # noqa: E501
+ :type: str
+ """
+
+ self._bar = bar
+
+ @property
+ def baz(self):
+ """Gets the baz of this ReadOnlyFirst. # noqa: E501
+
+
+ :return: The baz of this ReadOnlyFirst. # noqa: E501
+ :rtype: str
+ """
+ return self._baz
+
+ @baz.setter
+ def baz(self, baz):
+ """Sets the baz of this ReadOnlyFirst.
+
+
+ :param baz: The baz of this ReadOnlyFirst. # noqa: E501
+ :type: str
+ """
+
+ self._baz = baz
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ReadOnlyFirst):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py b/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py
new file mode 100644
index 000000000000..fa59b887471b
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class SpecialModelName(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'special_property_name': 'int'
+ }
+
+ attribute_map = {
+ 'special_property_name': '$special[property.name]'
+ }
+
+ def __init__(self, special_property_name=None): # noqa: E501
+ """SpecialModelName - a model defined in OpenAPI""" # noqa: E501
+
+ self._special_property_name = None
+ self.discriminator = None
+
+ if special_property_name is not None:
+ self.special_property_name = special_property_name
+
+ @property
+ def special_property_name(self):
+ """Gets the special_property_name of this SpecialModelName. # noqa: E501
+
+
+ :return: The special_property_name of this SpecialModelName. # noqa: E501
+ :rtype: int
+ """
+ return self._special_property_name
+
+ @special_property_name.setter
+ def special_property_name(self, special_property_name):
+ """Sets the special_property_name of this SpecialModelName.
+
+
+ :param special_property_name: The special_property_name of this SpecialModelName. # noqa: E501
+ :type: int
+ """
+
+ self._special_property_name = special_property_name
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, SpecialModelName):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/tag.py b/samples/openapi3/client/petstore/python/petstore_api/models/tag.py
new file mode 100644
index 000000000000..8fcc8a848660
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/tag.py
@@ -0,0 +1,138 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Tag(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'int',
+ 'name': 'str'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'name': 'name'
+ }
+
+ def __init__(self, id=None, name=None): # noqa: E501
+ """Tag - a model defined in OpenAPI""" # noqa: E501
+
+ self._id = None
+ self._name = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if name is not None:
+ self.name = name
+
+ @property
+ def id(self):
+ """Gets the id of this Tag. # noqa: E501
+
+
+ :return: The id of this Tag. # noqa: E501
+ :rtype: int
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this Tag.
+
+
+ :param id: The id of this Tag. # noqa: E501
+ :type: int
+ """
+
+ self._id = id
+
+ @property
+ def name(self):
+ """Gets the name of this Tag. # noqa: E501
+
+
+ :return: The name of this Tag. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this Tag.
+
+
+ :param name: The name of this Tag. # noqa: E501
+ :type: str
+ """
+
+ self._name = name
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Tag):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/user.py b/samples/openapi3/client/petstore/python/petstore_api/models/user.py
new file mode 100644
index 000000000000..9736c47c1f87
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/user.py
@@ -0,0 +1,296 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class User(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'id': 'int',
+ 'username': 'str',
+ 'first_name': 'str',
+ 'last_name': 'str',
+ 'email': 'str',
+ 'password': 'str',
+ 'phone': 'str',
+ 'user_status': 'int'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'username': 'username',
+ 'first_name': 'firstName',
+ 'last_name': 'lastName',
+ 'email': 'email',
+ 'password': 'password',
+ 'phone': 'phone',
+ 'user_status': 'userStatus'
+ }
+
+ def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None): # noqa: E501
+ """User - a model defined in OpenAPI""" # noqa: E501
+
+ self._id = None
+ self._username = None
+ self._first_name = None
+ self._last_name = None
+ self._email = None
+ self._password = None
+ self._phone = None
+ self._user_status = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if username is not None:
+ self.username = username
+ if first_name is not None:
+ self.first_name = first_name
+ if last_name is not None:
+ self.last_name = last_name
+ if email is not None:
+ self.email = email
+ if password is not None:
+ self.password = password
+ if phone is not None:
+ self.phone = phone
+ if user_status is not None:
+ self.user_status = user_status
+
+ @property
+ def id(self):
+ """Gets the id of this User. # noqa: E501
+
+
+ :return: The id of this User. # noqa: E501
+ :rtype: int
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this User.
+
+
+ :param id: The id of this User. # noqa: E501
+ :type: int
+ """
+
+ self._id = id
+
+ @property
+ def username(self):
+ """Gets the username of this User. # noqa: E501
+
+
+ :return: The username of this User. # noqa: E501
+ :rtype: str
+ """
+ return self._username
+
+ @username.setter
+ def username(self, username):
+ """Sets the username of this User.
+
+
+ :param username: The username of this User. # noqa: E501
+ :type: str
+ """
+
+ self._username = username
+
+ @property
+ def first_name(self):
+ """Gets the first_name of this User. # noqa: E501
+
+
+ :return: The first_name of this User. # noqa: E501
+ :rtype: str
+ """
+ return self._first_name
+
+ @first_name.setter
+ def first_name(self, first_name):
+ """Sets the first_name of this User.
+
+
+ :param first_name: The first_name of this User. # noqa: E501
+ :type: str
+ """
+
+ self._first_name = first_name
+
+ @property
+ def last_name(self):
+ """Gets the last_name of this User. # noqa: E501
+
+
+ :return: The last_name of this User. # noqa: E501
+ :rtype: str
+ """
+ return self._last_name
+
+ @last_name.setter
+ def last_name(self, last_name):
+ """Sets the last_name of this User.
+
+
+ :param last_name: The last_name of this User. # noqa: E501
+ :type: str
+ """
+
+ self._last_name = last_name
+
+ @property
+ def email(self):
+ """Gets the email of this User. # noqa: E501
+
+
+ :return: The email of this User. # noqa: E501
+ :rtype: str
+ """
+ return self._email
+
+ @email.setter
+ def email(self, email):
+ """Sets the email of this User.
+
+
+ :param email: The email of this User. # noqa: E501
+ :type: str
+ """
+
+ self._email = email
+
+ @property
+ def password(self):
+ """Gets the password of this User. # noqa: E501
+
+
+ :return: The password of this User. # noqa: E501
+ :rtype: str
+ """
+ return self._password
+
+ @password.setter
+ def password(self, password):
+ """Sets the password of this User.
+
+
+ :param password: The password of this User. # noqa: E501
+ :type: str
+ """
+
+ self._password = password
+
+ @property
+ def phone(self):
+ """Gets the phone of this User. # noqa: E501
+
+
+ :return: The phone of this User. # noqa: E501
+ :rtype: str
+ """
+ return self._phone
+
+ @phone.setter
+ def phone(self, phone):
+ """Sets the phone of this User.
+
+
+ :param phone: The phone of this User. # noqa: E501
+ :type: str
+ """
+
+ self._phone = phone
+
+ @property
+ def user_status(self):
+ """Gets the user_status of this User. # noqa: E501
+
+ User Status # noqa: E501
+
+ :return: The user_status of this User. # noqa: E501
+ :rtype: int
+ """
+ return self._user_status
+
+ @user_status.setter
+ def user_status(self, user_status):
+ """Sets the user_status of this User.
+
+ User Status # noqa: E501
+
+ :param user_status: The user_status of this User. # noqa: E501
+ :type: int
+ """
+
+ self._user_status = user_status
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, User):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/samples/openapi3/client/petstore/python/petstore_api/rest.py b/samples/openapi3/client/petstore/python/petstore_api/rest.py
new file mode 100644
index 000000000000..30ba5fb8d3f5
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/rest.py
@@ -0,0 +1,322 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import io
+import json
+import logging
+import re
+import ssl
+
+import certifi
+# python 2 and python 3 compatibility library
+import six
+from six.moves.urllib.parse import urlencode
+
+try:
+ import urllib3
+except ImportError:
+ raise ImportError('OpenAPI Python client requires urllib3.')
+
+
+logger = logging.getLogger(__name__)
+
+
+class RESTResponse(io.IOBase):
+
+ def __init__(self, resp):
+ self.urllib3_response = resp
+ self.status = resp.status
+ self.reason = resp.reason
+ self.data = resp.data
+
+ def getheaders(self):
+ """Returns a dictionary of the response headers."""
+ return self.urllib3_response.getheaders()
+
+ def getheader(self, name, default=None):
+ """Returns a given response header."""
+ return self.urllib3_response.getheader(name, default)
+
+
+class RESTClientObject(object):
+
+ def __init__(self, configuration, pools_size=4, maxsize=None):
+ # urllib3.PoolManager will pass all kw parameters to connectionpool
+ # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
+ # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
+ # maxsize is the number of requests to host that are allowed in parallel # noqa: E501
+ # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501
+
+ # cert_reqs
+ if configuration.verify_ssl:
+ cert_reqs = ssl.CERT_REQUIRED
+ else:
+ cert_reqs = ssl.CERT_NONE
+
+ # ca_certs
+ if configuration.ssl_ca_cert:
+ ca_certs = configuration.ssl_ca_cert
+ else:
+ # if not set certificate file, use Mozilla's root certificates.
+ ca_certs = certifi.where()
+
+ addition_pool_args = {}
+ if configuration.assert_hostname is not None:
+ addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501
+
+ if maxsize is None:
+ if configuration.connection_pool_maxsize is not None:
+ maxsize = configuration.connection_pool_maxsize
+ else:
+ maxsize = 4
+
+ # https pool manager
+ if configuration.proxy:
+ self.pool_manager = urllib3.ProxyManager(
+ num_pools=pools_size,
+ maxsize=maxsize,
+ cert_reqs=cert_reqs,
+ ca_certs=ca_certs,
+ cert_file=configuration.cert_file,
+ key_file=configuration.key_file,
+ proxy_url=configuration.proxy,
+ **addition_pool_args
+ )
+ else:
+ self.pool_manager = urllib3.PoolManager(
+ num_pools=pools_size,
+ maxsize=maxsize,
+ cert_reqs=cert_reqs,
+ ca_certs=ca_certs,
+ cert_file=configuration.cert_file,
+ key_file=configuration.key_file,
+ **addition_pool_args
+ )
+
+ def request(self, method, url, query_params=None, headers=None,
+ body=None, post_params=None, _preload_content=True,
+ _request_timeout=None):
+ """Perform requests.
+
+ :param method: http request method
+ :param url: http request url
+ :param query_params: query parameters in the url
+ :param headers: http request headers
+ :param body: request json body, for `application/json`
+ :param post_params: request post parameters,
+ `application/x-www-form-urlencoded`
+ and `multipart/form-data`
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ """
+ method = method.upper()
+ assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT',
+ 'PATCH', 'OPTIONS']
+
+ if post_params and body:
+ raise ValueError(
+ "body parameter cannot be used with post_params parameter."
+ )
+
+ post_params = post_params or {}
+ headers = headers or {}
+
+ timeout = None
+ if _request_timeout:
+ if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821
+ timeout = urllib3.Timeout(total=_request_timeout)
+ elif (isinstance(_request_timeout, tuple) and
+ len(_request_timeout) == 2):
+ timeout = urllib3.Timeout(
+ connect=_request_timeout[0], read=_request_timeout[1])
+
+ if 'Content-Type' not in headers:
+ headers['Content-Type'] = 'application/json'
+
+ try:
+ # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
+ if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
+ if query_params:
+ url += '?' + urlencode(query_params)
+ if re.search('json', headers['Content-Type'], re.IGNORECASE):
+ request_body = None
+ if body is not None:
+ request_body = json.dumps(body)
+ r = self.pool_manager.request(
+ method, url,
+ body=request_body,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501
+ r = self.pool_manager.request(
+ method, url,
+ fields=post_params,
+ encode_multipart=False,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ elif headers['Content-Type'] == 'multipart/form-data':
+ # must del headers['Content-Type'], or the correct
+ # Content-Type which generated by urllib3 will be
+ # overwritten.
+ del headers['Content-Type']
+ r = self.pool_manager.request(
+ method, url,
+ fields=post_params,
+ encode_multipart=True,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ # Pass a `string` parameter directly in the body to support
+ # other content types than Json when `body` argument is
+ # provided in serialized form
+ elif isinstance(body, str):
+ request_body = body
+ r = self.pool_manager.request(
+ method, url,
+ body=request_body,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ else:
+ # Cannot generate the request from given parameters
+ msg = """Cannot prepare a request message for provided
+ arguments. Please check that your arguments match
+ declared content type."""
+ raise ApiException(status=0, reason=msg)
+ # For `GET`, `HEAD`
+ else:
+ r = self.pool_manager.request(method, url,
+ fields=query_params,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ except urllib3.exceptions.SSLError as e:
+ msg = "{0}\n{1}".format(type(e).__name__, str(e))
+ raise ApiException(status=0, reason=msg)
+
+ if _preload_content:
+ r = RESTResponse(r)
+
+ # In the python 3, the response.data is bytes.
+ # we need to decode it to string.
+ if six.PY3:
+ r.data = r.data.decode('utf8')
+
+ # log response body
+ logger.debug("response body: %s", r.data)
+
+ if not 200 <= r.status <= 299:
+ raise ApiException(http_resp=r)
+
+ return r
+
+ def GET(self, url, headers=None, query_params=None, _preload_content=True,
+ _request_timeout=None):
+ return self.request("GET", url,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ query_params=query_params)
+
+ def HEAD(self, url, headers=None, query_params=None, _preload_content=True,
+ _request_timeout=None):
+ return self.request("HEAD", url,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ query_params=query_params)
+
+ def OPTIONS(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("OPTIONS", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def DELETE(self, url, headers=None, query_params=None, body=None,
+ _preload_content=True, _request_timeout=None):
+ return self.request("DELETE", url,
+ headers=headers,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def POST(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("POST", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def PUT(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("PUT", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def PATCH(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("PATCH", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+
+class ApiException(Exception):
+
+ def __init__(self, status=None, reason=None, http_resp=None):
+ if http_resp:
+ self.status = http_resp.status
+ self.reason = http_resp.reason
+ self.body = http_resp.data
+ self.headers = http_resp.getheaders()
+ else:
+ self.status = status
+ self.reason = reason
+ self.body = None
+ self.headers = None
+
+ def __str__(self):
+ """Custom error messages for exception"""
+ error_message = "({0})\n"\
+ "Reason: {1}\n".format(self.status, self.reason)
+ if self.headers:
+ error_message += "HTTP response headers: {0}\n".format(
+ self.headers)
+
+ if self.body:
+ error_message += "HTTP response body: {0}\n".format(self.body)
+
+ return error_message
diff --git a/samples/openapi3/client/petstore/python/pom.xml b/samples/openapi3/client/petstore/python/pom.xml
new file mode 100644
index 000000000000..2fa7d0a113f9
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/pom.xml
@@ -0,0 +1,46 @@
+
+ 4.0.0
+ org.openapitools
+ PythonOAS3PetstoreTests
+ pom
+ 1.0-SNAPSHOT
+ Python OpenAPI3 Petstore Client
+
+
+
+ maven-dependency-plugin
+
+
+ package
+
+ copy-dependencies
+
+
+ ${project.build.directory}
+
+
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.2.1
+
+
+ nose-test
+ integration-test
+
+ exec
+
+
+ make
+
+ test-all
+
+
+
+
+
+
+
+
diff --git a/samples/openapi3/client/petstore/python/requirements.txt b/samples/openapi3/client/petstore/python/requirements.txt
new file mode 100644
index 000000000000..bafdc07532f5
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/requirements.txt
@@ -0,0 +1,5 @@
+certifi >= 14.05.14
+six >= 1.10
+python_dateutil >= 2.5.3
+setuptools >= 21.0.0
+urllib3 >= 1.15.1
diff --git a/samples/openapi3/client/petstore/python/setup.py b/samples/openapi3/client/petstore/python/setup.py
new file mode 100644
index 000000000000..3cfa069e2047
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/setup.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from setuptools import setup, find_packages # noqa: H301
+
+NAME = "petstore-api"
+VERSION = "1.0.0"
+# To install the library, run the following
+#
+# python setup.py install
+#
+# prerequisite: setuptools
+# http://pypi.python.org/pypi/setuptools
+
+REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"]
+
+setup(
+ name=NAME,
+ version=VERSION,
+ description="OpenAPI Petstore",
+ author_email="",
+ url="",
+ keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"],
+ install_requires=REQUIRES,
+ packages=find_packages(),
+ include_package_data=True,
+ long_description="""\
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+ """
+)
diff --git a/samples/openapi3/client/petstore/python/test-requirements.txt b/samples/openapi3/client/petstore/python/test-requirements.txt
new file mode 100644
index 000000000000..2702246c0e6f
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test-requirements.txt
@@ -0,0 +1,5 @@
+coverage>=4.0.3
+nose>=1.3.7
+pluggy>=0.3.1
+py>=1.4.31
+randomize>=0.13
diff --git a/samples/openapi3/client/petstore/python/test/__init__.py b/samples/openapi3/client/petstore/python/test/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/samples/openapi3/client/petstore/python/test/test_additional_properties_class.py b/samples/openapi3/client/petstore/python/test/test_additional_properties_class.py
new file mode 100644
index 000000000000..fc9df3bbb505
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_additional_properties_class.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.additional_properties_class import AdditionalPropertiesClass # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestAdditionalPropertiesClass(unittest.TestCase):
+ """AdditionalPropertiesClass unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAdditionalPropertiesClass(self):
+ """Test AdditionalPropertiesClass"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.additional_properties_class.AdditionalPropertiesClass() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_animal.py b/samples/openapi3/client/petstore/python/test/test_animal.py
new file mode 100644
index 000000000000..179f1fbd0e52
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_animal.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.animal import Animal # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestAnimal(unittest.TestCase):
+ """Animal unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAnimal(self):
+ """Test Animal"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.animal.Animal() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_another_fake_api.py b/samples/openapi3/client/petstore/python/test/test_another_fake_api.py
new file mode 100644
index 000000000000..cbaac584faff
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_another_fake_api.py
@@ -0,0 +1,40 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.api.another_fake_api import AnotherFakeApi # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestAnotherFakeApi(unittest.TestCase):
+ """AnotherFakeApi unit test stubs"""
+
+ def setUp(self):
+ self.api = petstore_api.api.another_fake_api.AnotherFakeApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_call_123_test_special_tags(self):
+ """Test case for call_123_test_special_tags
+
+ To test special tags # noqa: E501
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_api_response.py b/samples/openapi3/client/petstore/python/test/test_api_response.py
new file mode 100644
index 000000000000..5031b458a0db
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_api_response.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.api_response import ApiResponse # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestApiResponse(unittest.TestCase):
+ """ApiResponse unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testApiResponse(self):
+ """Test ApiResponse"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.api_response.ApiResponse() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/test/test_array_of_array_of_number_only.py
new file mode 100644
index 000000000000..a02233045421
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_array_of_array_of_number_only.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestArrayOfArrayOfNumberOnly(unittest.TestCase):
+ """ArrayOfArrayOfNumberOnly unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testArrayOfArrayOfNumberOnly(self):
+ """Test ArrayOfArrayOfNumberOnly"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.array_of_array_of_number_only.ArrayOfArrayOfNumberOnly() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_array_of_number_only.py b/samples/openapi3/client/petstore/python/test/test_array_of_number_only.py
new file mode 100644
index 000000000000..1a928bf7d2e0
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_array_of_number_only.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.array_of_number_only import ArrayOfNumberOnly # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestArrayOfNumberOnly(unittest.TestCase):
+ """ArrayOfNumberOnly unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testArrayOfNumberOnly(self):
+ """Test ArrayOfNumberOnly"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.array_of_number_only.ArrayOfNumberOnly() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_array_test.py b/samples/openapi3/client/petstore/python/test/test_array_test.py
new file mode 100644
index 000000000000..c56b77b77ee3
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_array_test.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.array_test import ArrayTest # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestArrayTest(unittest.TestCase):
+ """ArrayTest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testArrayTest(self):
+ """Test ArrayTest"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.array_test.ArrayTest() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_capitalization.py b/samples/openapi3/client/petstore/python/test/test_capitalization.py
new file mode 100644
index 000000000000..2ae7725b3f09
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_capitalization.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.capitalization import Capitalization # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestCapitalization(unittest.TestCase):
+ """Capitalization unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testCapitalization(self):
+ """Test Capitalization"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.capitalization.Capitalization() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_cat.py b/samples/openapi3/client/petstore/python/test/test_cat.py
new file mode 100644
index 000000000000..5ebd7908d2db
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_cat.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.cat import Cat # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestCat(unittest.TestCase):
+ """Cat unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testCat(self):
+ """Test Cat"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.cat.Cat() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_category.py b/samples/openapi3/client/petstore/python/test/test_category.py
new file mode 100644
index 000000000000..6a592521281e
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_category.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.category import Category # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestCategory(unittest.TestCase):
+ """Category unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testCategory(self):
+ """Test Category"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.category.Category() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_class_model.py b/samples/openapi3/client/petstore/python/test/test_class_model.py
new file mode 100644
index 000000000000..12b7fb99402e
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_class_model.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.class_model import ClassModel # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestClassModel(unittest.TestCase):
+ """ClassModel unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testClassModel(self):
+ """Test ClassModel"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.class_model.ClassModel() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_client.py b/samples/openapi3/client/petstore/python/test/test_client.py
new file mode 100644
index 000000000000..9e18c4310d96
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_client.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.client import Client # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestClient(unittest.TestCase):
+ """Client unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testClient(self):
+ """Test Client"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.client.Client() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_configuration.py b/samples/openapi3/client/petstore/python/test/test_configuration.py
new file mode 100644
index 000000000000..e71080725e7d
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_configuration.py
@@ -0,0 +1,54 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api import Configuration # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestConfiguration(unittest.TestCase):
+ """Confgiruation unit test stubs"""
+
+ def setUp(self):
+ self.config= Configuration()
+
+ def tearDown(self):
+ pass
+
+ def test_configuration(self):
+ """Test configuration
+
+ Test host settings # noqa: E501
+ """
+ host_settings = self.config.get_host_settings()
+
+ self.assertEqual('http://{server}.swagger.io:{port}/v2', host_settings[0]['url'])
+ self.assertEqual('petstore', host_settings[0]['variables']['server']['default_value'])
+
+ self.assertEqual('https://localhost:8080/{version}', host_settings[1]['url'])
+ self.assertEqual('v2', host_settings[1]['variables']['version']['default_value'])
+
+ def test_get_host_from_settings(self):
+ """ Test get_host_from_settings
+
+ Test get URL from host settings
+ """
+ self.assertEqual("http://petstore.swagger.io:80/v2", self.config.get_host_from_settings(0))
+ self.assertEqual("http://petstore.swagger.io:8080/v2", self.config.get_host_from_settings(0, {'port': '8080'}))
+ self.assertEqual("http://dev-petstore.swagger.io:8080/v2", self.config.get_host_from_settings(0, {'server': 'dev-petstore', 'port': '8080'}))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_default_api.py b/samples/openapi3/client/petstore/python/test/test_default_api.py
new file mode 100644
index 000000000000..88bbfc6c8d36
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_default_api.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.api.default_api import DefaultApi # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestDefaultApi(unittest.TestCase):
+ """DefaultApi unit test stubs"""
+
+ def setUp(self):
+ self.api = petstore_api.api.default_api.DefaultApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_foo_get(self):
+ """Test case for foo_get
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_dog.py b/samples/openapi3/client/petstore/python/test/test_dog.py
new file mode 100644
index 000000000000..dc151f998ddd
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_dog.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.dog import Dog # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestDog(unittest.TestCase):
+ """Dog unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testDog(self):
+ """Test Dog"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.dog.Dog() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_enum_arrays.py b/samples/openapi3/client/petstore/python/test/test_enum_arrays.py
new file mode 100644
index 000000000000..be572508ef22
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_enum_arrays.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.enum_arrays import EnumArrays # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestEnumArrays(unittest.TestCase):
+ """EnumArrays unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testEnumArrays(self):
+ """Test EnumArrays"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.enum_arrays.EnumArrays() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_enum_class.py b/samples/openapi3/client/petstore/python/test/test_enum_class.py
new file mode 100644
index 000000000000..57eb14558a7d
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_enum_class.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.enum_class import EnumClass # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestEnumClass(unittest.TestCase):
+ """EnumClass unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testEnumClass(self):
+ """Test EnumClass"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.enum_class.EnumClass() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_enum_test.py b/samples/openapi3/client/petstore/python/test/test_enum_test.py
new file mode 100644
index 000000000000..ecd43afc709d
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_enum_test.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.enum_test import EnumTest # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestEnumTest(unittest.TestCase):
+ """EnumTest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testEnumTest(self):
+ """Test EnumTest"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.enum_test.EnumTest() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_fake_api.py b/samples/openapi3/client/petstore/python/test/test_fake_api.py
new file mode 100644
index 000000000000..fa14dc2247d0
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_fake_api.py
@@ -0,0 +1,111 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.api.fake_api import FakeApi # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestFakeApi(unittest.TestCase):
+ """FakeApi unit test stubs"""
+
+ def setUp(self):
+ self.api = petstore_api.api.fake_api.FakeApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_fake_outer_boolean_serialize(self):
+ """Test case for fake_outer_boolean_serialize
+
+ """
+ pass
+
+ def test_fake_outer_composite_serialize(self):
+ """Test case for fake_outer_composite_serialize
+
+ """
+ pass
+
+ def test_fake_outer_number_serialize(self):
+ """Test case for fake_outer_number_serialize
+
+ """
+ pass
+
+ def test_fake_outer_string_serialize(self):
+ """Test case for fake_outer_string_serialize
+
+ """
+ pass
+
+ def test_test_body_with_file_schema(self):
+ """Test case for test_body_with_file_schema
+
+ """
+ pass
+
+ def test_test_body_with_query_params(self):
+ """Test case for test_body_with_query_params
+
+ """
+ pass
+
+ def test_test_client_model(self):
+ """Test case for test_client_model
+
+ To test \"client\" model # noqa: E501
+ """
+ pass
+
+ def test_test_endpoint_parameters(self):
+ """Test case for test_endpoint_parameters
+
+ Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
+ """
+ pass
+
+ def test_test_enum_parameters(self):
+ """Test case for test_enum_parameters
+
+ To test enum parameters # noqa: E501
+ """
+ pass
+
+ def test_test_group_parameters(self):
+ """Test case for test_group_parameters
+
+ Fake endpoint to test group parameters (optional) # noqa: E501
+ """
+ pass
+
+ def test_test_inline_additional_properties(self):
+ """Test case for test_inline_additional_properties
+
+ test inline additionalProperties # noqa: E501
+ """
+ pass
+
+ def test_test_json_form_data(self):
+ """Test case for test_json_form_data
+
+ test json serialization of form data # noqa: E501
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_fake_classname_tags_123_api.py b/samples/openapi3/client/petstore/python/test/test_fake_classname_tags_123_api.py
new file mode 100644
index 000000000000..87cac0b9ef85
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_fake_classname_tags_123_api.py
@@ -0,0 +1,40 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.api.fake_classname_tags_123_api import FakeClassnameTags123Api # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestFakeClassnameTags123Api(unittest.TestCase):
+ """FakeClassnameTags123Api unit test stubs"""
+
+ def setUp(self):
+ self.api = petstore_api.api.fake_classname_tags_123_api.FakeClassnameTags123Api() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_test_classname(self):
+ """Test case for test_classname
+
+ To test class name in snake case # noqa: E501
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_file.py b/samples/openapi3/client/petstore/python/test/test_file.py
new file mode 100644
index 000000000000..cc32edb7b523
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_file.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.file import File # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestFile(unittest.TestCase):
+ """File unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testFile(self):
+ """Test File"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.file.File() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_file_schema_test_class.py b/samples/openapi3/client/petstore/python/test/test_file_schema_test_class.py
new file mode 100644
index 000000000000..91e1b6a1c745
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_file_schema_test_class.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.file_schema_test_class import FileSchemaTestClass # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestFileSchemaTestClass(unittest.TestCase):
+ """FileSchemaTestClass unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testFileSchemaTestClass(self):
+ """Test FileSchemaTestClass"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.file_schema_test_class.FileSchemaTestClass() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_foo.py b/samples/openapi3/client/petstore/python/test/test_foo.py
new file mode 100644
index 000000000000..8d986975233a
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_foo.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.foo import Foo # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestFoo(unittest.TestCase):
+ """Foo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testFoo(self):
+ """Test Foo"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.foo.Foo() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_format_test.py b/samples/openapi3/client/petstore/python/test/test_format_test.py
new file mode 100644
index 000000000000..46707c77b708
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_format_test.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.format_test import FormatTest # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestFormatTest(unittest.TestCase):
+ """FormatTest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testFormatTest(self):
+ """Test FormatTest"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.format_test.FormatTest() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_has_only_read_only.py b/samples/openapi3/client/petstore/python/test/test_has_only_read_only.py
new file mode 100644
index 000000000000..2dc052a328a0
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_has_only_read_only.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.has_only_read_only import HasOnlyReadOnly # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestHasOnlyReadOnly(unittest.TestCase):
+ """HasOnlyReadOnly unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testHasOnlyReadOnly(self):
+ """Test HasOnlyReadOnly"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.has_only_read_only.HasOnlyReadOnly() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_inline_object.py b/samples/openapi3/client/petstore/python/test/test_inline_object.py
new file mode 100644
index 000000000000..451ced9747e1
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_inline_object.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.inline_object import InlineObject # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestInlineObject(unittest.TestCase):
+ """InlineObject unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testInlineObject(self):
+ """Test InlineObject"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.inline_object.InlineObject() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_inline_object1.py b/samples/openapi3/client/petstore/python/test/test_inline_object1.py
new file mode 100644
index 000000000000..456bb7149949
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_inline_object1.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.inline_object1 import InlineObject1 # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestInlineObject1(unittest.TestCase):
+ """InlineObject1 unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testInlineObject1(self):
+ """Test InlineObject1"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.inline_object1.InlineObject1() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_inline_object2.py b/samples/openapi3/client/petstore/python/test/test_inline_object2.py
new file mode 100644
index 000000000000..5850ea434410
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_inline_object2.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.inline_object2 import InlineObject2 # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestInlineObject2(unittest.TestCase):
+ """InlineObject2 unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testInlineObject2(self):
+ """Test InlineObject2"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.inline_object2.InlineObject2() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_inline_object3.py b/samples/openapi3/client/petstore/python/test/test_inline_object3.py
new file mode 100644
index 000000000000..e134a4f1c125
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_inline_object3.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.inline_object3 import InlineObject3 # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestInlineObject3(unittest.TestCase):
+ """InlineObject3 unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testInlineObject3(self):
+ """Test InlineObject3"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.inline_object3.InlineObject3() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_inline_object4.py b/samples/openapi3/client/petstore/python/test/test_inline_object4.py
new file mode 100644
index 000000000000..ced0099fd677
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_inline_object4.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.inline_object4 import InlineObject4 # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestInlineObject4(unittest.TestCase):
+ """InlineObject4 unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testInlineObject4(self):
+ """Test InlineObject4"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.inline_object4.InlineObject4() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_inline_object5.py b/samples/openapi3/client/petstore/python/test/test_inline_object5.py
new file mode 100644
index 000000000000..2351766ca132
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_inline_object5.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.inline_object5 import InlineObject5 # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestInlineObject5(unittest.TestCase):
+ """InlineObject5 unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testInlineObject5(self):
+ """Test InlineObject5"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.inline_object5.InlineObject5() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_inline_response_default.py b/samples/openapi3/client/petstore/python/test/test_inline_response_default.py
new file mode 100644
index 000000000000..4d49ddb66bcd
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_inline_response_default.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.inline_response_default import InlineResponseDefault # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestInlineResponseDefault(unittest.TestCase):
+ """InlineResponseDefault unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testInlineResponseDefault(self):
+ """Test InlineResponseDefault"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.inline_response_default.InlineResponseDefault() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_list.py b/samples/openapi3/client/petstore/python/test/test_list.py
new file mode 100644
index 000000000000..a538a6b1ad36
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_list.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.list import List # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestList(unittest.TestCase):
+ """List unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testList(self):
+ """Test List"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.list.List() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_map_test.py b/samples/openapi3/client/petstore/python/test/test_map_test.py
new file mode 100644
index 000000000000..0ba6481903e6
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_map_test.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.map_test import MapTest # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestMapTest(unittest.TestCase):
+ """MapTest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testMapTest(self):
+ """Test MapTest"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.map_test.MapTest() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py
new file mode 100644
index 000000000000..8893bdaf44ee
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestMixedPropertiesAndAdditionalPropertiesClass(unittest.TestCase):
+ """MixedPropertiesAndAdditionalPropertiesClass unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testMixedPropertiesAndAdditionalPropertiesClass(self):
+ """Test MixedPropertiesAndAdditionalPropertiesClass"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.mixed_properties_and_additional_properties_class.MixedPropertiesAndAdditionalPropertiesClass() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_model200_response.py b/samples/openapi3/client/petstore/python/test/test_model200_response.py
new file mode 100644
index 000000000000..fab761f4edba
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_model200_response.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.model200_response import Model200Response # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestModel200Response(unittest.TestCase):
+ """Model200Response unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testModel200Response(self):
+ """Test Model200Response"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.model200_response.Model200Response() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_model_return.py b/samples/openapi3/client/petstore/python/test/test_model_return.py
new file mode 100644
index 000000000000..ae3f15ee6b83
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_model_return.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.model_return import ModelReturn # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestModelReturn(unittest.TestCase):
+ """ModelReturn unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testModelReturn(self):
+ """Test ModelReturn"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.model_return.ModelReturn() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_name.py b/samples/openapi3/client/petstore/python/test/test_name.py
new file mode 100644
index 000000000000..d6c72563991f
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_name.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.name import Name # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestName(unittest.TestCase):
+ """Name unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testName(self):
+ """Test Name"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.name.Name() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_number_only.py b/samples/openapi3/client/petstore/python/test/test_number_only.py
new file mode 100644
index 000000000000..7f6df65c8058
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_number_only.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.number_only import NumberOnly # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestNumberOnly(unittest.TestCase):
+ """NumberOnly unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testNumberOnly(self):
+ """Test NumberOnly"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.number_only.NumberOnly() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_order.py b/samples/openapi3/client/petstore/python/test/test_order.py
new file mode 100644
index 000000000000..3e7d517d5c79
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_order.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.order import Order # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestOrder(unittest.TestCase):
+ """Order unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testOrder(self):
+ """Test Order"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.order.Order() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_outer_composite.py b/samples/openapi3/client/petstore/python/test/test_outer_composite.py
new file mode 100644
index 000000000000..dcb078cd2164
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_outer_composite.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.outer_composite import OuterComposite # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestOuterComposite(unittest.TestCase):
+ """OuterComposite unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testOuterComposite(self):
+ """Test OuterComposite"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.outer_composite.OuterComposite() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_outer_enum.py b/samples/openapi3/client/petstore/python/test/test_outer_enum.py
new file mode 100644
index 000000000000..472e36e16821
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_outer_enum.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.outer_enum import OuterEnum # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestOuterEnum(unittest.TestCase):
+ """OuterEnum unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testOuterEnum(self):
+ """Test OuterEnum"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.outer_enum.OuterEnum() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_pet.py b/samples/openapi3/client/petstore/python/test/test_pet.py
new file mode 100644
index 000000000000..bc5cc30fac0d
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_pet.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.pet import Pet # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestPet(unittest.TestCase):
+ """Pet unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testPet(self):
+ """Test Pet"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.pet.Pet() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_pet_api.py b/samples/openapi3/client/petstore/python/test/test_pet_api.py
new file mode 100644
index 000000000000..c4437f6217a9
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_pet_api.py
@@ -0,0 +1,96 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.api.pet_api import PetApi # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestPetApi(unittest.TestCase):
+ """PetApi unit test stubs"""
+
+ def setUp(self):
+ self.api = petstore_api.api.pet_api.PetApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_add_pet(self):
+ """Test case for add_pet
+
+ Add a new pet to the store # noqa: E501
+ """
+ pass
+
+ def test_delete_pet(self):
+ """Test case for delete_pet
+
+ Deletes a pet # noqa: E501
+ """
+ pass
+
+ def test_find_pets_by_status(self):
+ """Test case for find_pets_by_status
+
+ Finds Pets by status # noqa: E501
+ """
+ pass
+
+ def test_find_pets_by_tags(self):
+ """Test case for find_pets_by_tags
+
+ Finds Pets by tags # noqa: E501
+ """
+ pass
+
+ def test_get_pet_by_id(self):
+ """Test case for get_pet_by_id
+
+ Find pet by ID # noqa: E501
+ """
+ pass
+
+ def test_update_pet(self):
+ """Test case for update_pet
+
+ Update an existing pet # noqa: E501
+ """
+ pass
+
+ def test_update_pet_with_form(self):
+ """Test case for update_pet_with_form
+
+ Updates a pet in the store with form data # noqa: E501
+ """
+ pass
+
+ def test_upload_file(self):
+ """Test case for upload_file
+
+ uploads an image # noqa: E501
+ """
+ pass
+
+ def test_upload_file_with_required_file(self):
+ """Test case for upload_file_with_required_file
+
+ uploads an image (required) # noqa: E501
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_read_only_first.py b/samples/openapi3/client/petstore/python/test/test_read_only_first.py
new file mode 100644
index 000000000000..2b647b83fc89
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_read_only_first.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.read_only_first import ReadOnlyFirst # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestReadOnlyFirst(unittest.TestCase):
+ """ReadOnlyFirst unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testReadOnlyFirst(self):
+ """Test ReadOnlyFirst"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.read_only_first.ReadOnlyFirst() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_special_model_name.py b/samples/openapi3/client/petstore/python/test/test_special_model_name.py
new file mode 100644
index 000000000000..4edfec164f7d
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_special_model_name.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.special_model_name import SpecialModelName # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestSpecialModelName(unittest.TestCase):
+ """SpecialModelName unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testSpecialModelName(self):
+ """Test SpecialModelName"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.special_model_name.SpecialModelName() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_store_api.py b/samples/openapi3/client/petstore/python/test/test_store_api.py
new file mode 100644
index 000000000000..37bf771d13a6
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_store_api.py
@@ -0,0 +1,61 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.api.store_api import StoreApi # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestStoreApi(unittest.TestCase):
+ """StoreApi unit test stubs"""
+
+ def setUp(self):
+ self.api = petstore_api.api.store_api.StoreApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_delete_order(self):
+ """Test case for delete_order
+
+ Delete purchase order by ID # noqa: E501
+ """
+ pass
+
+ def test_get_inventory(self):
+ """Test case for get_inventory
+
+ Returns pet inventories by status # noqa: E501
+ """
+ pass
+
+ def test_get_order_by_id(self):
+ """Test case for get_order_by_id
+
+ Find purchase order by ID # noqa: E501
+ """
+ pass
+
+ def test_place_order(self):
+ """Test case for place_order
+
+ Place an order for a pet # noqa: E501
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_tag.py b/samples/openapi3/client/petstore/python/test/test_tag.py
new file mode 100644
index 000000000000..2c3c5157e718
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_tag.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.tag import Tag # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestTag(unittest.TestCase):
+ """Tag unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testTag(self):
+ """Test Tag"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.tag.Tag() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_user.py b/samples/openapi3/client/petstore/python/test/test_user.py
new file mode 100644
index 000000000000..ad9386b6908e
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_user.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.models.user import User # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestUser(unittest.TestCase):
+ """User unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testUser(self):
+ """Test User"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = petstore_api.models.user.User() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test/test_user_api.py b/samples/openapi3/client/petstore/python/test/test_user_api.py
new file mode 100644
index 000000000000..6e8aed4f18c7
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_user_api.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ OpenAPI spec version: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.api.user_api import UserApi # noqa: E501
+from petstore_api.rest import ApiException
+
+
+class TestUserApi(unittest.TestCase):
+ """UserApi unit test stubs"""
+
+ def setUp(self):
+ self.api = petstore_api.api.user_api.UserApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_create_user(self):
+ """Test case for create_user
+
+ Create user # noqa: E501
+ """
+ pass
+
+ def test_create_users_with_array_input(self):
+ """Test case for create_users_with_array_input
+
+ Creates list of users with given input array # noqa: E501
+ """
+ pass
+
+ def test_create_users_with_list_input(self):
+ """Test case for create_users_with_list_input
+
+ Creates list of users with given input array # noqa: E501
+ """
+ pass
+
+ def test_delete_user(self):
+ """Test case for delete_user
+
+ Delete user # noqa: E501
+ """
+ pass
+
+ def test_get_user_by_name(self):
+ """Test case for get_user_by_name
+
+ Get user by user name # noqa: E501
+ """
+ pass
+
+ def test_login_user(self):
+ """Test case for login_user
+
+ Logs user into the system # noqa: E501
+ """
+ pass
+
+ def test_logout_user(self):
+ """Test case for logout_user
+
+ Logs out current logged in user session # noqa: E501
+ """
+ pass
+
+ def test_update_user(self):
+ """Test case for update_user
+
+ Updated user # noqa: E501
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/test_python2.sh b/samples/openapi3/client/petstore/python/test_python2.sh
new file mode 100644
index 000000000000..fb0eaed6ffa0
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test_python2.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+REQUIREMENTS_FILE=dev-requirements.txt
+REQUIREMENTS_OUT=dev-requirements.txt.log
+SETUP_OUT=*.egg-info
+VENV=.venv
+DEACTIVE=false
+
+export LC_ALL=en_US.UTF-8
+export LANG=en_US.UTF-8
+
+### set virtualenv
+if [ -z "$VIRTUAL_ENV" ]; then
+ virtualenv $VENV --no-site-packages --always-copy
+ source $VENV/bin/activate
+ DEACTIVE=true
+fi
+
+### install dependencies
+pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
+python setup.py develop
+
+### run tests
+nosetests || exit 1
+
+### static analysis of code
+flake8 --show-source petstore_api/
+
+### deactivate virtualenv
+#if [ $DEACTIVE == true ]; then
+# deactivate
+#fi
+
diff --git a/samples/openapi3/client/petstore/python/test_python2_and_3.sh b/samples/openapi3/client/petstore/python/test_python2_and_3.sh
new file mode 100644
index 000000000000..daf08d5bacba
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test_python2_and_3.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+REQUIREMENTS_FILE=dev-requirements.txt
+REQUIREMENTS_OUT=dev-requirements.txt.log
+SETUP_OUT=*.egg-info
+VENV=.venv
+DEACTIVE=false
+
+export LC_ALL=en_US.UTF-8
+export LANG=en_US.UTF-8
+
+### set virtualenv
+if [ -z "$VIRTUAL_ENV" ]; then
+ virtualenv $VENV --no-site-packages --always-copy
+ source $VENV/bin/activate
+ DEACTIVE=true
+fi
+
+### install dependencies
+pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
+python setup.py develop
+
+### run tests
+tox || exit 1
+
+### static analysis of code
+#flake8 --show-source petstore_api/
+
+### deactivate virtualenv
+#if [ $DEACTIVE == true ]; then
+# deactivate
+#fi
diff --git a/samples/openapi3/client/petstore/python/tox.ini b/samples/openapi3/client/petstore/python/tox.ini
new file mode 100644
index 000000000000..3d0be613cfc7
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/tox.ini
@@ -0,0 +1,10 @@
+[tox]
+envlist = py27, py3
+
+[testenv]
+deps=-r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
+
+commands=
+ nosetests \
+ []