add api documentation to php

This commit is contained in:
wing328
2016-03-14 17:25:11 +08:00
parent c69abad852
commit 532d22c5a3
16 changed files with 1539 additions and 5 deletions

View File

@@ -0,0 +1,16 @@
# ::Object::Category
## Load the model package
```perl
use ::Object::Category;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**name** | **string** | | [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)

View File

@@ -0,0 +1,20 @@
# ::Object::InlineResponse200
## Load the model package
```perl
use ::Object::InlineResponse200;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tags** | [**\Swagger\Client\Model\Tag[]**](Tag.md) | | [optional]
**id** | **int** | |
**category** | **object** | | [optional]
**status** | **string** | pet status in the store | [optional]
**name** | **string** | | [optional]
**photo_urls** | **string[]** | | [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)

View File

@@ -0,0 +1,15 @@
# ::Object::ModelReturn
## Load the model package
```perl
use ::Object::ModelReturn;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**return** | **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)

View File

@@ -0,0 +1,15 @@
# ::Object::Name
## Load the model package
```perl
use ::Object::Name;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **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)

View File

@@ -0,0 +1,20 @@
# ::Object::Order
## Load the model package
```perl
use ::Object::Order;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**pet_id** | **int** | | [optional]
**quantity** | **int** | | [optional]
**ship_date** | [**\DateTime**](\DateTime.md) | | [optional]
**status** | **string** | Order Status | [optional]
**complete** | **bool** | | [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)

View File

@@ -0,0 +1,20 @@
# ::Object::Pet
## Load the model package
```perl
use ::Object::Pet;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**category** | [**\Swagger\Client\Model\Category**](Category.md) | | [optional]
**name** | **string** | |
**photo_urls** | **string[]** | |
**tags** | [**\Swagger\Client\Model\Tag[]**](Tag.md) | | [optional]
**status** | **string** | pet status in the store | [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)

View File

