fix: python clients (#136)

* fix: python client

* fix: regenerate petstore samples for python-asyncio/tornado

* fix: python-asyncio tests

* fix: python-tornado tests

* chore: update python samples

* fix: enable tests for python-tornado

* fix: discriminator property

* fix: file type

* python: regenerate samples

* fix: define file as generic type
This commit is contained in:
Tomasz Prus
2018-04-21 05:54:40 +02:00
committed by William Cheng
parent fdeca629bb
commit d74d2ba031
69 changed files with 1562 additions and 1276 deletions

View File

@@ -15,7 +15,7 @@ Method | HTTP request | Description
# **create_user**
> create_user(body)
> create_user(user)
Create user
@@ -31,11 +31,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
body = petstore_api.User() # User | Created user object
user = petstore_api.User() # User | Created user object
try:
# Create user
api_instance.create_user(body)
api_instance.create_user(user)
except ApiException as e:
print("Exception when calling UserApi->create_user: %s\n" % e)
```
@@ -44,7 +44,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object |
**user** | [**User**](User.md)| Created user object |
### Return type
@@ -57,17 +57,15 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_users_with_array_input**
> create_users_with_array_input(body)
> create_users_with_array_input(user)
Creates list of users with given input array
### Example
```python
from __future__ import print_function
@@ -78,11 +76,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
body = [petstore_api.User()] # list[User] | List of user object
user = NULL # list[User] | List of user object
try:
# Creates list of users with given input array
api_instance.create_users_with_array_input(body)
api_instance.create_users_with_array_input(user)
except ApiException as e:
print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e)
```
@@ -91,7 +89,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**list[User]**](User.md)| List of user object |
**user** | [**list[User]**](list.md)| List of user object |
### Return type
@@ -104,17 +102,15 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_users_with_list_input**
> create_users_with_list_input(body)
> create_users_with_list_input(user)
Creates list of users with given input array
### Example
```python
from __future__ import print_function
@@ -125,11 +121,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
body = [petstore_api.User()] # list[User] | List of user object
user = NULL # list[User] | List of user object
try:
# Creates list of users with given input array
api_instance.create_users_with_list_input(body)
api_instance.create_users_with_list_input(user)
except ApiException as e:
print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e)
```
@@ -138,7 +134,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**list[User]**](User.md)| List of user object |
**user** | [**list[User]**](list.md)| List of user object |
### Return type
@@ -151,7 +147,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -198,7 +194,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -207,8 +203,6 @@ No authorization required
Get user by user name
### Example
```python
from __future__ import print_function
@@ -255,8 +249,6 @@ No authorization required
Logs user into the system
### Example
```python
from __future__ import print_function
@@ -305,8 +297,6 @@ No authorization required
Logs out current logged in user session
### Example
```python
from __future__ import print_function
@@ -339,12 +329,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_user**
> update_user(username, body)
> update_user(username, user)
Updated user
@@ -361,11 +351,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | name that need to be deleted
body = petstore_api.User() # User | Updated user object
user = petstore_api.User() # User | Updated user object
try:
# Updated user
api_instance.update_user(username, body)
api_instance.update_user(username, user)
except ApiException as e:
print("Exception when calling UserApi->update_user: %s\n" % e)
```
@@ -375,7 +365,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object |
**user** | [**User**](User.md)| Updated user object |
### Return type
@@ -388,7 +378,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)