add auth setting to perl doc

This commit is contained in:
wing328
2016-03-08 20:07:46 +08:00
parent d198983cdf
commit df61aa1a14
13 changed files with 1191 additions and 1158 deletions

View File

@@ -4,12 +4,53 @@ 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'
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
# **delete_order**
> delete_order(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
my $api = WWW::SwaggerClient::StoreApi->new();
my $order_id = 'order_id_example'; # [string] ID of the order that needs to be deleted
eval {
$api->delete_order(order_id => $order_id);
};
if ($@) {
warn "Exception when calling delete_order: $@\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
# **find_orders_by_status**
@@ -33,6 +74,7 @@ if ($@) {
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | **string**| Status value that needs to be considered for query | [optional] [default to placed]
@@ -41,17 +83,15 @@ Name | Type | Description | Notes
[**ARRAY[Order]**](Order.md)
### HTTP headers
### 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
### Authentication scheme
test_api_client_idtest_api_client_secret
# **get_inventory**
@@ -74,24 +114,21 @@ if ($@) {
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
This endpoint does not need any parameter.
### Return type
**HASH[string,int]**
### HTTP headers
### Authorization
[api_key](../README.md#api_key)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
### Authentication scheme
api_key
# **get_inventory_in_object**
@@ -114,66 +151,21 @@ if ($@) {
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
This endpoint does not need any parameter.
### Return type
**object**
### HTTP headers
### Authorization
[api_key](../README.md#api_key)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
### Authentication scheme
api_key
# **place_order**
> Order place_order(body => $body)
Place an order for a pet
### Example
```perl
my $api = WWW::SwaggerClient::StoreApi->new();
my $body = WWW::SwaggerClient::Object::Order->new(); # [Order] order placed for purchasing the pet
eval {
my $result = $api->place_order(body => $body);
};
if ($@) {
warn "Exception when calling place_order: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
### Return type
[**Order**](Order.md)
### HTTP headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
### Authentication scheme
test_api_client_idtest_api_client_secret
# **get_order_by_id**
@@ -197,6 +189,7 @@ if ($@) {
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order_id** | **string**| ID of pet that needs to be fetched |
@@ -205,58 +198,55 @@ Name | Type | Description | Notes
[**Order**](Order.md)
### HTTP headers
### 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
### Authentication scheme
test_api_key_headertest_api_key_query
# **place_order**
> Order place_order(body => $body)
Place an order for a pet
# **delete_order**
> delete_order(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
my $api = WWW::SwaggerClient::StoreApi->new();
my $order_id = 'order_id_example'; # [string] ID of the order that needs to be deleted
my $body = WWW::SwaggerClient::Object::Order->new(); # [Order] order placed for purchasing the pet
eval {
$api->delete_order(order_id => $order_id);
my $result = $api->place_order(body => $body);
};
if ($@) {
warn "Exception when calling delete_order: $@\n";
warn "Exception when calling place_order: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order_id** | **string**| ID of the order that needs to be deleted |
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
### Return type
void (empty response body)
[**Order**](Order.md)
### HTTP headers
### 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
### Authentication scheme
No authentiation required