mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
update python to use test spec
This commit is contained in:
parent
261fa26b1e
commit
5a88b9e896
@ -26,6 +26,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="$@ generate -t modules/swagger-codegen/src/main/resources/python -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l python -o samples/client/petstore/python"
|
||||
ags="$@ generate -t modules/swagger-codegen/src/main/resources/python -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l python -o samples/client/petstore/python"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
@ -1,11 +1,11 @@
|
||||
# swagger_client
|
||||
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.
|
||||
|
||||
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build date: 2016-04-11T16:56:24.045+08:00
|
||||
- Build date: 2016-04-14T17:57:34.564+08:00
|
||||
- Build package: class io.swagger.codegen.languages.PythonClientCodegen
|
||||
|
||||
## Requirements.
|
||||
@ -55,11 +55,11 @@ from pprint import pprint
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi
|
||||
body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store (optional)
|
||||
body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store
|
||||
|
||||
try:
|
||||
# Add a new pet to the store
|
||||
api_instance.add_pet(body=body)
|
||||
api_instance.add_pet(body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->add_pet: %s\n" % e
|
||||
|
||||
@ -72,20 +72,15 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
|
||||
*PetApi* | [**add_pet_using_byte_array**](docs/PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
|
||||
*PetApi* | [**get_pet_by_id_in_object**](docs/PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
*PetApi* | [**pet_pet_idtesting_byte_arraytrue_get**](docs/PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
|
||||
*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
*StoreApi* | [**find_orders_by_status**](docs/StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status
|
||||
*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*StoreApi* | [**get_inventory_in_object**](docs/StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||
*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user
|
||||
@ -101,11 +96,11 @@ Class | Method | HTTP request | Description
|
||||
## Documentation For Models
|
||||
|
||||
- [Animal](docs/Animal.md)
|
||||
- [ApiResponse](docs/ApiResponse.md)
|
||||
- [Cat](docs/Cat.md)
|
||||
- [Category](docs/Category.md)
|
||||
- [Dog](docs/Dog.md)
|
||||
- [FormatTest](docs/FormatTest.md)
|
||||
- [InlineResponse200](docs/InlineResponse200.md)
|
||||
- [Model200Response](docs/Model200Response.md)
|
||||
- [ModelReturn](docs/ModelReturn.md)
|
||||
- [Name](docs/Name.md)
|
||||
@ -119,40 +114,12 @@ Class | Method | HTTP request | Description
|
||||
## Documentation For Authorization
|
||||
|
||||
|
||||
## test_api_key_header
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: test_api_key_header
|
||||
- **Location**: HTTP header
|
||||
|
||||
## api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
## test_http_basic
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
## test_api_client_secret
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: x-test_api_client_secret
|
||||
- **Location**: HTTP header
|
||||
|
||||
## test_api_client_id
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: x-test_api_client_id
|
||||
- **Location**: HTTP header
|
||||
|
||||
## test_api_key_query
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: test_api_key_query
|
||||
- **Location**: URL query string
|
||||
|
||||
## petstore_auth
|
||||
|
||||
- **Type**: OAuth
|
||||
|
@ -13,7 +13,8 @@ Name | Type | Description | Notes
|
||||
**byte** | **str** | | [optional]
|
||||
**binary** | **str** | | [optional]
|
||||
**date** | **date** | | [optional]
|
||||
**date_time** | **str** | | [optional]
|
||||
**date_time** | **datetime** | | [optional]
|
||||
**password** | **str** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -8,7 +8,7 @@ Name | Type | Description | Notes
|
||||
**quantity** | **int** | | [optional]
|
||||
**ship_date** | **datetime** | | [optional]
|
||||
**status** | **str** | Order Status | [optional]
|
||||
**complete** | **bool** | | [optional]
|
||||
**complete** | **bool** | | [optional] [default to False]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -5,20 +5,17 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
|
||||
[**add_pet_using_byte_array**](PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**get_pet_by_id_in_object**](PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
[**pet_pet_idtesting_byte_arraytrue_get**](PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
|
||||
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
|
||||
|
||||
# **add_pet**
|
||||
> add_pet(body=body)
|
||||
> add_pet(body)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
@ -36,11 +33,11 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store (optional)
|
||||
body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store
|
||||
|
||||
try:
|
||||
# Add a new pet to the store
|
||||
api_instance.add_pet(body=body)
|
||||
api_instance.add_pet(body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->add_pet: %s\n" % e
|
||||
```
|
||||
@ -49,7 +46,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -59,59 +56,10 @@ void (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[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)
|
||||
|
||||
# **add_pet_using_byte_array**
|
||||
> add_pet_using_byte_array(body=body)
|
||||
|
||||
Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
body = 'B' # str | Pet object in the form of byte array (optional)
|
||||
|
||||
try:
|
||||
# Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
api_instance.add_pet_using_byte_array(body=body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->add_pet_using_byte_array: %s\n" % e
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **str**| Pet object in the form of byte array | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@ -159,15 +107,15 @@ void (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **find_pets_by_status**
|
||||
> list[Pet] find_pets_by_status(status=status)
|
||||
> list[Pet] find_pets_by_status(status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
@ -185,11 +133,11 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
status = ['available'] # list[str] | Status values that need to be considered for query (optional) (default to available)
|
||||
status = ['status_example'] # list[str] | Status values that need to be considered for filter
|
||||
|
||||
try:
|
||||
# Finds Pets by status
|
||||
api_response = api_instance.find_pets_by_status(status=status)
|
||||
api_response = api_instance.find_pets_by_status(status)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->find_pets_by_status: %s\n" % e
|
||||
@ -199,7 +147,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**list[str]**](str.md)| Status values that need to be considered for query | [optional] [default to available]
|
||||
**status** | [**list[str]**](str.md)| Status values that need to be considered for filter |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -209,19 +157,19 @@ Name | Type | Description | Notes
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **find_pets_by_tags**
|
||||
> list[Pet] find_pets_by_tags(tags=tags)
|
||||
> list[Pet] find_pets_by_tags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```python
|
||||
@ -235,11 +183,11 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
tags = ['tags_example'] # list[str] | Tags to filter by (optional)
|
||||
tags = ['tags_example'] # list[str] | Tags to filter by
|
||||
|
||||
try:
|
||||
# Finds Pets by tags
|
||||
api_response = api_instance.find_pets_by_tags(tags=tags)
|
||||
api_response = api_instance.find_pets_by_tags(tags)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->find_pets_by_tags: %s\n" % e
|
||||
@ -249,7 +197,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**list[str]**](str.md)| Tags to filter by | [optional]
|
||||
**tags** | [**list[str]**](str.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -259,10 +207,10 @@ Name | Type | Description | Notes
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@ -271,7 +219,7 @@ Name | Type | Description | Notes
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
```python
|
||||
@ -284,12 +232,10 @@ from pprint import pprint
|
||||
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
pet_id = 789 # int | ID of pet that needs to be fetched
|
||||
pet_id = 789 # int | ID of pet to return
|
||||
|
||||
try:
|
||||
# Find pet by ID
|
||||
@ -303,7 +249,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet that needs to be fetched |
|
||||
**pet_id** | **int**| ID of pet to return |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -311,125 +257,17 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **get_pet_by_id_in_object**
|
||||
> InlineResponse200 get_pet_by_id_in_object(pet_id)
|
||||
|
||||
Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
pet_id = 789 # int | ID of pet that needs to be fetched
|
||||
|
||||
try:
|
||||
# Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
api_response = api_instance.get_pet_by_id_in_object(pet_id)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->get_pet_by_id_in_object: %s\n" % e
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponse200**](InlineResponse200.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[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)
|
||||
|
||||
# **pet_pet_idtesting_byte_arraytrue_get**
|
||||
> str pet_pet_idtesting_byte_arraytrue_get(pet_id)
|
||||
|
||||
Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
pet_id = 789 # int | ID of pet that needs to be fetched
|
||||
|
||||
try:
|
||||
# Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
api_response = api_instance.pet_pet_idtesting_byte_arraytrue_get(pet_id)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->pet_pet_idtesting_byte_arraytrue_get: %s\n" % e
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
**str**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **update_pet**
|
||||
> update_pet(body=body)
|
||||
> update_pet(body)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
@ -447,11 +285,11 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store (optional)
|
||||
body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store
|
||||
|
||||
try:
|
||||
# Update an existing pet
|
||||
api_instance.update_pet(body=body)
|
||||
api_instance.update_pet(body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->update_pet: %s\n" % e
|
||||
```
|
||||
@ -460,7 +298,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -470,10 +308,10 @@ void (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@ -496,7 +334,7 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
pet_id = 'pet_id_example' # str | ID of pet that needs to be updated
|
||||
pet_id = 789 # int | ID of pet that needs to be updated
|
||||
name = 'name_example' # str | Updated name of the pet (optional)
|
||||
status = 'status_example' # str | Updated status of the pet (optional)
|
||||
|
||||
@ -511,7 +349,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **str**| ID of pet that needs to be updated |
|
||||
**pet_id** | **int**| ID of pet that needs to be updated |
|
||||
**name** | **str**| Updated name of the pet | [optional]
|
||||
**status** | **str**| Updated status of the pet | [optional]
|
||||
|
||||
@ -523,15 +361,15 @@ void (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **upload_file**
|
||||
> upload_file(pet_id, additional_metadata=additional_metadata, file=file)
|
||||
> ApiResponse upload_file(pet_id, additional_metadata=additional_metadata, file=file)
|
||||
|
||||
uploads an image
|
||||
|
||||
@ -555,7 +393,8 @@ file = '/path/to/file.txt' # file | file to upload (optional)
|
||||
|
||||
try:
|
||||
# uploads an image
|
||||
api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file)
|
||||
api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->upload_file: %s\n" % e
|
||||
```
|
||||
@ -570,16 +409,16 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -5,9 +5,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
[**find_orders_by_status**](StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status
|
||||
[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**get_inventory_in_object**](StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
@ -51,66 +49,10 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **find_orders_by_status**
|
||||
> list[Order] find_orders_by_status(status=status)
|
||||
|
||||
Finds orders by status
|
||||
|
||||
A single status value can be provided as a string
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: test_api_client_id
|
||||
swagger_client.configuration.api_key['x-test_api_client_id'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['x-test_api_client_id'] = 'BEARER'
|
||||
# Configure API key authorization: test_api_client_secret
|
||||
swagger_client.configuration.api_key['x-test_api_client_secret'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['x-test_api_client_secret'] = 'BEARER'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.StoreApi()
|
||||
status = 'placed' # str | Status value that needs to be considered for query (optional) (default to placed)
|
||||
|
||||
try:
|
||||
# Finds orders by status
|
||||
api_response = api_instance.find_orders_by_status(status=status)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling StoreApi->find_orders_by_status: %s\n" % e
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | **str**| Status value that needs to be considered for query | [optional] [default to placed]
|
||||
|
||||
### Return type
|
||||
|
||||
[**list[Order]**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@ -155,58 +97,10 @@ This endpoint does not need any parameter.
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **get_inventory_in_object**
|
||||
> object get_inventory_in_object()
|
||||
|
||||
Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
|
||||
Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.StoreApi()
|
||||
|
||||
try:
|
||||
# Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
api_response = api_instance.get_inventory_in_object()
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling StoreApi->get_inventory_in_object: %s\n" % e
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**object**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@ -224,18 +118,9 @@ import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: test_api_key_header
|
||||
swagger_client.configuration.api_key['test_api_key_header'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['test_api_key_header'] = 'BEARER'
|
||||
# Configure API key authorization: test_api_key_query
|
||||
swagger_client.configuration.api_key['test_api_key_query'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['test_api_key_query'] = 'BEARER'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.StoreApi()
|
||||
order_id = 'order_id_example' # str | ID of pet that needs to be fetched
|
||||
order_id = 789 # int | ID of pet that needs to be fetched
|
||||
|
||||
try:
|
||||
# Find purchase order by ID
|
||||
@ -249,7 +134,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order_id** | **str**| ID of pet that needs to be fetched |
|
||||
**order_id** | **int**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -257,17 +142,17 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_api_key_header](../README.md#test_api_key_header), [test_api_key_query](../README.md#test_api_key_query)
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **place_order**
|
||||
> Order place_order(body=body)
|
||||
> Order place_order(body)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
@ -280,22 +165,13 @@ import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: test_api_client_id
|
||||
swagger_client.configuration.api_key['x-test_api_client_id'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['x-test_api_client_id'] = 'BEARER'
|
||||
# Configure API key authorization: test_api_client_secret
|
||||
swagger_client.configuration.api_key['x-test_api_client_secret'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['x-test_api_client_secret'] = 'BEARER'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.StoreApi()
|
||||
body = swagger_client.Order() # Order | order placed for purchasing the pet (optional)
|
||||
body = swagger_client.Order() # Order | order placed for purchasing the pet
|
||||
|
||||
try:
|
||||
# Place an order for a pet
|
||||
api_response = api_instance.place_order(body=body)
|
||||
api_response = api_instance.place_order(body)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling StoreApi->place_order: %s\n" % e
|
||||
@ -305,7 +181,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -313,12 +189,12 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -15,7 +15,7 @@ Method | HTTP request | Description
|
||||
|
||||
|
||||
# **create_user**
|
||||
> create_user(body=body)
|
||||
> create_user(body)
|
||||
|
||||
Create user
|
||||
|
||||
@ -30,11 +30,11 @@ from pprint import pprint
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
body = swagger_client.User() # User | Created user object (optional)
|
||||
body = swagger_client.User() # User | Created user object
|
||||
|
||||
try:
|
||||
# Create user
|
||||
api_instance.create_user(body=body)
|
||||
api_instance.create_user(body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->create_user: %s\n" % e
|
||||
```
|
||||
@ -43,7 +43,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**User**](User.md)| Created user object | [optional]
|
||||
**body** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -53,15 +53,15 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **create_users_with_array_input**
|
||||
> create_users_with_array_input(body=body)
|
||||
> 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 = swagger_client.UserApi()
|
||||
body = [swagger_client.User()] # list[User] | List of user object (optional)
|
||||
body = [swagger_client.User()] # list[User] | List of user object
|
||||
|
||||
try:
|
||||
# Creates list of users with given input array
|
||||
api_instance.create_users_with_array_input(body=body)
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**list[User]**](User.md)| List of user object | [optional]
|
||||
**body** | [**list[User]**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -99,15 +99,15 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **create_users_with_list_input**
|
||||
> create_users_with_list_input(body=body)
|
||||
> create_users_with_list_input(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
@ -122,11 +122,11 @@ from pprint import pprint
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
body = [swagger_client.User()] # list[User] | List of user object (optional)
|
||||
body = [swagger_client.User()] # list[User] | List of user object
|
||||
|
||||
try:
|
||||
# Creates list of users with given input array
|
||||
api_instance.create_users_with_list_input(body=body)
|
||||
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
|
||||
```
|
||||
@ -135,7 +135,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**list[User]**](User.md)| List of user object | [optional]
|
||||
**body** | [**list[User]**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -145,10 +145,10 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@ -166,10 +166,6 @@ import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure HTTP basic authorization: test_http_basic
|
||||
swagger_client.configuration.username = 'YOUR_USERNAME'
|
||||
swagger_client.configuration.password = 'YOUR_PASSWORD'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
username = 'username_example' # str | The name that needs to be deleted
|
||||
@ -193,12 +189,12 @@ void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_http_basic](../README.md#test_http_basic)
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@ -242,15 +238,15 @@ Name | Type | Description | Notes
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **login_user**
|
||||
> str login_user(username=username, password=password)
|
||||
> str login_user(username, password)
|
||||
|
||||
Logs user into the system
|
||||
|
||||
@ -265,12 +261,12 @@ from pprint import pprint
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
username = 'username_example' # str | The user name for login (optional)
|
||||
password = 'password_example' # str | The password for login in clear text (optional)
|
||||
username = 'username_example' # str | The user name for login
|
||||
password = 'password_example' # str | The password for login in clear text
|
||||
|
||||
try:
|
||||
# Logs user into the system
|
||||
api_response = api_instance.login_user(username=username, password=password)
|
||||
api_response = api_instance.login_user(username, password)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->login_user: %s\n" % e
|
||||
@ -280,8 +276,8 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **str**| The user name for login | [optional]
|
||||
**password** | **str**| The password for login in clear text | [optional]
|
||||
**username** | **str**| The user name for login |
|
||||
**password** | **str**| The password for login in clear text |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -291,10 +287,10 @@ Name | Type | Description | Notes
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@ -333,15 +329,15 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **update_user**
|
||||
> update_user(username, body=body)
|
||||
> update_user(username, body)
|
||||
|
||||
Updated user
|
||||
|
||||
@ -357,11 +353,11 @@ from pprint import pprint
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
username = 'username_example' # str | name that need to be deleted
|
||||
body = swagger_client.User() # User | Updated user object (optional)
|
||||
body = swagger_client.User() # User | Updated user object
|
||||
|
||||
try:
|
||||
# Updated user
|
||||
api_instance.update_user(username, body=body)
|
||||
api_instance.update_user(username, body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->update_user: %s\n" % e
|
||||
```
|
||||
@ -371,7 +367,7 @@ except ApiException as e:
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **str**| name that need to be deleted |
|
||||
**body** | [**User**](User.md)| Updated user object | [optional]
|
||||
**body** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -381,10 +377,10 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -28,7 +28,7 @@ setup(
|
||||
packages=find_packages(),
|
||||
include_package_data=True,
|
||||
long_description="""\
|
||||
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.
|
||||
"""
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,7 @@ Home-page: UNKNOWN
|
||||
Author: UNKNOWN
|
||||
Author-email: apiteam@swagger.io
|
||||
License: UNKNOWN
|
||||
Description: This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
Description: This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.
|
||||
|
||||
Keywords: Swagger,Swagger Petstore
|
||||
Platform: UNKNOWN
|
||||
|
@ -2,11 +2,11 @@ from __future__ import absolute_import
|
||||
|
||||
# import models into sdk package
|
||||
from .models.animal import Animal
|
||||
from .models.api_response import ApiResponse
|
||||
from .models.cat import Cat
|
||||
from .models.category import Category
|
||||
from .models.dog import Dog
|
||||
from .models.format_test import FormatTest
|
||||
from .models.inline_response_200 import InlineResponse200
|
||||
from .models.model_200_response import Model200Response
|
||||
from .models.model_return import ModelReturn
|
||||
from .models.name import Name
|
||||
|
@ -45,7 +45,7 @@ class PetApi(object):
|
||||
config.api_client = ApiClient()
|
||||
self.api_client = config.api_client
|
||||
|
||||
def add_pet(self, **kwargs):
|
||||
def add_pet(self, body, **kwargs):
|
||||
"""
|
||||
Add a new pet to the store
|
||||
|
||||
@ -56,11 +56,11 @@ class PetApi(object):
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.add_pet(callback=callback_function)
|
||||
>>> thread = api.add_pet(body, callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param Pet body: Pet object that needs to be added to the store
|
||||
: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.
|
||||
@ -79,6 +79,9 @@ class PetApi(object):
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params) or (params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `add_pet`")
|
||||
|
||||
resource_path = '/pet'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
@ -96,81 +99,7 @@ class PetApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.\
|
||||
select_header_content_type(['application/json', 'application/xml'])
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['petstore_auth']
|
||||
|
||||
response = self.api_client.call_api(resource_path, 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def add_pet_using_byte_array(self, **kwargs):
|
||||
"""
|
||||
Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please define a `callback` function
|
||||
to be invoked when receiving the response.
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.add_pet_using_byte_array(callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param str body: Pet object in the form of byte array
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body']
|
||||
all_params.append('callback')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method add_pet_using_byte_array" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
|
||||
resource_path = '/pet?testing_byte_array=true'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -250,7 +179,7 @@ class PetApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -273,7 +202,7 @@ class PetApi(object):
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def find_pets_by_status(self, **kwargs):
|
||||
def find_pets_by_status(self, status, **kwargs):
|
||||
"""
|
||||
Finds Pets by status
|
||||
Multiple status values can be provided with comma separated strings
|
||||
@ -284,11 +213,11 @@ class PetApi(object):
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.find_pets_by_status(callback=callback_function)
|
||||
>>> thread = api.find_pets_by_status(status, callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param list[str] status: Status values that need to be considered for query
|
||||
:param list[str] status: Status values that need to be considered for filter (required)
|
||||
:return: list[Pet]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@ -307,6 +236,9 @@ class PetApi(object):
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
# verify the required parameter 'status' is set
|
||||
if ('status' not in params) or (params['status'] is None):
|
||||
raise ValueError("Missing the required parameter `status` when calling `find_pets_by_status`")
|
||||
|
||||
resource_path = '/pet/findByStatus'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
@ -324,7 +256,7 @@ class PetApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -347,10 +279,10 @@ class PetApi(object):
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def find_pets_by_tags(self, **kwargs):
|
||||
def find_pets_by_tags(self, tags, **kwargs):
|
||||
"""
|
||||
Finds Pets by tags
|
||||
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please define a `callback` function
|
||||
@ -358,11 +290,11 @@ class PetApi(object):
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.find_pets_by_tags(callback=callback_function)
|
||||
>>> thread = api.find_pets_by_tags(tags, callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param list[str] tags: Tags to filter by
|
||||
:param list[str] tags: Tags to filter by (required)
|
||||
:return: list[Pet]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@ -381,6 +313,9 @@ class PetApi(object):
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
# verify the required parameter 'tags' is set
|
||||
if ('tags' not in params) or (params['tags'] is None):
|
||||
raise ValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`")
|
||||
|
||||
resource_path = '/pet/findByTags'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
@ -398,7 +333,7 @@ class PetApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -424,7 +359,7 @@ class PetApi(object):
|
||||
def get_pet_by_id(self, pet_id, **kwargs):
|
||||
"""
|
||||
Find pet by ID
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
Returns a single pet
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please define a `callback` function
|
||||
@ -436,7 +371,7 @@ class PetApi(object):
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param int pet_id: ID of pet that needs to be fetched (required)
|
||||
:param int pet_id: ID of pet to return (required)
|
||||
:return: Pet
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@ -475,7 +410,7 @@ class PetApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -484,7 +419,7 @@ class PetApi(object):
|
||||
select_header_content_type([])
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['api_key', 'petstore_auth']
|
||||
auth_settings = ['api_key']
|
||||
|
||||
response = self.api_client.call_api(resource_path, 'GET',
|
||||
path_params,
|
||||
@ -498,161 +433,7 @@ class PetApi(object):
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def get_pet_by_id_in_object(self, pet_id, **kwargs):
|
||||
"""
|
||||
Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please define a `callback` function
|
||||
to be invoked when receiving the response.
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.get_pet_by_id_in_object(pet_id, callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param int pet_id: ID of pet that needs to be fetched (required)
|
||||
:return: InlineResponse200
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['pet_id']
|
||||
all_params.append('callback')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_pet_by_id_in_object" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
# verify the required parameter 'pet_id' is set
|
||||
if ('pet_id' not in params) or (params['pet_id'] is None):
|
||||
raise ValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id_in_object`")
|
||||
|
||||
resource_path = '/pet/{petId}?response=inline_arbitrary_object'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
if 'pet_id' in params:
|
||||
path_params['petId'] = params['pet_id']
|
||||
|
||||
query_params = {}
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.\
|
||||
select_header_content_type([])
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['api_key', 'petstore_auth']
|
||||
|
||||
response = self.api_client.call_api(resource_path, 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse200',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def pet_pet_idtesting_byte_arraytrue_get(self, pet_id, **kwargs):
|
||||
"""
|
||||
Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please define a `callback` function
|
||||
to be invoked when receiving the response.
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.pet_pet_idtesting_byte_arraytrue_get(pet_id, callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param int pet_id: ID of pet that needs to be fetched (required)
|
||||
:return: str
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['pet_id']
|
||||
all_params.append('callback')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method pet_pet_idtesting_byte_arraytrue_get" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
# verify the required parameter 'pet_id' is set
|
||||
if ('pet_id' not in params) or (params['pet_id'] is None):
|
||||
raise ValueError("Missing the required parameter `pet_id` when calling `pet_pet_idtesting_byte_arraytrue_get`")
|
||||
|
||||
resource_path = '/pet/{petId}?testing_byte_array=true'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
if 'pet_id' in params:
|
||||
path_params['petId'] = params['pet_id']
|
||||
|
||||
query_params = {}
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.\
|
||||
select_header_content_type([])
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['api_key', 'petstore_auth']
|
||||
|
||||
response = self.api_client.call_api(resource_path, 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='str',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def update_pet(self, **kwargs):
|
||||
def update_pet(self, body, **kwargs):
|
||||
"""
|
||||
Update an existing pet
|
||||
|
||||
@ -663,11 +444,11 @@ class PetApi(object):
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.update_pet(callback=callback_function)
|
||||
>>> thread = api.update_pet(body, callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param Pet body: Pet object that needs to be added to the store
|
||||
: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.
|
||||
@ -686,6 +467,9 @@ class PetApi(object):
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params) or (params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `update_pet`")
|
||||
|
||||
resource_path = '/pet'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
@ -703,7 +487,7 @@ class PetApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -741,7 +525,7 @@ class PetApi(object):
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param str pet_id: ID of pet that needs to be updated (required)
|
||||
:param int pet_id: ID of pet that needs to be updated (required)
|
||||
:param str name: Updated name of the pet
|
||||
:param str status: Updated status of the pet
|
||||
:return: None
|
||||
@ -786,7 +570,7 @@ class PetApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -827,7 +611,7 @@ class PetApi(object):
|
||||
:param int pet_id: ID of pet to update (required)
|
||||
:param str additional_metadata: Additional data to pass to server
|
||||
:param file file: file to upload
|
||||
:return: None
|
||||
:return: ApiResponse
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -869,7 +653,7 @@ class PetApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -887,7 +671,7 @@ class PetApi(object):
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None,
|
||||
response_type='ApiResponse',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
@ -99,7 +99,7 @@ class StoreApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -122,80 +122,6 @@ class StoreApi(object):
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def find_orders_by_status(self, **kwargs):
|
||||
"""
|
||||
Finds orders by status
|
||||
A single status value can be provided as a string
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please define a `callback` function
|
||||
to be invoked when receiving the response.
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.find_orders_by_status(callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param str status: Status value that needs to be considered for query
|
||||
:return: list[Order]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['status']
|
||||
all_params.append('callback')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method find_orders_by_status" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
|
||||
resource_path = '/store/findByStatus'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
if 'status' in params:
|
||||
query_params['status'] = params['status']
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.\
|
||||
select_header_content_type([])
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['test_api_client_id', 'test_api_client_secret']
|
||||
|
||||
response = self.api_client.call_api(resource_path, 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Order]',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def get_inventory(self, **kwargs):
|
||||
"""
|
||||
Returns pet inventories by status
|
||||
@ -244,7 +170,7 @@ class StoreApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -267,77 +193,6 @@ class StoreApi(object):
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def get_inventory_in_object(self, **kwargs):
|
||||
"""
|
||||
Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please define a `callback` function
|
||||
to be invoked when receiving the response.
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.get_inventory_in_object(callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:return: object
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = []
|
||||
all_params.append('callback')
|
||||
|
||||
params = locals()
|
||||
for key, val in iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_inventory_in_object" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
|
||||
resource_path = '/store/inventory?response=arbitrary_object'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
|
||||
query_params = {}
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.\
|
||||
select_header_content_type([])
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['api_key']
|
||||
|
||||
response = self.api_client.call_api(resource_path, 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='object',
|
||||
auth_settings=auth_settings,
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def get_order_by_id(self, order_id, **kwargs):
|
||||
"""
|
||||
Find purchase order by ID
|
||||
@ -353,7 +208,7 @@ class StoreApi(object):
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param str order_id: ID of pet that needs to be fetched (required)
|
||||
:param int order_id: ID of pet that needs to be fetched (required)
|
||||
:return: Order
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@ -392,7 +247,7 @@ class StoreApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -401,7 +256,7 @@ class StoreApi(object):
|
||||
select_header_content_type([])
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['test_api_key_header', 'test_api_key_query']
|
||||
auth_settings = []
|
||||
|
||||
response = self.api_client.call_api(resource_path, 'GET',
|
||||
path_params,
|
||||
@ -415,7 +270,7 @@ class StoreApi(object):
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def place_order(self, **kwargs):
|
||||
def place_order(self, body, **kwargs):
|
||||
"""
|
||||
Place an order for a pet
|
||||
|
||||
@ -426,11 +281,11 @@ class StoreApi(object):
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.place_order(callback=callback_function)
|
||||
>>> thread = api.place_order(body, callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param Order body: order placed for purchasing the pet
|
||||
:param Order body: order placed for purchasing the pet (required)
|
||||
:return: Order
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@ -449,6 +304,9 @@ class StoreApi(object):
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params) or (params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `place_order`")
|
||||
|
||||
resource_path = '/store/order'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
@ -466,7 +324,7 @@ class StoreApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -475,7 +333,7 @@ class StoreApi(object):
|
||||
select_header_content_type([])
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['test_api_client_id', 'test_api_client_secret']
|
||||
auth_settings = []
|
||||
|
||||
response = self.api_client.call_api(resource_path, 'POST',
|
||||
path_params,
|
||||
|
@ -45,7 +45,7 @@ class UserApi(object):
|
||||
config.api_client = ApiClient()
|
||||
self.api_client = config.api_client
|
||||
|
||||
def create_user(self, **kwargs):
|
||||
def create_user(self, body, **kwargs):
|
||||
"""
|
||||
Create user
|
||||
This can only be done by the logged in user.
|
||||
@ -56,11 +56,11 @@ class UserApi(object):
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.create_user(callback=callback_function)
|
||||
>>> thread = api.create_user(body, callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param User body: Created user object
|
||||
:param User body: Created user object (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@ -79,6 +79,9 @@ class UserApi(object):
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params) or (params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `create_user`")
|
||||
|
||||
resource_path = '/user'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
@ -96,7 +99,7 @@ class UserApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -119,7 +122,7 @@ class UserApi(object):
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def create_users_with_array_input(self, **kwargs):
|
||||
def create_users_with_array_input(self, body, **kwargs):
|
||||
"""
|
||||
Creates list of users with given input array
|
||||
|
||||
@ -130,11 +133,11 @@ class UserApi(object):
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.create_users_with_array_input(callback=callback_function)
|
||||
>>> thread = api.create_users_with_array_input(body, callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param list[User] body: List of user object
|
||||
:param list[User] body: List of user object (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@ -153,6 +156,9 @@ class UserApi(object):
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params) or (params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `create_users_with_array_input`")
|
||||
|
||||
resource_path = '/user/createWithArray'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
@ -170,7 +176,7 @@ class UserApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -193,7 +199,7 @@ class UserApi(object):
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def create_users_with_list_input(self, **kwargs):
|
||||
def create_users_with_list_input(self, body, **kwargs):
|
||||
"""
|
||||
Creates list of users with given input array
|
||||
|
||||
@ -204,11 +210,11 @@ class UserApi(object):
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.create_users_with_list_input(callback=callback_function)
|
||||
>>> thread = api.create_users_with_list_input(body, callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param list[User] body: List of user object
|
||||
:param list[User] body: List of user object (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@ -227,6 +233,9 @@ class UserApi(object):
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params) or (params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `create_users_with_list_input`")
|
||||
|
||||
resource_path = '/user/createWithList'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
@ -244,7 +253,7 @@ class UserApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -321,7 +330,7 @@ class UserApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -330,7 +339,7 @@ class UserApi(object):
|
||||
select_header_content_type([])
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['test_http_basic']
|
||||
auth_settings = []
|
||||
|
||||
response = self.api_client.call_api(resource_path, 'DELETE',
|
||||
path_params,
|
||||
@ -398,7 +407,7 @@ class UserApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -421,7 +430,7 @@ class UserApi(object):
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def login_user(self, **kwargs):
|
||||
def login_user(self, username, password, **kwargs):
|
||||
"""
|
||||
Logs user into the system
|
||||
|
||||
@ -432,12 +441,12 @@ class UserApi(object):
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.login_user(callback=callback_function)
|
||||
>>> thread = api.login_user(username, password, callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param str username: The user name for login
|
||||
:param str password: The password for login in clear text
|
||||
:param str username: The user name for login (required)
|
||||
:param str password: The password for login in clear text (required)
|
||||
:return: str
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@ -456,6 +465,12 @@ class UserApi(object):
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
# verify the required parameter 'username' is set
|
||||
if ('username' not in params) or (params['username'] is None):
|
||||
raise ValueError("Missing the required parameter `username` when calling `login_user`")
|
||||
# verify the required parameter 'password' is set
|
||||
if ('password' not in params) or (params['password'] is None):
|
||||
raise ValueError("Missing the required parameter `password` when calling `login_user`")
|
||||
|
||||
resource_path = '/user/login'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
@ -475,7 +490,7 @@ class UserApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -546,7 +561,7 @@ class UserApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
@ -569,7 +584,7 @@ class UserApi(object):
|
||||
callback=params.get('callback'))
|
||||
return response
|
||||
|
||||
def update_user(self, username, **kwargs):
|
||||
def update_user(self, username, body, **kwargs):
|
||||
"""
|
||||
Updated user
|
||||
This can only be done by the logged in user.
|
||||
@ -580,12 +595,12 @@ class UserApi(object):
|
||||
>>> def callback_function(response):
|
||||
>>> pprint(response)
|
||||
>>>
|
||||
>>> thread = api.update_user(username, callback=callback_function)
|
||||
>>> thread = api.update_user(username, body, callback=callback_function)
|
||||
|
||||
:param callback function: The callback function
|
||||
for asynchronous request. (optional)
|
||||
:param str username: name that need to be deleted (required)
|
||||
:param User body: Updated user object
|
||||
:param User body: Updated user object (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
@ -607,6 +622,9 @@ class UserApi(object):
|
||||
# verify the required parameter 'username' is set
|
||||
if ('username' not in params) or (params['username'] is None):
|
||||
raise ValueError("Missing the required parameter `username` when calling `update_user`")
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params) or (params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `update_user`")
|
||||
|
||||
resource_path = '/user/{username}'.replace('{format}', 'json')
|
||||
path_params = {}
|
||||
@ -626,7 +644,7 @@ class UserApi(object):
|
||||
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.\
|
||||
select_header_accept(['application/json', 'application/xml'])
|
||||
select_header_accept(['application/xml', 'application/json'])
|
||||
if not header_params['Accept']:
|
||||
del header_params['Accept']
|
||||
|
||||
|
@ -217,13 +217,6 @@ class Configuration(object):
|
||||
:return: The Auth Settings information dict.
|
||||
"""
|
||||
return {
|
||||
'test_api_key_header':
|
||||
{
|
||||
'type': 'api_key',
|
||||
'in': 'header',
|
||||
'key': 'test_api_key_header',
|
||||
'value': self.get_api_key_with_prefix('test_api_key_header')
|
||||
},
|
||||
'api_key':
|
||||
{
|
||||
'type': 'api_key',
|
||||
@ -231,34 +224,6 @@ class Configuration(object):
|
||||
'key': 'api_key',
|
||||
'value': self.get_api_key_with_prefix('api_key')
|
||||
},
|
||||
'test_http_basic':
|
||||
{
|
||||
'type': 'basic',
|
||||
'in': 'header',
|
||||
'key': 'Authorization',
|
||||
'value': self.get_basic_auth_token()
|
||||
},
|
||||
'test_api_client_secret':
|
||||
{
|
||||
'type': 'api_key',
|
||||
'in': 'header',
|
||||
'key': 'x-test_api_client_secret',
|
||||
'value': self.get_api_key_with_prefix('x-test_api_client_secret')
|
||||
},
|
||||
'test_api_client_id':
|
||||
{
|
||||
'type': 'api_key',
|
||||
'in': 'header',
|
||||
'key': 'x-test_api_client_id',
|
||||
'value': self.get_api_key_with_prefix('x-test_api_client_id')
|
||||
},
|
||||
'test_api_key_query':
|
||||
{
|
||||
'type': 'api_key',
|
||||
'in': 'query',
|
||||
'key': 'test_api_key_query',
|
||||
'value': self.get_api_key_with_prefix('test_api_key_query')
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
@ -2,11 +2,11 @@ from __future__ import absolute_import
|
||||
|
||||
# import models into model package
|
||||
from .animal import Animal
|
||||
from .api_response import ApiResponse
|
||||
from .cat import Cat
|
||||
from .category import Category
|
||||
from .dog import Dog
|
||||
from .format_test import FormatTest
|
||||
from .inline_response_200 import InlineResponse200
|
||||
from .model_200_response import Model200Response
|
||||
from .model_return import ModelReturn
|
||||
from .name import Name
|
||||
|
@ -47,7 +47,8 @@ class FormatTest(object):
|
||||
'byte': 'str',
|
||||
'binary': 'str',
|
||||
'date': 'date',
|
||||
'date_time': 'str'
|
||||
'date_time': 'datetime',
|
||||
'password': 'str'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
@ -61,7 +62,8 @@ class FormatTest(object):
|
||||
'byte': 'byte',
|
||||
'binary': 'binary',
|
||||
'date': 'date',
|
||||
'date_time': 'dateTime'
|
||||
'date_time': 'dateTime',
|
||||
'password': 'password'
|
||||
}
|
||||
|
||||
self._integer = None
|
||||
@ -75,6 +77,7 @@ class FormatTest(object):
|
||||
self._binary = None
|
||||
self._date = None
|
||||
self._date_time = None
|
||||
self._password = None
|
||||
|
||||
@property
|
||||
def integer(self):
|
||||
@ -303,7 +306,7 @@ class FormatTest(object):
|
||||
|
||||
|
||||
:return: The date_time of this FormatTest.
|
||||
:rtype: str
|
||||
:rtype: datetime
|
||||
"""
|
||||
return self._date_time
|
||||
|
||||
@ -314,10 +317,32 @@ class FormatTest(object):
|
||||
|
||||
|
||||
:param date_time: The date_time of this FormatTest.
|
||||
:type: str
|
||||
:type: datetime
|
||||
"""
|
||||
self._date_time = date_time
|
||||
|
||||
@property
|
||||
def password(self):
|
||||
"""
|
||||
Gets the password of this FormatTest.
|
||||
|
||||
|
||||
:return: The password of this FormatTest.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._password
|
||||
|
||||
@password.setter
|
||||
def password(self, password):
|
||||
"""
|
||||
Sets the password of this FormatTest.
|
||||
|
||||
|
||||
:param password: The password of this FormatTest.
|
||||
:type: str
|
||||
"""
|
||||
self._password = password
|
||||
|
||||
def to_dict(self):
|
||||
"""
|
||||
Returns the model properties as a dict
|
||||
|
@ -59,7 +59,7 @@ class Order(object):
|
||||
self._quantity = None
|
||||
self._ship_date = None
|
||||
self._status = None
|
||||
self._complete = None
|
||||
self._complete = False
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
|
Loading…
Reference in New Issue
Block a user