@@ -0,0 +1,557 @@
# ::PetApi
## Load the API package
```perl
use ::Object::PetApi;
```
All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
[**addPetUsingByteArray**](PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
[**getPetByIdInObject**](PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
[**petPetIdtestingByteArraytrueGet**](PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
# **addPet**
> addPet(body => $body)
Add a new pet to the store
### Example
```perl
use Data::Dumper;
# Configure OAuth2 access token for authorization: petstore_auth
::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = ::PetApi->new();
my $body = ::Object::\Swagger\Client\Model\Pet->new(); # [\Swagger\Client\Model\Pet] Pet object that needs to be added to the store
eval {
$api->addPet(body => $body);
};
if ($@) {
warn "Exception when calling PetApi->addPet: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\Pet**](\Swagger\Client\Model\Pet.md)| Pet object that needs to be added to the store | [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
[[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)
# **addPetUsingByteArray**
> addPetUsingByteArray(body => $body)
Fake endpoint to test byte array in body parameter for adding a new pet to the store
### Example
```perl
use Data::Dumper;
# Configure OAuth2 access token for authorization: petstore_auth
::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = ::PetApi->new();
my $body = ::Object::string->new(); # [string] Pet object in the form of byte array
eval {
$api->addPetUsingByteArray(body => $body);
};
if ($@) {
warn "Exception when calling PetApi->addPetUsingByteArray: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **string**| 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
[[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)
# **deletePet**
> deletePet(pet_id => $pet_id, api_key => $api_key)
Deletes a pet
### Example
```perl
use Data::Dumper;
# Configure OAuth2 access token for authorization: petstore_auth
::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = ::PetApi->new();
my $pet_id = 789; # [int] Pet id to delete
my $api_key = api_key_example; # [string]
eval {
$api->deletePet(pet_id => $pet_id, api_key => $api_key);
};
if ($@) {
warn "Exception when calling PetApi->deletePet: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| Pet id to delete |
**api_key** | **string**| | [optional]
### Return type
void (empty response body)
### Authorization
[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)
# **findPetsByStatus**
> \Swagger\Client\Model\Pet[] findPetsByStatus(status => $status)
Finds Pets by status
Multiple status values can be provided with comma separated strings
### Example
```perl
use Data::Dumper;
# Configure OAuth2 access token for authorization: petstore_auth
::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = ::PetApi->new();
my $status = (array(available)); # [string[]] Status values that need to be considered for query
eval {
my $result = $api->findPetsByStatus(status => $status);
print Dumper($result);
};
if ($@) {
warn "Exception when calling PetApi->findPetsByStatus: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | [**string[]**](string.md)| Status values that need to be considered for query | [optional] [default to available]
### Return type
[**\Swagger\Client\Model\Pet[]**](Pet.md)
### Authorization
[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)
# **findPetsByTags**
> \Swagger\Client\Model\Pet[] findPetsByTags(tags => $tags)
Finds Pets by tags
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
### Example
```perl
use Data::Dumper;
# Configure OAuth2 access token for authorization: petstore_auth
::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = ::PetApi->new();
my $tags = (nil); # [string[]] Tags to filter by
eval {
my $result = $api->findPetsByTags(tags => $tags);
print Dumper($result);
};
if ($@) {
warn "Exception when calling PetApi->findPetsByTags: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tags** | [**string[]**](string.md)| Tags to filter by | [optional]
### Return type
[**\Swagger\Client\Model\Pet[]**](Pet.md)
### Authorization
[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)
# **getPetById**
> \Swagger\Client\Model\Pet getPetById(pet_id => $pet_id)
Find pet by ID
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
### Example
```perl
use Data::Dumper;
# Configure API key authorization: api_key
::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
#::Configuration::api_key_prefix->{'api_key'} = "BEARER";
# Configure OAuth2 access token for authorization: petstore_auth
::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = ::PetApi->new();
my $pet_id = 789; # [int] ID of pet that needs to be fetched
eval {
my $result = $api->getPetById(pet_id => $pet_id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling PetApi->getPetById: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet that needs to be fetched |
### Return type
[**\Swagger\Client\Model\Pet**](Pet.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)
# **getPetByIdInObject**
> \Swagger\Client\Model\InlineResponse200 getPetByIdInObject(pet_id => $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
```perl
use Data::Dumper;
# Configure API key authorization: api_key
::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
#::Configuration::api_key_prefix->{'api_key'} = "BEARER";
# Configure OAuth2 access token for authorization: petstore_auth
::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = ::PetApi->new();
my $pet_id = 789; # [int] ID of pet that needs to be fetched
eval {
my $result = $api->getPetByIdInObject(pet_id => $pet_id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling PetApi->getPetByIdInObject: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet that needs to be fetched |
### Return type
[**\Swagger\Client\Model\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)
# **petPetIdtestingByteArraytrueGet**
> string petPetIdtestingByteArraytrueGet(pet_id => $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
```perl
use Data::Dumper;
# Configure API key authorization: api_key
::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
#::Configuration::api_key_prefix->{'api_key'} = "BEARER";
# Configure OAuth2 access token for authorization: petstore_auth
::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = ::PetApi->new();
my $pet_id = 789; # [int] ID of pet that needs to be fetched
eval {
my $result = $api->petPetIdtestingByteArraytrueGet(pet_id => $pet_id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling PetApi->petPetIdtestingByteArraytrueGet: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet that needs to be fetched |
### Return type
**string**
### 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)
# **updatePet**
> updatePet(body => $body)
Update an existing pet
### Example
```perl
use Data::Dumper;
# Configure OAuth2 access token for authorization: petstore_auth
::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = ::PetApi->new();
my $body = ::Object::\Swagger\Client\Model\Pet->new(); # [\Swagger\Client\Model\Pet] Pet object that needs to be added to the store
eval {
$api->updatePet(body => $body);
};
if ($@) {
warn "Exception when calling PetApi->updatePet: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\Pet**](\Swagger\Client\Model\Pet.md)| Pet object that needs to be added to the store | [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
[[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)
# **updatePetWithForm**
> updatePetWithForm(pet_id => $pet_id, name => $name, status => $status)
Updates a pet in the store with form data
### Example
```perl
use Data::Dumper;
# Configure OAuth2 access token for authorization: petstore_auth
::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = ::PetApi->new();
my $pet_id = pet_id_example; # [string] ID of pet that needs to be updated
my $name = name_example; # [string] Updated name of the pet
my $status = status_example; # [string] Updated status of the pet
eval {
$api->updatePetWithForm(pet_id => $pet_id, name => $name, status => $status);
};
if ($@) {
warn "Exception when calling PetApi->updatePetWithForm: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **string**| ID of pet that needs to be updated |
**name** | **string**| Updated name of the pet | [optional]
**status** | **string**| Updated status of the pet | [optional]
### Return type
void (empty response body)
### Authorization
[petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
- **Content-Type**: application/x-www-form-urlencoded
- **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)
# **uploadFile**
> uploadFile(pet_id => $pet_id, additional_metadata => $additional_metadata, file => $file)
uploads an image
### Example
```perl
use Data::Dumper;
# Configure OAuth2 access token for authorization: petstore_auth
::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = ::PetApi->new();
my $pet_id = 789; # [int] ID of pet to update
my $additional_metadata = additional_metadata_example; # [string] Additional data to pass to server
my $file = new Swagger\Client\\SplFileObject(); # [\SplFileObject] file to upload
eval {
$api->uploadFile(pet_id => $pet_id, additional_metadata => $additional_metadata, file => $file);
};
if ($@) {
warn "Exception when calling PetApi->uploadFile: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet to update |
**additional_metadata** | **string**| Additional data to pass to server | [optional]
**file** | **\SplFileObject**| file to upload | [optional]
### Return type
void (empty response body)
### Authorization
[petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
- **Content-Type**: multipart/form-data
- **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)

View File

@@ -0,0 +1,15 @@
# ::Object::SpecialModelName
## Load the model package
```perl
use ::Object::SpecialModelName;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**special_property_name** | **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)

View File

@@ -0,0 +1,311 @@
# ::StoreApi
## Load the API package
```perl
use ::Object::StoreApi;
```
All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
[**findOrdersByStatus**](StoreApi.md#findOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
[**getInventoryInObject**](StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
# **deleteOrder**
> deleteOrder(order_id => $order_id)
Delete purchase order by ID
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
### Example
```perl
use Data::Dumper;
my $api = ::StoreApi->new();
my $order_id = order_id_example; # [string] ID of the order that needs to be deleted
eval {
$api->deleteOrder(order_id => $order_id);
};
if ($@) {
warn "Exception when calling StoreApi->deleteOrder: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order_id** | **string**| ID of the order that needs to be deleted |
### Return type
void (empty response body)
### Authorization
No authorization required
### 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)
# **findOrdersByStatus**
> \Swagger\Client\Model\Order[] findOrdersByStatus(status => $status)
Finds orders by status
A single status value can be provided as a string
### Example
```perl
use Data::Dumper;
# Configure API key authorization: test_api_client_id
::Configuration::api_key->{'x-test_api_client_id'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
#::Configuration::api_key_prefix->{'x-test_api_client_id'} = "BEARER";
# Configure API key authorization: test_api_client_secret
::Configuration::api_key->{'x-test_api_client_secret'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
#::Configuration::api_key_prefix->{'x-test_api_client_secret'} = "BEARER";
my $api = ::StoreApi->new();
my $status = placed; # [string] Status value that needs to be considered for query
eval {
my $result = $api->findOrdersByStatus(status => $status);
print Dumper($result);
};
if ($@) {
warn "Exception when calling StoreApi->findOrdersByStatus: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | **string**| Status value that needs to be considered for query | [optional] [default to placed]
### Return type
[**\Swagger\Client\Model\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
[[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)
# **getInventory**
> map[string,int] getInventory()
Returns pet inventories by status
Returns a map of status codes to quantities
### Example
```perl
use Data::Dumper;
# Configure API key authorization: api_key
::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
#::Configuration::api_key_prefix->{'api_key'} = "BEARER";
my $api = ::StoreApi->new();
eval {
my $result = $api->getInventory();
print Dumper($result);
};
if ($@) {
warn "Exception when calling StoreApi->getInventory: $@\n";
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**map[string,int]**](map.md)
### Authorization
[api_key](../README.md#api_key)
### 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)
# **getInventoryInObject**
> object getInventoryInObject()
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
```perl
use Data::Dumper;
# Configure API key authorization: api_key
::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
#::Configuration::api_key_prefix->{'api_key'} = "BEARER";
my $api = ::StoreApi->new();
eval {
my $result = $api->getInventoryInObject();
print Dumper($result);
};
if ($@) {
warn "Exception when calling StoreApi->getInventoryInObject: $@\n";
}
```
### 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
[[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)
# **getOrderById**
> \Swagger\Client\Model\Order getOrderById(order_id => $order_id)
Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
### Example
```perl
use Data::Dumper;
# Configure API key authorization: test_api_key_header
::Configuration::api_key->{'test_api_key_header'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
#::Configuration::api_key_prefix->{'test_api_key_header'} = "BEARER";
# Configure API key authorization: test_api_key_query
::Configuration::api_key->{'test_api_key_query'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
#::Configuration::api_key_prefix->{'test_api_key_query'} = "BEARER";
my $api = ::StoreApi->new();
my $order_id = order_id_example; # [string] ID of pet that needs to be fetched
eval {
my $result = $api->getOrderById(order_id => $order_id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling StoreApi->getOrderById: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order_id** | **string**| ID of pet that needs to be fetched |
### Return type
[**\Swagger\Client\Model\Order**](Order.md)
### Authorization
[test_api_key_header](../README.md#test_api_key_header), [test_api_key_query](../README.md#test_api_key_query)
### 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)
# **placeOrder**
> \Swagger\Client\Model\Order placeOrder(body => $body)
Place an order for a pet
### Example
```perl
use Data::Dumper;
# Configure API key authorization: test_api_client_id
::Configuration::api_key->{'x-test_api_client_id'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
#::Configuration::api_key_prefix->{'x-test_api_client_id'} = "BEARER";
# Configure API key authorization: test_api_client_secret
::Configuration::api_key->{'x-test_api_client_secret'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
#::Configuration::api_key_prefix->{'x-test_api_client_secret'} = "BEARER";
my $api = ::StoreApi->new();
my $body = ::Object::\Swagger\Client\Model\Order->new(); # [\Swagger\Client\Model\Order] order placed for purchasing the pet
eval {
my $result = $api->placeOrder(body => $body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling StoreApi->placeOrder: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\Order**](\Swagger\Client\Model\Order.md)| order placed for purchasing the pet | [optional]
### Return type
[**\Swagger\Client\Model\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
[[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)

View File

@@ -0,0 +1,16 @@
# ::Object::Tag
## Load the model package
```perl
use ::Object::Tag;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**name** | **string** | | [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)

View File

@@ -0,0 +1,22 @@
# ::Object::User
## Load the model package
```perl
use ::Object::User;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**username** | **string** | | [optional]
**first_name** | **string** | | [optional]
**last_name** | **string** | | [optional]
**email** | **string** | | [optional]
**password** | **string** | | [optional]
**phone** | **string** | | [optional]
**user_status** | **int** | User Status | [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)

View File

@@ -0,0 +1,371 @@
# ::UserApi
## Load the API package
```perl
use ::Object::UserApi;
```
All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**createUser**](UserApi.md#createUser) | **POST** /user | Create user
[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
# **createUser**
> createUser(body => $body)
Create user
This can only be done by the logged in user.
### Example
```perl
use Data::Dumper;
my $api = ::UserApi->new();
my $body = ::Object::\Swagger\Client\Model\User->new(); # [\Swagger\Client\Model\User] Created user object
eval {
$api->createUser(body => $body);
};
if ($@) {
warn "Exception when calling UserApi->createUser: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\User**](\Swagger\Client\Model\User.md)| Created user object | [optional]
### Return type
void (empty response body)
### Authorization
No authorization required
### 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)
# **createUsersWithArrayInput**
> createUsersWithArrayInput(body => $body)
Creates list of users with given input array
### Example
```perl
use Data::Dumper;
my $api = ::UserApi->new();
my $body = (::Object::\Swagger\Client\Model\User[]->new()); # [\Swagger\Client\Model\User[]] List of user object
eval {
$api->createUsersWithArrayInput(body => $body);
};
if ($@) {
warn "Exception when calling UserApi->createUsersWithArrayInput: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\User[]**](User.md)| List of user object | [optional]
### Return type
void (empty response body)
### Authorization
No authorization required
### 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)
# **createUsersWithListInput**
> createUsersWithListInput(body => $body)
Creates list of users with given input array
### Example
```perl
use Data::Dumper;
my $api = ::UserApi->new();
my $body = (::Object::\Swagger\Client\Model\User[]->new()); # [\Swagger\Client\Model\User[]] List of user object
eval {
$api->createUsersWithListInput(body => $body);
};
if ($@) {
warn "Exception when calling UserApi->createUsersWithListInput: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\User[]**](User.md)| List of user object | [optional]
### Return type
void (empty response body)
### Authorization
No authorization required
### 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)
# **deleteUser**
> deleteUser(username => $username)
Delete user
This can only be done by the logged in user.
### Example
```perl
use Data::Dumper;
# Configure HTTP basic authorization: test_http_basic
::Configuration::username = 'YOUR_USERNAME';
::Configuration::password = 'YOUR_PASSWORD';
my $api = ::UserApi->new();
my $username = username_example; # [string] The name that needs to be deleted
eval {
$api->deleteUser(username => $username);
};
if ($@) {
warn "Exception when calling UserApi->deleteUser: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **string**| The name that needs to be deleted |
### Return type
void (empty response body)
### Authorization
[test_http_basic](../README.md#test_http_basic)
### 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)
# **getUserByName**
> \Swagger\Client\Model\User getUserByName(username => $username)
Get user by user name
### Example
```perl
use Data::Dumper;
my $api = ::UserApi->new();
my $username = username_example; # [string] The name that needs to be fetched. Use user1 for testing.
eval {
my $result = $api->getUserByName(username => $username);
print Dumper($result);
};
if ($@) {
warn "Exception when calling UserApi->getUserByName: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **string**| The name that needs to be fetched. Use user1 for testing. |
### Return type
[**\Swagger\Client\Model\User**](User.md)
### Authorization
No authorization required
### 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)
# **loginUser**
> string loginUser(username => $username, password => $password)
Logs user into the system
### Example
```perl
use Data::Dumper;
my $api = ::UserApi->new();
my $username = username_example; # [string] The user name for login
my $password = password_example; # [string] The password for login in clear text
eval {
my $result = $api->loginUser(username => $username, password => $password);
print Dumper($result);
};
if ($@) {
warn "Exception when calling UserApi->loginUser: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **string**| The user name for login | [optional]
**password** | **string**| The password for login in clear text | [optional]
### Return type
**string**
### Authorization
No authorization required
### 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)
# **logoutUser**
> logoutUser()
Logs out current logged in user session
### Example
```perl
use Data::Dumper;
my $api = ::UserApi->new();
eval {
$api->logoutUser();
};
if ($@) {
warn "Exception when calling UserApi->logoutUser: $@\n";
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
void (empty response body)
### Authorization
No authorization required
### 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)
# **updateUser**
> updateUser(username => $username, body => $body)
Updated user
This can only be done by the logged in user.
### Example
```perl
use Data::Dumper;
my $api = ::UserApi->new();
my $username = username_example; # [string] name that need to be deleted
my $body = ::Object::\Swagger\Client\Model\User->new(); # [\Swagger\Client\Model\User] Updated user object
eval {
$api->updateUser(username => $username, body => $body);
};
if ($@) {
warn "Exception when calling UserApi->updateUser: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **string**| name that need to be deleted |
**body** | [**\Swagger\Client\Model\User**](\Swagger\Client\Model\User.md)| Updated user object | [optional]
### Return type
void (empty response body)
### Authorization
No authorization required
### 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)