forked from loafle/openapi-generator-original
fix swift mapping with int and number
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **int** | | [optional]
|
||||
**name** | **int** | |
|
||||
**snake_case** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
# swagger_client\PetApi
|
||||
# swagger_client.PetApi
|
||||
|
||||
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
|
||||
[**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'
|
||||
[**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
|
||||
@@ -26,11 +26,10 @@ Add a new pet to the store
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
@@ -41,7 +40,7 @@ body = swagger_client.Pet() # Pet | Pet object that needs to be added to the sto
|
||||
|
||||
try:
|
||||
# Add a new pet to the store
|
||||
api_instance.add_pet(body=body);
|
||||
api_instance.add_pet(body=body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->add_pet: %s\n" % e
|
||||
```
|
||||
@@ -76,11 +75,10 @@ Fake endpoint to test byte array in body parameter for adding a new pet to the s
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
@@ -91,7 +89,7 @@ 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);
|
||||
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
|
||||
```
|
||||
@@ -126,11 +124,10 @@ Deletes a pet
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
@@ -142,7 +139,7 @@ api_key = 'api_key_example' # str | (optional)
|
||||
|
||||
try:
|
||||
# Deletes a pet
|
||||
api_instance.delete_pet(pet_id, api_key=api_key);
|
||||
api_instance.delete_pet(pet_id, api_key=api_key)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->delete_pet: %s\n" % e
|
||||
```
|
||||
@@ -178,11 +175,10 @@ Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
@@ -193,7 +189,7 @@ status = ['available'] # list[str] | Status values that need to be considered fo
|
||||
|
||||
try:
|
||||
# Finds Pets by status
|
||||
api_response = api_instance.find_pets_by_status(status=status);
|
||||
api_response = api_instance.find_pets_by_status(status=status)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->find_pets_by_status: %s\n" % e
|
||||
@@ -229,11 +225,10 @@ Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
@@ -244,7 +239,7 @@ tags = ['tags_example'] # list[str] | Tags to filter by (optional)
|
||||
|
||||
try:
|
||||
# Finds Pets by tags
|
||||
api_response = api_instance.find_pets_by_tags(tags=tags);
|
||||
api_response = api_instance.find_pets_by_tags(tags=tags)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->find_pets_by_tags: %s\n" % e
|
||||
@@ -280,14 +275,13 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
swagger_client.configuration.api_key['api_key'] = 'YOUR_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
|
||||
@@ -299,7 +293,7 @@ pet_id = 789 # int | ID of pet that needs to be fetched
|
||||
|
||||
try:
|
||||
# Find pet by ID
|
||||
api_response = api_instance.get_pet_by_id(pet_id);
|
||||
api_response = api_instance.get_pet_by_id(pet_id)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->get_pet_by_id: %s\n" % e
|
||||
@@ -335,14 +329,13 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
swagger_client.configuration.api_key['api_key'] = 'YOUR_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
|
||||
@@ -354,7 +347,7 @@ 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);
|
||||
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
|
||||
@@ -390,14 +383,13 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
swagger_client.configuration.api_key['api_key'] = 'YOUR_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
|
||||
@@ -409,7 +401,7 @@ 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);
|
||||
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
|
||||
@@ -445,11 +437,10 @@ Update an existing pet
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
@@ -460,7 +451,7 @@ body = swagger_client.Pet() # Pet | Pet object that needs to be added to the sto
|
||||
|
||||
try:
|
||||
# Update an existing pet
|
||||
api_instance.update_pet(body=body);
|
||||
api_instance.update_pet(body=body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->update_pet: %s\n" % e
|
||||
```
|
||||
@@ -495,11 +486,10 @@ Updates a pet in the store with form data
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
@@ -512,7 +502,7 @@ status = 'status_example' # str | Updated status of the pet (optional)
|
||||
|
||||
try:
|
||||
# Updates a pet in the store with form data
|
||||
api_instance.update_pet_with_form(pet_id, name=name, status=status);
|
||||
api_instance.update_pet_with_form(pet_id, name=name, status=status)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->update_pet_with_form: %s\n" % e
|
||||
```
|
||||
@@ -549,11 +539,10 @@ uploads an image
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
@@ -566,7 +555,7 @@ 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_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->upload_file: %s\n" % e
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# swagger_client\StoreApi
|
||||
# swagger_client.StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
@@ -7,7 +7,7 @@ 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_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
|
||||
|
||||
@@ -21,11 +21,10 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.StoreApi()
|
||||
@@ -33,7 +32,7 @@ order_id = 'order_id_example' # str | ID of the order that needs to be deleted
|
||||
|
||||
try:
|
||||
# Delete purchase order by ID
|
||||
api_instance.delete_order(order_id);
|
||||
api_instance.delete_order(order_id)
|
||||
except ApiException as e:
|
||||
print "Exception when calling StoreApi->delete_order: %s\n" % e
|
||||
```
|
||||
@@ -68,18 +67,17 @@ 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
|
||||
import time
|
||||
|
||||
|
||||
# Configure API key authorization: test_api_client_id
|
||||
swagger_client.configuration.api_key['x-test_api_client_id'] = 'YOUR_API_KEY';
|
||||
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';
|
||||
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'
|
||||
|
||||
@@ -89,7 +87,7 @@ status = 'placed' # str | Status value that needs to be considered for query (op
|
||||
|
||||
try:
|
||||
# Finds orders by status
|
||||
api_response = api_instance.find_orders_by_status(status=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
|
||||
@@ -125,14 +123,13 @@ Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
swagger_client.configuration.api_key['api_key'] = 'YOUR_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'
|
||||
|
||||
@@ -141,7 +138,7 @@ api_instance = swagger_client.StoreApi()
|
||||
|
||||
try:
|
||||
# Returns pet inventories by status
|
||||
api_response = api_instance.get_inventory();
|
||||
api_response = api_instance.get_inventory()
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling StoreApi->get_inventory: %s\n" % e
|
||||
@@ -174,14 +171,13 @@ Returns an arbitrary object which is actually a map of status codes to quantitie
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
swagger_client.configuration.api_key['api_key'] = 'YOUR_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'
|
||||
|
||||
@@ -190,7 +186,7 @@ api_instance = swagger_client.StoreApi()
|
||||
|
||||
try:
|
||||
# Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
api_response = api_instance.get_inventory_in_object();
|
||||
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
|
||||
@@ -223,18 +219,17 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure API key authorization: test_api_key_header
|
||||
swagger_client.configuration.api_key['test_api_key_header'] = 'YOUR_API_KEY';
|
||||
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';
|
||||
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'
|
||||
|
||||
@@ -244,7 +239,7 @@ order_id = 'order_id_example' # str | ID of pet that needs to be fetched
|
||||
|
||||
try:
|
||||
# Find purchase order by ID
|
||||
api_response = api_instance.get_order_by_id(order_id);
|
||||
api_response = api_instance.get_order_by_id(order_id)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling StoreApi->get_order_by_id: %s\n" % e
|
||||
@@ -280,18 +275,17 @@ Place an order for a pet
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure API key authorization: test_api_client_id
|
||||
swagger_client.configuration.api_key['x-test_api_client_id'] = 'YOUR_API_KEY';
|
||||
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';
|
||||
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'
|
||||
|
||||
@@ -301,7 +295,7 @@ body = swagger_client.Order() # Order | order placed for purchasing the pet (opt
|
||||
|
||||
try:
|
||||
# Place an order for a pet
|
||||
api_response = api_instance.place_order(body=body);
|
||||
api_response = api_instance.place_order(body=body)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling StoreApi->place_order: %s\n" % e
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# swagger_client\UserApi
|
||||
# swagger_client.UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
@@ -23,11 +23,10 @@ This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
@@ -35,7 +34,7 @@ body = swagger_client.User() # User | Created user object (optional)
|
||||
|
||||
try:
|
||||
# Create user
|
||||
api_instance.create_user(body=body);
|
||||
api_instance.create_user(body=body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->create_user: %s\n" % e
|
||||
```
|
||||
@@ -70,11 +69,10 @@ Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
@@ -82,7 +80,7 @@ body = [swagger_client.User()] # list[User] | List of user object (optional)
|
||||
|
||||
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=body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->create_users_with_array_input: %s\n" % e
|
||||
```
|
||||
@@ -117,11 +115,10 @@ Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
@@ -129,7 +126,7 @@ body = [swagger_client.User()] # list[User] | List of user object (optional)
|
||||
|
||||
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=body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->create_users_with_list_input: %s\n" % e
|
||||
```
|
||||
@@ -164,11 +161,10 @@ This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure HTTP basic authorization: test_http_basic
|
||||
swagger_client.configuration.username = 'YOUR_USERNAME'
|
||||
@@ -180,7 +176,7 @@ username = 'username_example' # str | The name that needs to be deleted
|
||||
|
||||
try:
|
||||
# Delete user
|
||||
api_instance.delete_user(username);
|
||||
api_instance.delete_user(username)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->delete_user: %s\n" % e
|
||||
```
|
||||
@@ -215,19 +211,18 @@ Get user by user name
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
|
||||
username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
try:
|
||||
# Get user by user name
|
||||
api_response = api_instance.get_user_by_name(username);
|
||||
api_response = api_instance.get_user_by_name(username)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->get_user_by_name: %s\n" % e
|
||||
@@ -237,7 +232,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **str**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **str**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -263,11 +258,10 @@ Logs user into the system
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
@@ -276,7 +270,7 @@ password = 'password_example' # str | The password for login in clear text (opti
|
||||
|
||||
try:
|
||||
# Logs user into the system
|
||||
api_response = api_instance.login_user(username=username, password=password);
|
||||
api_response = api_instance.login_user(username=username, password=password)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->login_user: %s\n" % e
|
||||
@@ -313,18 +307,17 @@ Logs out current logged in user session
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
|
||||
try:
|
||||
# Logs out current logged in user session
|
||||
api_instance.logout_user();
|
||||
api_instance.logout_user()
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->logout_user: %s\n" % e
|
||||
```
|
||||
@@ -356,11 +349,10 @@ This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
@@ -369,7 +361,7 @@ body = swagger_client.User() # User | Updated user object (optional)
|
||||
|
||||
try:
|
||||
# Updated user
|
||||
api_instance.update_user(username, body=body);
|
||||
api_instance.update_user(username, body=body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->update_user: %s\n" % e
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user