[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:
Justin Black
2019-01-26 01:26:38 -08:00
committed by William Cheng
parent 65d9e859be
commit 9ec594eec5
274 changed files with 54229 additions and 528 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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]

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View 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)