forked from loafle/openapi-generator-original
[Spec] adds XmlItem model and route for xml testing (#1883)
* Adds xmlitem model and route, rest-assured Api suffix fix, updates pytest and pytest-cov versions * Adds python client sample files * Adds samples update * Adds rest-assured sample client update * Adds sample updates in ensure-up-to-date * Changes rest-assured files back to master version, removes fix for issue #13 * Updates samples
This commit is contained in:
committed by
William Cheng
parent
65d9e859be
commit
9ec594eec5
@@ -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)
|
||||
@@ -71,6 +71,7 @@ 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
|
||||
*FakeApi* | [**create_xml_item**](docs/FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||
*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 |
|
||||
@@ -142,7 +143,10 @@ 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)
|
||||
- [XmlItem](docs/XmlItem.md)
|
||||
|
||||
|
||||
## Documentation For Authorization
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**create_xml_item**](FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||
[**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 |
|
||||
@@ -18,6 +19,53 @@ Method | HTTP request | Description
|
||||
[**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
# **create_xml_item**
|
||||
> create_xml_item(xml_item)
|
||||
|
||||
creates an XmlItem
|
||||
|
||||
this route creates an XmlItem
|
||||
|
||||
### 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()
|
||||
xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body
|
||||
|
||||
try:
|
||||
# creates an XmlItem
|
||||
api_instance.create_xml_item(xml_item)
|
||||
except ApiException as e:
|
||||
print("Exception when calling FakeApi->create_xml_item: %s\n" % e)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**xml_item** | [**XmlItem**](XmlItem.md)| XmlItem Body |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
|
||||
- **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)
|
||||
|
||||
# **fake_outer_boolean_serialize**
|
||||
> bool fake_outer_boolean_serialize(body=body)
|
||||
|
||||
@@ -66,7 +114,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 +130,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 +143,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 +255,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 +271,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 +283,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**file_schema_test_class** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -253,7 +301,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 +316,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 +329,7 @@ except ApiException as e:
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**query** | **str**| |
|
||||
**user** | [**User**](User.md)| |
|
||||
**body** | [**User**](User.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -299,7 +347,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 +363,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 +377,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
**body** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -545,7 +593,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 +607,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 +620,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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -32,11 +32,11 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration))
|
||||
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 +46,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
**body** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -16,7 +16,7 @@ Method | HTTP request | Description
|
||||
|
||||
|
||||
# **add_pet**
|
||||
> add_pet(pet)
|
||||
> add_pet(body)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
@@ -36,11 +36,11 @@ 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 +49,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
|
||||
|
||||
@@ -284,7 +284,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
|
||||
|
||||
@@ -304,11 +304,11 @@ 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 +317,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
|
||||
|
||||
|
||||
@@ -158,7 +158,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 +172,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 +186,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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
38
samples/client/petstore/python-asyncio/docs/XmlItem.md
Normal file
38
samples/client/petstore/python-asyncio/docs/XmlItem.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# XmlItem
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**attribute_string** | **str** | | [optional] [default to 'string']
|
||||
**attribute_number** | **float** | | [optional] [default to 1.234]
|
||||
**attribute_integer** | **int** | | [optional] [default to -2]
|
||||
**attribute_boolean** | **bool** | | [optional] [default to True]
|
||||
**wrapped_array** | **list[int]** | | [optional]
|
||||
**name_string** | **str** | | [optional] [default to 'string']
|
||||
**name_number** | **float** | | [optional] [default to 1.234]
|
||||
**name_integer** | **int** | | [optional] [default to -2]
|
||||
**name_boolean** | **bool** | | [optional] [default to True]
|
||||
**name_array** | **list[int]** | | [optional]
|
||||
**name_wrapped_array** | **list[int]** | | [optional]
|
||||
**prefix_string** | **str** | | [optional] [default to 'string']
|
||||
**prefix_number** | **float** | | [optional] [default to 1.234]
|
||||
**prefix_integer** | **int** | | [optional] [default to -2]
|
||||
**prefix_boolean** | **bool** | | [optional] [default to True]
|
||||
**prefix_array** | **list[int]** | | [optional]
|
||||
**prefix_wrapped_array** | **list[int]** | | [optional]
|
||||
**namespace_string** | **str** | | [optional] [default to 'string']
|
||||
**namespace_number** | **float** | | [optional] [default to 1.234]
|
||||
**namespace_integer** | **int** | | [optional] [default to -2]
|
||||
**namespace_boolean** | **bool** | | [optional] [default to True]
|
||||
**namespace_array** | **list[int]** | | [optional]
|
||||
**namespace_wrapped_array** | **list[int]** | | [optional]
|
||||
**prefix_ns_string** | **str** | | [optional] [default to 'string']
|
||||
**prefix_ns_number** | **float** | | [optional] [default to 1.234]
|
||||
**prefix_ns_integer** | **int** | | [optional] [default to -2]
|
||||
**prefix_ns_boolean** | **bool** | | [optional] [default to True]
|
||||
**prefix_ns_array** | **list[int]** | | [optional]
|
||||
**prefix_ns_wrapped_array** | **list[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)
|
||||
|
||||
|
||||
@@ -61,4 +61,7 @@ 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.type_holder_default import TypeHolderDefault
|
||||
from petstore_api.models.type_holder_example import TypeHolderExample
|
||||
from petstore_api.models.user import User
|
||||
from petstore_api.models.xml_item import XmlItem
|
||||
|
||||
@@ -32,39 +32,39 @@ class AnotherFakeApi(object):
|
||||
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 @@ class AnotherFakeApi(object):
|
||||
|
||||
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 @@ class AnotherFakeApi(object):
|
||||
)
|
||||
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 @@ class AnotherFakeApi(object):
|
||||
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
|
||||
|
||||
@@ -32,6 +32,102 @@ class FakeApi(object):
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def create_xml_item(self, xml_item, **kwargs): # noqa: E501
|
||||
"""creates an XmlItem # noqa: E501
|
||||
|
||||
this route creates an XmlItem # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.create_xml_item(xml_item, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param XmlItem xml_item: XmlItem 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.create_xml_item_with_http_info(xml_item, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.create_xml_item_with_http_info(xml_item, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501
|
||||
"""creates an XmlItem # noqa: E501
|
||||
|
||||
this route creates an XmlItem # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.create_xml_item_with_http_info(xml_item, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param XmlItem xml_item: XmlItem Body (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
local_var_params = locals()
|
||||
|
||||
all_params = ['xml_item'] # 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_xml_item" % key
|
||||
)
|
||||
local_var_params[key] = val
|
||||
del local_var_params['kwargs']
|
||||
# verify the required parameter 'xml_item' is set
|
||||
if ('xml_item' not in local_var_params or
|
||||
local_var_params['xml_item'] is None):
|
||||
raise ValueError("Missing the required parameter `xml_item` when calling `create_xml_item`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'xml_item' in local_var_params:
|
||||
body_params = local_var_params['xml_item']
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/xml', 'application/xml; charset=utf-8', 'application/xml; charset=utf-16', 'text/xml', 'text/xml; charset=utf-8', 'text/xml; charset=utf-16']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = [] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/fake/create_xml_item', '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 fake_outer_boolean_serialize(self, **kwargs): # noqa: E501
|
||||
"""fake_outer_boolean_serialize # noqa: E501
|
||||
|
||||
@@ -134,7 +230,7 @@ class FakeApi(object):
|
||||
>>> 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 +252,7 @@ class FakeApi(object):
|
||||
>>> 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 +260,7 @@ class FakeApi(object):
|
||||
|
||||
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 +287,8 @@ class FakeApi(object):
|
||||
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 +496,39 @@ class FakeApi(object):
|
||||
_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 +536,7 @@ class FakeApi(object):
|
||||
|
||||
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 +550,10 @@ class FakeApi(object):
|
||||
)
|
||||
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 +567,8 @@ class FakeApi(object):
|
||||
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 +592,39 @@ class FakeApi(object):
|
||||
_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 +632,7 @@ class FakeApi(object):
|
||||
|
||||
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 +650,10 @@ class FakeApi(object):
|
||||
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 +669,8 @@ class FakeApi(object):
|
||||
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 +694,39 @@ class FakeApi(object):
|
||||
_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 +734,7 @@ class FakeApi(object):
|
||||
|
||||
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 +748,10 @@ class FakeApi(object):
|
||||
)
|
||||
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 +765,8 @@ class FakeApi(object):
|
||||
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 +1225,37 @@ class FakeApi(object):
|
||||
_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 +1263,7 @@ class FakeApi(object):
|
||||
|
||||
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 +1277,10 @@ class FakeApi(object):
|
||||
)
|
||||
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 +1294,8 @@ class FakeApi(object):
|
||||
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
|
||||
|
||||
@@ -32,39 +32,39 @@ class FakeClassnameTags123Api(object):
|
||||
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 @@ class FakeClassnameTags123Api(object):
|
||||
|
||||
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 @@ class FakeClassnameTags123Api(object):
|
||||
)
|
||||
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 @@ class FakeClassnameTags123Api(object):
|
||||
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
|
||||
|
||||
@@ -32,37 +32,37 @@ class PetApi(object):
|
||||
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 @@ class PetApi(object):
|
||||
|
||||
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 @@ class PetApi(object):
|
||||
)
|
||||
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 @@ class PetApi(object):
|
||||
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 @@ class PetApi(object):
|
||||
_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 @@ class PetApi(object):
|
||||
|
||||
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 @@ class PetApi(object):
|
||||
)
|
||||
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 @@ class PetApi(object):
|
||||
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
|
||||
|
||||
@@ -312,37 +312,37 @@ class StoreApi(object):
|
||||
_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 @@ class StoreApi(object):
|
||||
|
||||
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 @@ class StoreApi(object):
|
||||
)
|
||||
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 @@ class StoreApi(object):
|
||||
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
|
||||
|
||||
@@ -32,39 +32,39 @@ class UserApi(object):
|
||||
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 @@ class UserApi(object):
|
||||
|
||||
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 @@ class UserApi(object):
|
||||
)
|
||||
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 @@ class UserApi(object):
|
||||
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 @@ class UserApi(object):
|
||||
_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 @@ class UserApi(object):
|
||||
|
||||
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 @@ class UserApi(object):
|
||||
)
|
||||
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 @@ class UserApi(object):
|
||||
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 @@ class UserApi(object):
|
||||
_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 @@ class UserApi(object):
|
||||
|
||||
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 @@ class UserApi(object):
|
||||
)
|
||||
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 @@ class UserApi(object):
|
||||
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 @@ class UserApi(object):
|
||||
_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 @@ class UserApi(object):
|
||||
|
||||
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 @@ class UserApi(object):
|
||||
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 @@ class UserApi(object):
|
||||
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
|
||||
|
||||
|
||||
@@ -47,4 +47,7 @@ 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.type_holder_default import TypeHolderDefault
|
||||
from petstore_api.models.type_holder_example import TypeHolderExample
|
||||
from petstore_api.models.user import User
|
||||
from petstore_api.models.xml_item import XmlItem
|
||||
|
||||
@@ -50,7 +50,7 @@ class Animal(object):
|
||||
|
||||
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 @@ class Animal(object):
|
||||
|
||||
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):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -0,0 +1,840 @@
|
||||
# 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 XmlItem(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 = {
|
||||
'attribute_string': 'str',
|
||||
'attribute_number': 'float',
|
||||
'attribute_integer': 'int',
|
||||
'attribute_boolean': 'bool',
|
||||
'wrapped_array': 'list[int]',
|
||||
'name_string': 'str',
|
||||
'name_number': 'float',
|
||||
'name_integer': 'int',
|
||||
'name_boolean': 'bool',
|
||||
'name_array': 'list[int]',
|
||||
'name_wrapped_array': 'list[int]',
|
||||
'prefix_string': 'str',
|
||||
'prefix_number': 'float',
|
||||
'prefix_integer': 'int',
|
||||
'prefix_boolean': 'bool',
|
||||
'prefix_array': 'list[int]',
|
||||
'prefix_wrapped_array': 'list[int]',
|
||||
'namespace_string': 'str',
|
||||
'namespace_number': 'float',
|
||||
'namespace_integer': 'int',
|
||||
'namespace_boolean': 'bool',
|
||||
'namespace_array': 'list[int]',
|
||||
'namespace_wrapped_array': 'list[int]',
|
||||
'prefix_ns_string': 'str',
|
||||
'prefix_ns_number': 'float',
|
||||
'prefix_ns_integer': 'int',
|
||||
'prefix_ns_boolean': 'bool',
|
||||
'prefix_ns_array': 'list[int]',
|
||||
'prefix_ns_wrapped_array': 'list[int]'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'attribute_string': 'attribute_string',
|
||||
'attribute_number': 'attribute_number',
|
||||
'attribute_integer': 'attribute_integer',
|
||||
'attribute_boolean': 'attribute_boolean',
|
||||
'wrapped_array': 'wrapped_array',
|
||||
'name_string': 'name_string',
|
||||
'name_number': 'name_number',
|
||||
'name_integer': 'name_integer',
|
||||
'name_boolean': 'name_boolean',
|
||||
'name_array': 'name_array',
|
||||
'name_wrapped_array': 'name_wrapped_array',
|
||||
'prefix_string': 'prefix_string',
|
||||
'prefix_number': 'prefix_number',
|
||||
'prefix_integer': 'prefix_integer',
|
||||
'prefix_boolean': 'prefix_boolean',
|
||||
'prefix_array': 'prefix_array',
|
||||
'prefix_wrapped_array': 'prefix_wrapped_array',
|
||||
'namespace_string': 'namespace_string',
|
||||
'namespace_number': 'namespace_number',
|
||||
'namespace_integer': 'namespace_integer',
|
||||
'namespace_boolean': 'namespace_boolean',
|
||||
'namespace_array': 'namespace_array',
|
||||
'namespace_wrapped_array': 'namespace_wrapped_array',
|
||||
'prefix_ns_string': 'prefix_ns_string',
|
||||
'prefix_ns_number': 'prefix_ns_number',
|
||||
'prefix_ns_integer': 'prefix_ns_integer',
|
||||
'prefix_ns_boolean': 'prefix_ns_boolean',
|
||||
'prefix_ns_array': 'prefix_ns_array',
|
||||
'prefix_ns_wrapped_array': 'prefix_ns_wrapped_array'
|
||||
}
|
||||
|
||||
def __init__(self, attribute_string='string', attribute_number=1.234, attribute_integer=-2, attribute_boolean=True, wrapped_array=None, name_string='string', name_number=1.234, name_integer=-2, name_boolean=True, name_array=None, name_wrapped_array=None, prefix_string='string', prefix_number=1.234, prefix_integer=-2, prefix_boolean=True, prefix_array=None, prefix_wrapped_array=None, namespace_string='string', namespace_number=1.234, namespace_integer=-2, namespace_boolean=True, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string='string', prefix_ns_number=1.234, prefix_ns_integer=-2, prefix_ns_boolean=True, prefix_ns_array=None, prefix_ns_wrapped_array=None): # noqa: E501
|
||||
"""XmlItem - a model defined in OpenAPI""" # noqa: E501
|
||||
|
||||
self._attribute_string = None
|
||||
self._attribute_number = None
|
||||
self._attribute_integer = None
|
||||
self._attribute_boolean = None
|
||||
self._wrapped_array = None
|
||||
self._name_string = None
|
||||
self._name_number = None
|
||||
self._name_integer = None
|
||||
self._name_boolean = None
|
||||
self._name_array = None
|
||||
self._name_wrapped_array = None
|
||||
self._prefix_string = None
|
||||
self._prefix_number = None
|
||||
self._prefix_integer = None
|
||||
self._prefix_boolean = None
|
||||
self._prefix_array = None
|
||||
self._prefix_wrapped_array = None
|
||||
self._namespace_string = None
|
||||
self._namespace_number = None
|
||||
self._namespace_integer = None
|
||||
self._namespace_boolean = None
|
||||
self._namespace_array = None
|
||||
self._namespace_wrapped_array = None
|
||||
self._prefix_ns_string = None
|
||||
self._prefix_ns_number = None
|
||||
self._prefix_ns_integer = None
|
||||
self._prefix_ns_boolean = None
|
||||
self._prefix_ns_array = None
|
||||
self._prefix_ns_wrapped_array = None
|
||||
self.discriminator = None
|
||||
|
||||
if attribute_string is not None:
|
||||
self.attribute_string = attribute_string
|
||||
if attribute_number is not None:
|
||||
self.attribute_number = attribute_number
|
||||
if attribute_integer is not None:
|
||||
self.attribute_integer = attribute_integer
|
||||
if attribute_boolean is not None:
|
||||
self.attribute_boolean = attribute_boolean
|
||||
if wrapped_array is not None:
|
||||
self.wrapped_array = wrapped_array
|
||||
if name_string is not None:
|
||||
self.name_string = name_string
|
||||
if name_number is not None:
|
||||
self.name_number = name_number
|
||||
if name_integer is not None:
|
||||
self.name_integer = name_integer
|
||||
if name_boolean is not None:
|
||||
self.name_boolean = name_boolean
|
||||
if name_array is not None:
|
||||
self.name_array = name_array
|
||||
if name_wrapped_array is not None:
|
||||
self.name_wrapped_array = name_wrapped_array
|
||||
if prefix_string is not None:
|
||||
self.prefix_string = prefix_string
|
||||
if prefix_number is not None:
|
||||
self.prefix_number = prefix_number
|
||||
if prefix_integer is not None:
|
||||
self.prefix_integer = prefix_integer
|
||||
if prefix_boolean is not None:
|
||||
self.prefix_boolean = prefix_boolean
|
||||
if prefix_array is not None:
|
||||
self.prefix_array = prefix_array
|
||||
if prefix_wrapped_array is not None:
|
||||
self.prefix_wrapped_array = prefix_wrapped_array
|
||||
if namespace_string is not None:
|
||||
self.namespace_string = namespace_string
|
||||
if namespace_number is not None:
|
||||
self.namespace_number = namespace_number
|
||||
if namespace_integer is not None:
|
||||
self.namespace_integer = namespace_integer
|
||||
if namespace_boolean is not None:
|
||||
self.namespace_boolean = namespace_boolean
|
||||
if namespace_array is not None:
|
||||
self.namespace_array = namespace_array
|
||||
if namespace_wrapped_array is not None:
|
||||
self.namespace_wrapped_array = namespace_wrapped_array
|
||||
if prefix_ns_string is not None:
|
||||
self.prefix_ns_string = prefix_ns_string
|
||||
if prefix_ns_number is not None:
|
||||
self.prefix_ns_number = prefix_ns_number
|
||||
if prefix_ns_integer is not None:
|
||||
self.prefix_ns_integer = prefix_ns_integer
|
||||
if prefix_ns_boolean is not None:
|
||||
self.prefix_ns_boolean = prefix_ns_boolean
|
||||
if prefix_ns_array is not None:
|
||||
self.prefix_ns_array = prefix_ns_array
|
||||
if prefix_ns_wrapped_array is not None:
|
||||
self.prefix_ns_wrapped_array = prefix_ns_wrapped_array
|
||||
|
||||
@property
|
||||
def attribute_string(self):
|
||||
"""Gets the attribute_string of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The attribute_string of this XmlItem. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._attribute_string
|
||||
|
||||
@attribute_string.setter
|
||||
def attribute_string(self, attribute_string):
|
||||
"""Sets the attribute_string of this XmlItem.
|
||||
|
||||
|
||||
:param attribute_string: The attribute_string of this XmlItem. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._attribute_string = attribute_string
|
||||
|
||||
@property
|
||||
def attribute_number(self):
|
||||
"""Gets the attribute_number of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The attribute_number of this XmlItem. # noqa: E501
|
||||
:rtype: float
|
||||
"""
|
||||
return self._attribute_number
|
||||
|
||||
@attribute_number.setter
|
||||
def attribute_number(self, attribute_number):
|
||||
"""Sets the attribute_number of this XmlItem.
|
||||
|
||||
|
||||
:param attribute_number: The attribute_number of this XmlItem. # noqa: E501
|
||||
:type: float
|
||||
"""
|
||||
|
||||
self._attribute_number = attribute_number
|
||||
|
||||
@property
|
||||
def attribute_integer(self):
|
||||
"""Gets the attribute_integer of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The attribute_integer of this XmlItem. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._attribute_integer
|
||||
|
||||
@attribute_integer.setter
|
||||
def attribute_integer(self, attribute_integer):
|
||||
"""Sets the attribute_integer of this XmlItem.
|
||||
|
||||
|
||||
:param attribute_integer: The attribute_integer of this XmlItem. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._attribute_integer = attribute_integer
|
||||
|
||||
@property
|
||||
def attribute_boolean(self):
|
||||
"""Gets the attribute_boolean of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The attribute_boolean of this XmlItem. # noqa: E501
|
||||
:rtype: bool
|
||||
"""
|
||||
return self._attribute_boolean
|
||||
|
||||
@attribute_boolean.setter
|
||||
def attribute_boolean(self, attribute_boolean):
|
||||
"""Sets the attribute_boolean of this XmlItem.
|
||||
|
||||
|
||||
:param attribute_boolean: The attribute_boolean of this XmlItem. # noqa: E501
|
||||
:type: bool
|
||||
"""
|
||||
|
||||
self._attribute_boolean = attribute_boolean
|
||||
|
||||
@property
|
||||
def wrapped_array(self):
|
||||
"""Gets the wrapped_array of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The wrapped_array of this XmlItem. # noqa: E501
|
||||
:rtype: list[int]
|
||||
"""
|
||||
return self._wrapped_array
|
||||
|
||||
@wrapped_array.setter
|
||||
def wrapped_array(self, wrapped_array):
|
||||
"""Sets the wrapped_array of this XmlItem.
|
||||
|
||||
|
||||
:param wrapped_array: The wrapped_array of this XmlItem. # noqa: E501
|
||||
:type: list[int]
|
||||
"""
|
||||
|
||||
self._wrapped_array = wrapped_array
|
||||
|
||||
@property
|
||||
def name_string(self):
|
||||
"""Gets the name_string of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The name_string of this XmlItem. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._name_string
|
||||
|
||||
@name_string.setter
|
||||
def name_string(self, name_string):
|
||||
"""Sets the name_string of this XmlItem.
|
||||
|
||||
|
||||
:param name_string: The name_string of this XmlItem. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._name_string = name_string
|
||||
|
||||
@property
|
||||
def name_number(self):
|
||||
"""Gets the name_number of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The name_number of this XmlItem. # noqa: E501
|
||||
:rtype: float
|
||||
"""
|
||||
return self._name_number
|
||||
|
||||
@name_number.setter
|
||||
def name_number(self, name_number):
|
||||
"""Sets the name_number of this XmlItem.
|
||||
|
||||
|
||||
:param name_number: The name_number of this XmlItem. # noqa: E501
|
||||
:type: float
|
||||
"""
|
||||
|
||||
self._name_number = name_number
|
||||
|
||||
@property
|
||||
def name_integer(self):
|
||||
"""Gets the name_integer of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The name_integer of this XmlItem. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._name_integer
|
||||
|
||||
@name_integer.setter
|
||||
def name_integer(self, name_integer):
|
||||
"""Sets the name_integer of this XmlItem.
|
||||
|
||||
|
||||
:param name_integer: The name_integer of this XmlItem. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._name_integer = name_integer
|
||||
|
||||
@property
|
||||
def name_boolean(self):
|
||||
"""Gets the name_boolean of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The name_boolean of this XmlItem. # noqa: E501
|
||||
:rtype: bool
|
||||
"""
|
||||
return self._name_boolean
|
||||
|
||||
@name_boolean.setter
|
||||
def name_boolean(self, name_boolean):
|
||||
"""Sets the name_boolean of this XmlItem.
|
||||
|
||||
|
||||
:param name_boolean: The name_boolean of this XmlItem. # noqa: E501
|
||||
:type: bool
|
||||
"""
|
||||
|
||||
self._name_boolean = name_boolean
|
||||
|
||||
@property
|
||||
def name_array(self):
|
||||
"""Gets the name_array of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The name_array of this XmlItem. # noqa: E501
|
||||
:rtype: list[int]
|
||||
"""
|
||||
return self._name_array
|
||||
|
||||
@name_array.setter
|
||||
def name_array(self, name_array):
|
||||
"""Sets the name_array of this XmlItem.
|
||||
|
||||
|
||||
:param name_array: The name_array of this XmlItem. # noqa: E501
|
||||
:type: list[int]
|
||||
"""
|
||||
|
||||
self._name_array = name_array
|
||||
|
||||
@property
|
||||
def name_wrapped_array(self):
|
||||
"""Gets the name_wrapped_array of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The name_wrapped_array of this XmlItem. # noqa: E501
|
||||
:rtype: list[int]
|
||||
"""
|
||||
return self._name_wrapped_array
|
||||
|
||||
@name_wrapped_array.setter
|
||||
def name_wrapped_array(self, name_wrapped_array):
|
||||
"""Sets the name_wrapped_array of this XmlItem.
|
||||
|
||||
|
||||
:param name_wrapped_array: The name_wrapped_array of this XmlItem. # noqa: E501
|
||||
:type: list[int]
|
||||
"""
|
||||
|
||||
self._name_wrapped_array = name_wrapped_array
|
||||
|
||||
@property
|
||||
def prefix_string(self):
|
||||
"""Gets the prefix_string of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The prefix_string of this XmlItem. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._prefix_string
|
||||
|
||||
@prefix_string.setter
|
||||
def prefix_string(self, prefix_string):
|
||||
"""Sets the prefix_string of this XmlItem.
|
||||
|
||||
|
||||
:param prefix_string: The prefix_string of this XmlItem. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._prefix_string = prefix_string
|
||||
|
||||
@property
|
||||
def prefix_number(self):
|
||||
"""Gets the prefix_number of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The prefix_number of this XmlItem. # noqa: E501
|
||||
:rtype: float
|
||||
"""
|
||||
return self._prefix_number
|
||||
|
||||
@prefix_number.setter
|
||||
def prefix_number(self, prefix_number):
|
||||
"""Sets the prefix_number of this XmlItem.
|
||||
|
||||
|
||||
:param prefix_number: The prefix_number of this XmlItem. # noqa: E501
|
||||
:type: float
|
||||
"""
|
||||
|
||||
self._prefix_number = prefix_number
|
||||
|
||||
@property
|
||||
def prefix_integer(self):
|
||||
"""Gets the prefix_integer of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The prefix_integer of this XmlItem. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._prefix_integer
|
||||
|
||||
@prefix_integer.setter
|
||||
def prefix_integer(self, prefix_integer):
|
||||
"""Sets the prefix_integer of this XmlItem.
|
||||
|
||||
|
||||
:param prefix_integer: The prefix_integer of this XmlItem. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._prefix_integer = prefix_integer
|
||||
|
||||
@property
|
||||
def prefix_boolean(self):
|
||||
"""Gets the prefix_boolean of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The prefix_boolean of this XmlItem. # noqa: E501
|
||||
:rtype: bool
|
||||
"""
|
||||
return self._prefix_boolean
|
||||
|
||||
@prefix_boolean.setter
|
||||
def prefix_boolean(self, prefix_boolean):
|
||||
"""Sets the prefix_boolean of this XmlItem.
|
||||
|
||||
|
||||
:param prefix_boolean: The prefix_boolean of this XmlItem. # noqa: E501
|
||||
:type: bool
|
||||
"""
|
||||
|
||||
self._prefix_boolean = prefix_boolean
|
||||
|
||||
@property
|
||||
def prefix_array(self):
|
||||
"""Gets the prefix_array of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The prefix_array of this XmlItem. # noqa: E501
|
||||
:rtype: list[int]
|
||||
"""
|
||||
return self._prefix_array
|
||||
|
||||
@prefix_array.setter
|
||||
def prefix_array(self, prefix_array):
|
||||
"""Sets the prefix_array of this XmlItem.
|
||||
|
||||
|
||||
:param prefix_array: The prefix_array of this XmlItem. # noqa: E501
|
||||
:type: list[int]
|
||||
"""
|
||||
|
||||
self._prefix_array = prefix_array
|
||||
|
||||
@property
|
||||
def prefix_wrapped_array(self):
|
||||
"""Gets the prefix_wrapped_array of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The prefix_wrapped_array of this XmlItem. # noqa: E501
|
||||
:rtype: list[int]
|
||||
"""
|
||||
return self._prefix_wrapped_array
|
||||
|
||||
@prefix_wrapped_array.setter
|
||||
def prefix_wrapped_array(self, prefix_wrapped_array):
|
||||
"""Sets the prefix_wrapped_array of this XmlItem.
|
||||
|
||||
|
||||
:param prefix_wrapped_array: The prefix_wrapped_array of this XmlItem. # noqa: E501
|
||||
:type: list[int]
|
||||
"""
|
||||
|
||||
self._prefix_wrapped_array = prefix_wrapped_array
|
||||
|
||||
@property
|
||||
def namespace_string(self):
|
||||
"""Gets the namespace_string of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The namespace_string of this XmlItem. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._namespace_string
|
||||
|
||||
@namespace_string.setter
|
||||
def namespace_string(self, namespace_string):
|
||||
"""Sets the namespace_string of this XmlItem.
|
||||
|
||||
|
||||
:param namespace_string: The namespace_string of this XmlItem. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._namespace_string = namespace_string
|
||||
|
||||
@property
|
||||
def namespace_number(self):
|
||||
"""Gets the namespace_number of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The namespace_number of this XmlItem. # noqa: E501
|
||||
:rtype: float
|
||||
"""
|
||||
return self._namespace_number
|
||||
|
||||
@namespace_number.setter
|
||||
def namespace_number(self, namespace_number):
|
||||
"""Sets the namespace_number of this XmlItem.
|
||||
|
||||
|
||||
:param namespace_number: The namespace_number of this XmlItem. # noqa: E501
|
||||
:type: float
|
||||
"""
|
||||
|
||||
self._namespace_number = namespace_number
|
||||
|
||||
@property
|
||||
def namespace_integer(self):
|
||||
"""Gets the namespace_integer of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The namespace_integer of this XmlItem. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._namespace_integer
|
||||
|
||||
@namespace_integer.setter
|
||||
def namespace_integer(self, namespace_integer):
|
||||
"""Sets the namespace_integer of this XmlItem.
|
||||
|
||||
|
||||
:param namespace_integer: The namespace_integer of this XmlItem. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._namespace_integer = namespace_integer
|
||||
|
||||
@property
|
||||
def namespace_boolean(self):
|
||||
"""Gets the namespace_boolean of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The namespace_boolean of this XmlItem. # noqa: E501
|
||||
:rtype: bool
|
||||
"""
|
||||
return self._namespace_boolean
|
||||
|
||||
@namespace_boolean.setter
|
||||
def namespace_boolean(self, namespace_boolean):
|
||||
"""Sets the namespace_boolean of this XmlItem.
|
||||
|
||||
|
||||
:param namespace_boolean: The namespace_boolean of this XmlItem. # noqa: E501
|
||||
:type: bool
|
||||
"""
|
||||
|
||||
self._namespace_boolean = namespace_boolean
|
||||
|
||||
@property
|
||||
def namespace_array(self):
|
||||
"""Gets the namespace_array of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The namespace_array of this XmlItem. # noqa: E501
|
||||
:rtype: list[int]
|
||||
"""
|
||||
return self._namespace_array
|
||||
|
||||
@namespace_array.setter
|
||||
def namespace_array(self, namespace_array):
|
||||
"""Sets the namespace_array of this XmlItem.
|
||||
|
||||
|
||||
:param namespace_array: The namespace_array of this XmlItem. # noqa: E501
|
||||
:type: list[int]
|
||||
"""
|
||||
|
||||
self._namespace_array = namespace_array
|
||||
|
||||
@property
|
||||
def namespace_wrapped_array(self):
|
||||
"""Gets the namespace_wrapped_array of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The namespace_wrapped_array of this XmlItem. # noqa: E501
|
||||
:rtype: list[int]
|
||||
"""
|
||||
return self._namespace_wrapped_array
|
||||
|
||||
@namespace_wrapped_array.setter
|
||||
def namespace_wrapped_array(self, namespace_wrapped_array):
|
||||
"""Sets the namespace_wrapped_array of this XmlItem.
|
||||
|
||||
|
||||
:param namespace_wrapped_array: The namespace_wrapped_array of this XmlItem. # noqa: E501
|
||||
:type: list[int]
|
||||
"""
|
||||
|
||||
self._namespace_wrapped_array = namespace_wrapped_array
|
||||
|
||||
@property
|
||||
def prefix_ns_string(self):
|
||||
"""Gets the prefix_ns_string of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The prefix_ns_string of this XmlItem. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._prefix_ns_string
|
||||
|
||||
@prefix_ns_string.setter
|
||||
def prefix_ns_string(self, prefix_ns_string):
|
||||
"""Sets the prefix_ns_string of this XmlItem.
|
||||
|
||||
|
||||
:param prefix_ns_string: The prefix_ns_string of this XmlItem. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._prefix_ns_string = prefix_ns_string
|
||||
|
||||
@property
|
||||
def prefix_ns_number(self):
|
||||
"""Gets the prefix_ns_number of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The prefix_ns_number of this XmlItem. # noqa: E501
|
||||
:rtype: float
|
||||
"""
|
||||
return self._prefix_ns_number
|
||||
|
||||
@prefix_ns_number.setter
|
||||
def prefix_ns_number(self, prefix_ns_number):
|
||||
"""Sets the prefix_ns_number of this XmlItem.
|
||||
|
||||
|
||||
:param prefix_ns_number: The prefix_ns_number of this XmlItem. # noqa: E501
|
||||
:type: float
|
||||
"""
|
||||
|
||||
self._prefix_ns_number = prefix_ns_number
|
||||
|
||||
@property
|
||||
def prefix_ns_integer(self):
|
||||
"""Gets the prefix_ns_integer of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The prefix_ns_integer of this XmlItem. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._prefix_ns_integer
|
||||
|
||||
@prefix_ns_integer.setter
|
||||
def prefix_ns_integer(self, prefix_ns_integer):
|
||||
"""Sets the prefix_ns_integer of this XmlItem.
|
||||
|
||||
|
||||
:param prefix_ns_integer: The prefix_ns_integer of this XmlItem. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._prefix_ns_integer = prefix_ns_integer
|
||||
|
||||
@property
|
||||
def prefix_ns_boolean(self):
|
||||
"""Gets the prefix_ns_boolean of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The prefix_ns_boolean of this XmlItem. # noqa: E501
|
||||
:rtype: bool
|
||||
"""
|
||||
return self._prefix_ns_boolean
|
||||
|
||||
@prefix_ns_boolean.setter
|
||||
def prefix_ns_boolean(self, prefix_ns_boolean):
|
||||
"""Sets the prefix_ns_boolean of this XmlItem.
|
||||
|
||||
|
||||
:param prefix_ns_boolean: The prefix_ns_boolean of this XmlItem. # noqa: E501
|
||||
:type: bool
|
||||
"""
|
||||
|
||||
self._prefix_ns_boolean = prefix_ns_boolean
|
||||
|
||||
@property
|
||||
def prefix_ns_array(self):
|
||||
"""Gets the prefix_ns_array of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The prefix_ns_array of this XmlItem. # noqa: E501
|
||||
:rtype: list[int]
|
||||
"""
|
||||
return self._prefix_ns_array
|
||||
|
||||
@prefix_ns_array.setter
|
||||
def prefix_ns_array(self, prefix_ns_array):
|
||||
"""Sets the prefix_ns_array of this XmlItem.
|
||||
|
||||
|
||||
:param prefix_ns_array: The prefix_ns_array of this XmlItem. # noqa: E501
|
||||
:type: list[int]
|
||||
"""
|
||||
|
||||
self._prefix_ns_array = prefix_ns_array
|
||||
|
||||
@property
|
||||
def prefix_ns_wrapped_array(self):
|
||||
"""Gets the prefix_ns_wrapped_array of this XmlItem. # noqa: E501
|
||||
|
||||
|
||||
:return: The prefix_ns_wrapped_array of this XmlItem. # noqa: E501
|
||||
:rtype: list[int]
|
||||
"""
|
||||
return self._prefix_ns_wrapped_array
|
||||
|
||||
@prefix_ns_wrapped_array.setter
|
||||
def prefix_ns_wrapped_array(self, prefix_ns_wrapped_array):
|
||||
"""Sets the prefix_ns_wrapped_array of this XmlItem.
|
||||
|
||||
|
||||
:param prefix_ns_wrapped_array: The prefix_ns_wrapped_array of this XmlItem. # noqa: E501
|
||||
:type: list[int]
|
||||
"""
|
||||
|
||||
self._prefix_ns_wrapped_array = prefix_ns_wrapped_array
|
||||
|
||||
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, XmlItem):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
||||
@@ -1,5 +1,5 @@
|
||||
pytest>=3.3.1
|
||||
pytest-cov>=2.5.1
|
||||
pytest>=3.6.0
|
||||
pytest-cov>=2.6.1
|
||||
pluggy>=0.3.1
|
||||
py>=1.4.31
|
||||
randomize>=0.13
|
||||
|
||||
@@ -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()
|
||||
@@ -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()
|
||||
39
samples/client/petstore/python-asyncio/test/test_xml_item.py
Normal file
39
samples/client/petstore/python-asyncio/test/test_xml_item.py
Normal file
@@ -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.xml_item import XmlItem # noqa: E501
|
||||
from petstore_api.rest import ApiException
|
||||
|
||||
|
||||
class TestXmlItem(unittest.TestCase):
|
||||
"""XmlItem unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def testXmlItem(self):
|
||||
"""Test XmlItem"""
|
||||
# FIXME: construct object with mandatory attributes with example values
|
||||
# model = petstore_api.models.xml_item.XmlItem() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user