add api and model documentation

This commit is contained in:
wing328 2016-03-06 13:07:09 +08:00
parent e5ed295a78
commit 855f46fed0
28 changed files with 2326 additions and 8 deletions

View File

@ -1839,10 +1839,15 @@ public class DefaultCodegen {
p.example = new String("2013-10-20"); p.example = new String("2013-10-20");
} else if (Boolean.TRUE.equals(p.isDateTime)) { } else if (Boolean.TRUE.equals(p.isDateTime)) {
p.example = new String("2013-10-20T19:20:30+01:00"); p.example = new String("2013-10-20T19:20:30+01:00");
} else if (param instanceof FormParameter &&
("file".equalsIgnoreCase(((FormParameter) param).getType()) ||
"file".equals(p.baseType))) {
p.isFile = true;
p.example = new String("/path/to/file.txt");
} }
// set the parameter excample value // set the parameter excample value
// should be overridden by exmaple value // should be overridden by lang codegen
setParameterExampleValue(p); setParameterExampleValue(p);
postProcessParameter(p); postProcessParameter(p);

View File

@ -35,6 +35,8 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
protected String moduleName = "WWW::SwaggerClient"; protected String moduleName = "WWW::SwaggerClient";
protected String modulePathPart = moduleName.replaceAll("::", Matcher.quoteReplacement(File.separator)); protected String modulePathPart = moduleName.replaceAll("::", Matcher.quoteReplacement(File.separator));
protected String moduleVersion = "1.0.0"; protected String moduleVersion = "1.0.0";
protected String apiDocPath = "docs/";
protected String modelDocPath = "docs/";
protected static int emptyFunctionNameCounter = 0; protected static int emptyFunctionNameCounter = 0;
@ -122,6 +124,10 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
additionalProperties.put(MODULE_NAME, moduleName); additionalProperties.put(MODULE_NAME, moduleName);
} }
// make api and model doc path available in mustache template
additionalProperties.put("apiDocPath", apiDocPath);
additionalProperties.put("modelDocPath", modelDocPath);
supportingFiles.add(new SupportingFile("ApiClient.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "ApiClient.pm")); supportingFiles.add(new SupportingFile("ApiClient.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "ApiClient.pm"));
supportingFiles.add(new SupportingFile("Configuration.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "Configuration.pm")); supportingFiles.add(new SupportingFile("Configuration.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "Configuration.pm"));
supportingFiles.add(new SupportingFile("ApiFactory.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "ApiFactory.pm")); supportingFiles.add(new SupportingFile("ApiFactory.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "ApiFactory.pm"));
@ -173,12 +179,12 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
@Override @Override
public String apiDocFileFolder() { public String apiDocFileFolder() {
return (outputFolder).replace('/', File.separatorChar); return (outputFolder + "/" + apiDocPath).replace('/', File.separatorChar);
} }
@Override @Override
public String modelDocFileFolder() { public String modelDocFileFolder() {
return (outputFolder).replace('/', File.separatorChar); return (outputFolder + "/" + modelDocPath).replace('/', File.separatorChar);
} }
@Override @Override
@ -375,7 +381,8 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
@Override @Override
public void setParameterExampleValue(CodegenParameter p) { public void setParameterExampleValue(CodegenParameter p) {
if (Boolean.TRUE.equals(p.isString) || Boolean.TRUE.equals(p.isBinary) || Boolean.TRUE.equals(p.isByteArray)) { if (Boolean.TRUE.equals(p.isString) || Boolean.TRUE.equals(p.isBinary) ||
Boolean.TRUE.equals(p.isByteArray) || Boolean.TRUE.equals(p.isFile)) {
p.example = "'" + p.example + "'"; p.example = "'" + p.example + "'";
} else if (Boolean.TRUE.equals(p.isBoolean)) { } else if (Boolean.TRUE.equals(p.isBoolean)) {
if (Boolean.parseBoolean(p.example)) if (Boolean.parseBoolean(p.example))

View File

@ -217,3 +217,17 @@ spec. If so, this is available via the `class_documentation()` and
Each of these calls returns a hashref with various useful pieces of information. Each of these calls returns a hashref with various useful pieces of information.
# DOCUMENTATION FOR API ENDPOINTS
All URIs are relative to {{basePath}}
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}{{classname}} | [{{nickname}}]({{apiDocPath}}{{classname}}.md#{{nickname}}) | {{httpMethod}} {{path}} | {{#summary}}{{summary}}{{/summary}}
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
# DOCUMENTATION FOR MODELS
{{#models}}{{#model}} - [{{moduleName}}::Object::{{classname}}]({{modelDocPath}}{{classname}}.md)
{{/model}}{{/models}}

View File

@ -1293,6 +1293,7 @@
} }
}, },
"Return": { "Return": {
"descripton": "Model for testing reserved words",
"properties": { "properties": {
"return": { "return": {
"type": "integer", "type": "integer",

View File

@ -8,7 +8,7 @@ WWW::SwaggerClient::Role - a Moose role for the Swagger Petstore
Automatically generated by the Perl Swagger Codegen project: Automatically generated by the Perl Swagger Codegen project:
- Build date: 2016-03-05T22:31:46.328+08:00 - Build date: 2016-03-06T12:43:31.929+08:00
- Build package: class io.swagger.codegen.languages.PerlClientCodegen - Build package: class io.swagger.codegen.languages.PerlClientCodegen
- Codegen version: - Codegen version:
@ -217,3 +217,48 @@ spec. If so, this is available via the `class_documentation()` and
Each of these calls returns a hashref with various useful pieces of information. Each of these calls returns a hashref with various useful pieces of information.
# DOCUMENTATION FOR API ENDPOINTS
All URIs are relative to http://petstore.swagger.io/v2
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
UserApi | [create_user](docs/UserApi.md#create_user) | POST /user | Create user
UserApi | [create_users_with_array_input](docs/UserApi.md#create_users_with_array_input) | POST /user/createWithArray | Creates list of users with given input array
UserApi | [create_users_with_list_input](docs/UserApi.md#create_users_with_list_input) | POST /user/createWithList | Creates list of users with given input array
UserApi | [login_user](docs/UserApi.md#login_user) | GET /user/login | Logs user into the system
UserApi | [logout_user](docs/UserApi.md#logout_user) | GET /user/logout | Logs out current logged in user session
UserApi | [get_user_by_name](docs/UserApi.md#get_user_by_name) | GET /user/{username} | Get user by user name
UserApi | [update_user](docs/UserApi.md#update_user) | PUT /user/{username} | Updated user
UserApi | [delete_user](docs/UserApi.md#delete_user) | DELETE /user/{username} | Delete user
PetApi | [update_pet](docs/PetApi.md#update_pet) | PUT /pet | Update an existing pet
PetApi | [add_pet](docs/PetApi.md#add_pet) | POST /pet | Add a new pet to the store
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 | [update_pet_with_form](docs/PetApi.md#update_pet_with_form) | POST /pet/{petId} | Updates a pet in the store with form data
PetApi | [delete_pet](docs/PetApi.md#delete_pet) | DELETE /pet/{petId} | Deletes a pet
PetApi | [upload_file](docs/PetApi.md#upload_file) | POST /pet/{petId}/uploadImage | uploads an image
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 | [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
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 | [place_order](docs/StoreApi.md#place_order) | POST /store/order | Place an order for a pet
StoreApi | [get_order_by_id](docs/StoreApi.md#get_order_by_id) | GET /store/order/{orderId} | Find purchase order by ID
StoreApi | [delete_order](docs/StoreApi.md#delete_order) | DELETE /store/order/{orderId} | Delete purchase order by ID
# DOCUMENTATION FOR MODELS
- [WWW::SwaggerClient::Object::User](docs/User.md)
- [WWW::SwaggerClient::Object::Category](docs/Category.md)
- [WWW::SwaggerClient::Object::Pet](docs/Pet.md)
- [WWW::SwaggerClient::Object::Tag](docs/Tag.md)
- [WWW::SwaggerClient::Object::ObjectReturn](docs/ObjectReturn.md)
- [WWW::SwaggerClient::Object::Order](docs/Order.md)
- [WWW::SwaggerClient::Object::SpecialModelName](docs/SpecialModelName.md)
- [WWW::SwaggerClient::Object::InlineResponse200](docs/InlineResponse200.md)

View File

@ -0,0 +1,14 @@
# Something::Deep::Object::Category
## Import the module
```perl
use Something::Deep::Object::Category;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional][default to null]
**name** | **string** | | [optional][default to null]

View File

@ -0,0 +1,18 @@
# Something::Deep::Object::InlineResponse200
## Import the module
```perl
use Something::Deep::Object::InlineResponse200;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tags** | [**ARRAY[Tag]**](docs/Tag.md) | | [optional][default to null]
**id** | **int** | | [default to null]
**category** | **object** | | [optional][default to null]
**status** | **string** | pet status in the store | [optional][default to null]
**name** | **string** | | [optional][default to null]
**photo_urls** | **ARRAY[string]** | | [optional][default to null]

View File

@ -0,0 +1,13 @@
# Something::Deep::Object::ObjectReturn
## Import the module
```perl
use Something::Deep::Object::ObjectReturn;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**return** | **int** | | [optional][default to null]

View File

@ -0,0 +1,18 @@
# Something::Deep::Object::Order
## Import the module
```perl
use Something::Deep::Object::Order;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional][default to null]
**pet_id** | **int** | | [optional][default to null]
**quantity** | **int** | | [optional][default to null]
**ship_date** | **DateTime** | | [optional][default to null]
**status** | **string** | Order Status | [optional][default to null]
**complete** | **boolean** | | [optional][default to null]

View File

@ -0,0 +1,18 @@
# Something::Deep::Object::Pet
## Import the module
```perl
use Something::Deep::Object::Pet;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional][default to null]
**category** | [**Category**](docs/Category.md) | | [optional][default to null]
**name** | **string** | | [default to null]
**photo_urls** | **ARRAY[string]** | | [default to null]
**tags** | [**ARRAY[Tag]**](docs/Tag.md) | | [optional][default to null]
**status** | **string** | pet status in the store | [optional][default to null]

View File

@ -0,0 +1,443 @@
# Something::Deep::PetApi
- [update_pet](#update_pet): Update an existing pet
- [add_pet](#add_pet): Add a new pet to the store
- [find_pets_by_status](#find_pets_by_status): Finds Pets by status
- [find_pets_by_tags](#find_pets_by_tags): Finds Pets by tags
- [get_pet_by_id](#get_pet_by_id): Find pet by ID
- [update_pet_with_form](#update_pet_with_form): Updates a pet in the store with form data
- [delete_pet](#delete_pet): Deletes a pet
- [upload_file](#upload_file): uploads an image
- [get_pet_by_id_in_object](#get_pet_by_id_in_object): Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
- [pet_pet_idtesting_byte_arraytrue_get](#pet_pet_idtesting_byte_arraytrue_get): Fake endpoint to test byte array return by 'Find pet by ID'
- [add_pet_using_byte_array](#add_pet_using_byte_array): Fake endpoint to test byte array in body parameter for adding a new pet to the store
## **update_pet**
Update an existing pet
### Sample
```perl
my $api = Something::Deep::PetApi->new();
my $body = new Something::Deep::Object::Pet->new(); # [Pet] Pet object that needs to be added to the store
eval {
my $result = $api->update_pet(body => $body);
};
if ($@) {
warn "Exception when calling update_pet: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | body | Pet | Pet object that needs to be added to the store
### Return type
void (empty response body)
### HTTP headers
Content-Type: application/json, application/xml
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
## **add_pet**
Add a new pet to the store
### Sample
```perl
my $api = Something::Deep::PetApi->new();
my $body = new Something::Deep::Object::Pet->new(); # [Pet] Pet object that needs to be added to the store
eval {
my $result = $api->add_pet(body => $body);
};
if ($@) {
warn "Exception when calling add_pet: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | body | Pet | Pet object that needs to be added to the store
### Return type
void (empty response body)
### HTTP headers
Content-Type: application/json, application/xml
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
## **find_pets_by_status**
Finds Pets by status
Multiple status values can be provided with comma separated strings
### Sample
```perl
my $api = Something::Deep::PetApi->new();
my $status = ; # [ARRAY[string]] Status values that need to be considered for query
eval {
my $result = $api->find_pets_by_status(status => $status);
};
if ($@) {
warn "Exception when calling find_pets_by_status: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | status | ARRAY[string] | Status values that need to be considered for query
### Return type
ARRAY[Pet]
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
## **find_pets_by_tags**
Finds Pets by tags
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
### Sample
```perl
my $api = Something::Deep::PetApi->new();
my $tags = ; # [ARRAY[string]] Tags to filter by
eval {
my $result = $api->find_pets_by_tags(tags => $tags);
};
if ($@) {
warn "Exception when calling find_pets_by_tags: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | tags | ARRAY[string] | Tags to filter by
### Return type
ARRAY[Pet]
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
## **get_pet_by_id**
Find pet by ID
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
### Sample
```perl
my $api = Something::Deep::PetApi->new();
my $pet_id = 789; # [int] ID of pet that needs to be fetched
eval {
my $result = $api->get_pet_by_id(pet_id => $pet_id);
};
if ($@) {
warn "Exception when calling get_pet_by_id: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | pet_id | int | ID of pet that needs to be fetched
### Return type
Pet
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
api_key petstore_auth
## **update_pet_with_form**
Updates a pet in the store with form data
### Sample
```perl
my $api = Something::Deep::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 {
my $result = $api->update_pet_with_form(pet_id => $pet_id, name => $name, status => $status);
};
if ($@) {
warn "Exception when calling update_pet_with_form: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | pet_id | string | ID of pet that needs to be updated
No | name | string | Updated name of the pet
No | status | string | Updated status of the pet
### Return type
void (empty response body)
### HTTP headers
Content-Type: application/x-www-form-urlencoded
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
## **delete_pet**
Deletes a pet
### Sample
```perl
my $api = Something::Deep::PetApi->new();
my $pet_id = 789; # [int] Pet id to delete
my $api_key = 'api_key_example'; # [string]
eval {
my $result = $api->delete_pet(pet_id => $pet_id, api_key => $api_key);
};
if ($@) {
warn "Exception when calling delete_pet: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | pet_id | int | Pet id to delete
No | api_key | string |
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
## **upload_file**
uploads an image
### Sample
```perl
my $api = Something::Deep::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 = '/path/to/file.txt'; # [File] file to upload
eval {
my $result = $api->upload_file(pet_id => $pet_id, additional_metadata => $additional_metadata, file => $file);
};
if ($@) {
warn "Exception when calling upload_file: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | pet_id | int | ID of pet to update
No | additional_metadata | string | Additional data to pass to server
No | file | File | file to upload
### Return type
void (empty response body)
### HTTP headers
Content-Type: multipart/form-data
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
## **get_pet_by_id_in_object**
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
### Sample
```perl
my $api = Something::Deep::PetApi->new();
my $pet_id = 789; # [int] ID of pet that needs to be fetched
eval {
my $result = $api->get_pet_by_id_in_object(pet_id => $pet_id);
};
if ($@) {
warn "Exception when calling get_pet_by_id_in_object: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | pet_id | int | ID of pet that needs to be fetched
### Return type
InlineResponse200
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
api_key petstore_auth
## **pet_pet_idtesting_byte_arraytrue_get**
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
### Sample
```perl
my $api = Something::Deep::PetApi->new();
my $pet_id = 789; # [int] ID of pet that needs to be fetched
eval {
my $result = $api->pet_pet_idtesting_byte_arraytrue_get(pet_id => $pet_id);
};
if ($@) {
warn "Exception when calling pet_pet_idtesting_byte_arraytrue_get: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | pet_id | int | ID of pet that needs to be fetched
### Return type
string
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
api_key petstore_auth
## **add_pet_using_byte_array**
Fake endpoint to test byte array in body parameter for adding a new pet to the store
### Sample
```perl
my $api = Something::Deep::PetApi->new();
my $body = new Something::Deep::Object::string->new(); # [string] Pet object in the form of byte array
eval {
my $result = $api->add_pet_using_byte_array(body => $body);
};
if ($@) {
warn "Exception when calling add_pet_using_byte_array: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | body | string | Pet object in the form of byte array
### Return type
void (empty response body)
### HTTP headers
Content-Type: application/json, application/xml
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
1;

View File

@ -0,0 +1,13 @@
# Something::Deep::Object::SpecialModelName
## Import the module
```perl
use Something::Deep::Object::SpecialModelName;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**__special[property/name]** | **int** | | [optional][default to null]

View File

@ -0,0 +1,234 @@
# Something::Deep::StoreApi
- [find_orders_by_status](#find_orders_by_status): Finds orders by status
- [get_inventory](#get_inventory): Returns pet inventories by status
- [get_inventory_in_object](#get_inventory_in_object): Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
- [place_order](#place_order): Place an order for a pet
- [get_order_by_id](#get_order_by_id): Find purchase order by ID
- [delete_order](#delete_order): Delete purchase order by ID
## **find_orders_by_status**
Finds orders by status
A single status value can be provided as a string
### Sample
```perl
my $api = Something::Deep::StoreApi->new();
my $status = 'status_example'; # [string] Status value that needs to be considered for query
eval {
my $result = $api->find_orders_by_status(status => $status);
};
if ($@) {
warn "Exception when calling find_orders_by_status: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | status | string | Status value that needs to be considered for query
### Return type
ARRAY[Order]
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
test_api_client_id test_api_client_secret
## **get_inventory**
Returns pet inventories by status
Returns a map of status codes to quantities
### Sample
```perl
my $api = Something::Deep::StoreApi->new();
eval {
my $result = $api->get_inventory();
};
if ($@) {
warn "Exception when calling get_inventory: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
### Return type
HASH[string,int]
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
api_key
## **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
### Sample
```perl
my $api = Something::Deep::StoreApi->new();
eval {
my $result = $api->get_inventory_in_object();
};
if ($@) {
warn "Exception when calling get_inventory_in_object: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
### Return type
object
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
api_key
## **place_order**
Place an order for a pet
### Sample
```perl
my $api = Something::Deep::StoreApi->new();
my $body = new Something::Deep::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
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | body | Order | order placed for purchasing the pet
### Return type
Order
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
test_api_client_id test_api_client_secret
## **get_order_by_id**
Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
### Sample
```perl
my $api = Something::Deep::StoreApi->new();
my $order_id = 'order_id_example'; # [string] ID of pet that needs to be fetched
eval {
my $result = $api->get_order_by_id(order_id => $order_id);
};
if ($@) {
warn "Exception when calling get_order_by_id: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | order_id | string | ID of pet that needs to be fetched
### Return type
Order
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
test_api_key_header test_api_key_query
## **delete_order**
Delete purchase order by ID
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
### Sample
```perl
my $api = Something::Deep::StoreApi->new();
my $order_id = 'order_id_example'; # [string] ID of the order that needs to be deleted
eval {
my $result = $api->delete_order(order_id => $order_id);
};
if ($@) {
warn "Exception when calling delete_order: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | order_id | string | ID of the order that needs to be deleted
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
1;

View File

@ -0,0 +1,14 @@
# Something::Deep::Object::Tag
## Import the module
```perl
use Something::Deep::Object::Tag;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional][default to null]
**name** | **string** | | [optional][default to null]

View File

@ -0,0 +1,20 @@
# Something::Deep::Object::User
## Import the module
```perl
use Something::Deep::Object::User;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional][default to null]
**username** | **string** | | [optional][default to null]
**first_name** | **string** | | [optional][default to null]
**last_name** | **string** | | [optional][default to null]
**email** | **string** | | [optional][default to null]
**password** | **string** | | [optional][default to null]
**phone** | **string** | | [optional][default to null]
**user_status** | **int** | User Status | [optional][default to null]

View File

@ -0,0 +1,318 @@
# Something::Deep::UserApi
- [create_user](#create_user): Create user
- [create_users_with_array_input](#create_users_with_array_input): Creates list of users with given input array
- [create_users_with_list_input](#create_users_with_list_input): Creates list of users with given input array
- [login_user](#login_user): Logs user into the system
- [logout_user](#logout_user): Logs out current logged in user session
- [get_user_by_name](#get_user_by_name): Get user by user name
- [update_user](#update_user): Updated user
- [delete_user](#delete_user): Delete user
## **create_user**
Create user
This can only be done by the logged in user.
### Sample
```perl
my $api = Something::Deep::UserApi->new();
my $body = new Something::Deep::Object::User->new(); # [User] Created user object
eval {
my $result = $api->create_user(body => $body);
};
if ($@) {
warn "Exception when calling create_user: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | body | User | Created user object
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
## **create_users_with_array_input**
Creates list of users with given input array
### Sample
```perl
my $api = Something::Deep::UserApi->new();
my $body = new Something::Deep::Object::ARRAY[User]->new(); # [ARRAY[User]] List of user object
eval {
my $result = $api->create_users_with_array_input(body => $body);
};
if ($@) {
warn "Exception when calling create_users_with_array_input: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | body | ARRAY[User] | List of user object
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
## **create_users_with_list_input**
Creates list of users with given input array
### Sample
```perl
my $api = Something::Deep::UserApi->new();
my $body = new Something::Deep::Object::ARRAY[User]->new(); # [ARRAY[User]] List of user object
eval {
my $result = $api->create_users_with_list_input(body => $body);
};
if ($@) {
warn "Exception when calling create_users_with_list_input: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | body | ARRAY[User] | List of user object
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
## **login_user**
Logs user into the system
### Sample
```perl
my $api = Something::Deep::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->login_user(username => $username, password => $password);
};
if ($@) {
warn "Exception when calling login_user: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | username | string | The user name for login
No | password | string | The password for login in clear text
### Return type
string
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
## **logout_user**
Logs out current logged in user session
### Sample
```perl
my $api = Something::Deep::UserApi->new();
eval {
my $result = $api->logout_user();
};
if ($@) {
warn "Exception when calling logout_user: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
## **get_user_by_name**
Get user by user name
### Sample
```perl
my $api = Something::Deep::UserApi->new();
my $username = 'username_example'; # [string] The name that needs to be fetched. Use user1 for testing.
eval {
my $result = $api->get_user_by_name(username => $username);
};
if ($@) {
warn "Exception when calling get_user_by_name: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | username | string | The name that needs to be fetched. Use user1 for testing.
### Return type
User
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
## **update_user**
Updated user
This can only be done by the logged in user.
### Sample
```perl
my $api = Something::Deep::UserApi->new();
my $username = 'username_example'; # [string] name that need to be deleted
my $body = new Something::Deep::Object::User->new(); # [User] Updated user object
eval {
my $result = $api->update_user(username => $username, body => $body);
};
if ($@) {
warn "Exception when calling update_user: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | username | string | name that need to be deleted
No | body | User | Updated user object
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
## **delete_user**
Delete user
This can only be done by the logged in user.
### Sample
```perl
my $api = Something::Deep::UserApi->new();
my $username = 'username_example'; # [string] The name that needs to be deleted
eval {
my $result = $api->delete_user(username => $username);
};
if ($@) {
warn "Exception when calling delete_user: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | username | string | The name that needs to be deleted
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
1;

View File

@ -0,0 +1,14 @@
# WWW::SwaggerClient::Object::Category
## Import the module
```perl
use WWW::SwaggerClient::Object::Category;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional][default to null]
**name** | **string** | | [optional][default to null]

View File

@ -0,0 +1,18 @@
# WWW::SwaggerClient::Object::InlineResponse200
## Import the module
```perl
use WWW::SwaggerClient::Object::InlineResponse200;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tags** | [**ARRAY[Tag]**](docs/Tag.md) | | [optional][default to null]
**id** | **int** | | [default to null]
**category** | **object** | | [optional][default to null]
**status** | **string** | pet status in the store | [optional][default to null]
**name** | **string** | | [optional][default to null]
**photo_urls** | **ARRAY[string]** | | [optional][default to null]

View File

@ -0,0 +1,13 @@
# WWW::SwaggerClient::Object::ObjectReturn
## Import the module
```perl
use WWW::SwaggerClient::Object::ObjectReturn;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**return** | **int** | | [optional][default to null]

View File

@ -0,0 +1,18 @@
# WWW::SwaggerClient::Object::Order
## Import the module
```perl
use WWW::SwaggerClient::Object::Order;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional][default to null]
**pet_id** | **int** | | [optional][default to null]
**quantity** | **int** | | [optional][default to null]
**ship_date** | **DateTime** | | [optional][default to null]
**status** | **string** | Order Status | [optional][default to null]
**complete** | **boolean** | | [optional][default to null]

View File

@ -0,0 +1,18 @@
# WWW::SwaggerClient::Object::Pet
## Import the module
```perl
use WWW::SwaggerClient::Object::Pet;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional][default to null]
**category** | [**Category**](docs/Category.md) | | [optional][default to null]
**name** | **string** | | [default to null]
**photo_urls** | **ARRAY[string]** | | [default to null]
**tags** | [**ARRAY[Tag]**](docs/Tag.md) | | [optional][default to null]
**status** | **string** | pet status in the store | [optional][default to null]

View File

@ -0,0 +1,443 @@
# WWW::SwaggerClient::PetApi
- [update_pet](#update_pet): Update an existing pet
- [add_pet](#add_pet): Add a new pet to the store
- [find_pets_by_status](#find_pets_by_status): Finds Pets by status
- [find_pets_by_tags](#find_pets_by_tags): Finds Pets by tags
- [get_pet_by_id](#get_pet_by_id): Find pet by ID
- [update_pet_with_form](#update_pet_with_form): Updates a pet in the store with form data
- [delete_pet](#delete_pet): Deletes a pet
- [upload_file](#upload_file): uploads an image
- [get_pet_by_id_in_object](#get_pet_by_id_in_object): Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
- [pet_pet_idtesting_byte_arraytrue_get](#pet_pet_idtesting_byte_arraytrue_get): Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
- [add_pet_using_byte_array](#add_pet_using_byte_array): Fake endpoint to test byte array in body parameter for adding a new pet to the store
## **update_pet**
Update an existing pet
### Sample
```perl
my $api = WWW::SwaggerClient::PetApi->new();
my $body = new WWW::SwaggerClient::Object::Pet->new(); # [Pet] Pet object that needs to be added to the store
eval {
my $result = $api->update_pet(body => $body);
};
if ($@) {
warn "Exception when calling update_pet: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | body | Pet | Pet object that needs to be added to the store
### Return type
void (empty response body)
### HTTP headers
Content-Type: application/json, application/xml
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
## **add_pet**
Add a new pet to the store
### Sample
```perl
my $api = WWW::SwaggerClient::PetApi->new();
my $body = new WWW::SwaggerClient::Object::Pet->new(); # [Pet] Pet object that needs to be added to the store
eval {
my $result = $api->add_pet(body => $body);
};
if ($@) {
warn "Exception when calling add_pet: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | body | Pet | Pet object that needs to be added to the store
### Return type
void (empty response body)
### HTTP headers
Content-Type: application/json, application/xml
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
## **find_pets_by_status**
Finds Pets by status
Multiple status values can be provided with comma separated strings
### Sample
```perl
my $api = WWW::SwaggerClient::PetApi->new();
my $status = ; # [ARRAY[string]] Status values that need to be considered for query
eval {
my $result = $api->find_pets_by_status(status => $status);
};
if ($@) {
warn "Exception when calling find_pets_by_status: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | status | ARRAY[string] | Status values that need to be considered for query
### Return type
ARRAY[Pet]
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
## **find_pets_by_tags**
Finds Pets by tags
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
### Sample
```perl
my $api = WWW::SwaggerClient::PetApi->new();
my $tags = ; # [ARRAY[string]] Tags to filter by
eval {
my $result = $api->find_pets_by_tags(tags => $tags);
};
if ($@) {
warn "Exception when calling find_pets_by_tags: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | tags | ARRAY[string] | Tags to filter by
### Return type
ARRAY[Pet]
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
## **get_pet_by_id**
Find pet by ID
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
### Sample
```perl
my $api = WWW::SwaggerClient::PetApi->new();
my $pet_id = 789; # [int] ID of pet that needs to be fetched
eval {
my $result = $api->get_pet_by_id(pet_id => $pet_id);
};
if ($@) {
warn "Exception when calling get_pet_by_id: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | pet_id | int | ID of pet that needs to be fetched
### Return type
Pet
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
api_key petstore_auth
## **update_pet_with_form**
Updates a pet in the store with form data
### Sample
```perl
my $api = WWW::SwaggerClient::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 {
my $result = $api->update_pet_with_form(pet_id => $pet_id, name => $name, status => $status);
};
if ($@) {
warn "Exception when calling update_pet_with_form: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | pet_id | string | ID of pet that needs to be updated
No | name | string | Updated name of the pet
No | status | string | Updated status of the pet
### Return type
void (empty response body)
### HTTP headers
Content-Type: application/x-www-form-urlencoded
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
## **delete_pet**
Deletes a pet
### Sample
```perl
my $api = WWW::SwaggerClient::PetApi->new();
my $pet_id = 789; # [int] Pet id to delete
my $api_key = 'api_key_example'; # [string]
eval {
my $result = $api->delete_pet(pet_id => $pet_id, api_key => $api_key);
};
if ($@) {
warn "Exception when calling delete_pet: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | pet_id | int | Pet id to delete
No | api_key | string |
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
## **upload_file**
uploads an image
### Sample
```perl
my $api = WWW::SwaggerClient::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 = '/path/to/file.txt'; # [File] file to upload
eval {
my $result = $api->upload_file(pet_id => $pet_id, additional_metadata => $additional_metadata, file => $file);
};
if ($@) {
warn "Exception when calling upload_file: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | pet_id | int | ID of pet to update
No | additional_metadata | string | Additional data to pass to server
No | file | File | file to upload
### Return type
void (empty response body)
### HTTP headers
Content-Type: multipart/form-data
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
## **get_pet_by_id_in_object**
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
### Sample
```perl
my $api = WWW::SwaggerClient::PetApi->new();
my $pet_id = 789; # [int] ID of pet that needs to be fetched
eval {
my $result = $api->get_pet_by_id_in_object(pet_id => $pet_id);
};
if ($@) {
warn "Exception when calling get_pet_by_id_in_object: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | pet_id | int | ID of pet that needs to be fetched
### Return type
InlineResponse200
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
api_key petstore_auth
## **pet_pet_idtesting_byte_arraytrue_get**
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
### Sample
```perl
my $api = WWW::SwaggerClient::PetApi->new();
my $pet_id = 789; # [int] ID of pet that needs to be fetched
eval {
my $result = $api->pet_pet_idtesting_byte_arraytrue_get(pet_id => $pet_id);
};
if ($@) {
warn "Exception when calling pet_pet_idtesting_byte_arraytrue_get: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | pet_id | int | ID of pet that needs to be fetched
### Return type
string
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
api_key petstore_auth
## **add_pet_using_byte_array**
Fake endpoint to test byte array in body parameter for adding a new pet to the store
### Sample
```perl
my $api = WWW::SwaggerClient::PetApi->new();
my $body = new WWW::SwaggerClient::Object::string->new(); # [string] Pet object in the form of byte array
eval {
my $result = $api->add_pet_using_byte_array(body => $body);
};
if ($@) {
warn "Exception when calling add_pet_using_byte_array: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | body | string | Pet object in the form of byte array
### Return type
void (empty response body)
### HTTP headers
Content-Type: application/json, application/xml
Accept: application/json, application/xml
### Authentication scheme
petstore_auth
1;

View File

@ -0,0 +1,13 @@
# WWW::SwaggerClient::Object::SpecialModelName
## Import the module
```perl
use WWW::SwaggerClient::Object::SpecialModelName;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**__special[property/name]** | **int** | | [optional][default to null]

View File

@ -0,0 +1,234 @@
# WWW::SwaggerClient::StoreApi
- [find_orders_by_status](#find_orders_by_status): Finds orders by status
- [get_inventory](#get_inventory): Returns pet inventories by status
- [get_inventory_in_object](#get_inventory_in_object): Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
- [place_order](#place_order): Place an order for a pet
- [get_order_by_id](#get_order_by_id): Find purchase order by ID
- [delete_order](#delete_order): Delete purchase order by ID
## **find_orders_by_status**
Finds orders by status
A single status value can be provided as a string
### Sample
```perl
my $api = WWW::SwaggerClient::StoreApi->new();
my $status = 'status_example'; # [string] Status value that needs to be considered for query
eval {
my $result = $api->find_orders_by_status(status => $status);
};
if ($@) {
warn "Exception when calling find_orders_by_status: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | status | string | Status value that needs to be considered for query
### Return type
ARRAY[Order]
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
test_api_client_id test_api_client_secret
## **get_inventory**
Returns pet inventories by status
Returns a map of status codes to quantities
### Sample
```perl
my $api = WWW::SwaggerClient::StoreApi->new();
eval {
my $result = $api->get_inventory();
};
if ($@) {
warn "Exception when calling get_inventory: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
### Return type
HASH[string,int]
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
api_key
## **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
### Sample
```perl
my $api = WWW::SwaggerClient::StoreApi->new();
eval {
my $result = $api->get_inventory_in_object();
};
if ($@) {
warn "Exception when calling get_inventory_in_object: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
### Return type
object
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
api_key
## **place_order**
Place an order for a pet
### Sample
```perl
my $api = WWW::SwaggerClient::StoreApi->new();
my $body = new 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
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | body | Order | order placed for purchasing the pet
### Return type
Order
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
test_api_client_id test_api_client_secret
## **get_order_by_id**
Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
### Sample
```perl
my $api = WWW::SwaggerClient::StoreApi->new();
my $order_id = 'order_id_example'; # [string] ID of pet that needs to be fetched
eval {
my $result = $api->get_order_by_id(order_id => $order_id);
};
if ($@) {
warn "Exception when calling get_order_by_id: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | order_id | string | ID of pet that needs to be fetched
### Return type
Order
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
test_api_key_header test_api_key_query
## **delete_order**
Delete purchase order by ID
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
### Sample
```perl
my $api = WWW::SwaggerClient::StoreApi->new();
my $order_id = 'order_id_example'; # [string] ID of the order that needs to be deleted
eval {
my $result = $api->delete_order(order_id => $order_id);
};
if ($@) {
warn "Exception when calling delete_order: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | order_id | string | ID of the order that needs to be deleted
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
1;

View File

@ -0,0 +1,14 @@
# WWW::SwaggerClient::Object::Tag
## Import the module
```perl
use WWW::SwaggerClient::Object::Tag;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional][default to null]
**name** | **string** | | [optional][default to null]

View File

@ -0,0 +1,20 @@
# WWW::SwaggerClient::Object::User
## Import the module
```perl
use WWW::SwaggerClient::Object::User;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional][default to null]
**username** | **string** | | [optional][default to null]
**first_name** | **string** | | [optional][default to null]
**last_name** | **string** | | [optional][default to null]
**email** | **string** | | [optional][default to null]
**password** | **string** | | [optional][default to null]
**phone** | **string** | | [optional][default to null]
**user_status** | **int** | User Status | [optional][default to null]

View File

@ -0,0 +1,318 @@
# WWW::SwaggerClient::UserApi
- [create_user](#create_user): Create user
- [create_users_with_array_input](#create_users_with_array_input): Creates list of users with given input array
- [create_users_with_list_input](#create_users_with_list_input): Creates list of users with given input array
- [login_user](#login_user): Logs user into the system
- [logout_user](#logout_user): Logs out current logged in user session
- [get_user_by_name](#get_user_by_name): Get user by user name
- [update_user](#update_user): Updated user
- [delete_user](#delete_user): Delete user
## **create_user**
Create user
This can only be done by the logged in user.
### Sample
```perl
my $api = WWW::SwaggerClient::UserApi->new();
my $body = new WWW::SwaggerClient::Object::User->new(); # [User] Created user object
eval {
my $result = $api->create_user(body => $body);
};
if ($@) {
warn "Exception when calling create_user: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | body | User | Created user object
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
## **create_users_with_array_input**
Creates list of users with given input array
### Sample
```perl
my $api = WWW::SwaggerClient::UserApi->new();
my $body = new WWW::SwaggerClient::Object::ARRAY[User]->new(); # [ARRAY[User]] List of user object
eval {
my $result = $api->create_users_with_array_input(body => $body);
};
if ($@) {
warn "Exception when calling create_users_with_array_input: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | body | ARRAY[User] | List of user object
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
## **create_users_with_list_input**
Creates list of users with given input array
### Sample
```perl
my $api = WWW::SwaggerClient::UserApi->new();
my $body = new WWW::SwaggerClient::Object::ARRAY[User]->new(); # [ARRAY[User]] List of user object
eval {
my $result = $api->create_users_with_list_input(body => $body);
};
if ($@) {
warn "Exception when calling create_users_with_list_input: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | body | ARRAY[User] | List of user object
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
## **login_user**
Logs user into the system
### Sample
```perl
my $api = WWW::SwaggerClient::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->login_user(username => $username, password => $password);
};
if ($@) {
warn "Exception when calling login_user: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
No | username | string | The user name for login
No | password | string | The password for login in clear text
### Return type
string
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
## **logout_user**
Logs out current logged in user session
### Sample
```perl
my $api = WWW::SwaggerClient::UserApi->new();
eval {
my $result = $api->logout_user();
};
if ($@) {
warn "Exception when calling logout_user: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
## **get_user_by_name**
Get user by user name
### Sample
```perl
my $api = WWW::SwaggerClient::UserApi->new();
my $username = 'username_example'; # [string] The name that needs to be fetched. Use user1 for testing.
eval {
my $result = $api->get_user_by_name(username => $username);
};
if ($@) {
warn "Exception when calling get_user_by_name: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | username | string | The name that needs to be fetched. Use user1 for testing.
### Return type
User
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
## **update_user**
Updated user
This can only be done by the logged in user.
### Sample
```perl
my $api = WWW::SwaggerClient::UserApi->new();
my $username = 'username_example'; # [string] name that need to be deleted
my $body = new WWW::SwaggerClient::Object::User->new(); # [User] Updated user object
eval {
my $result = $api->update_user(username => $username, body => $body);
};
if ($@) {
warn "Exception when calling update_user: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | username | string | name that need to be deleted
No | body | User | Updated user object
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
## **delete_user**
Delete user
This can only be done by the logged in user.
### Sample
```perl
my $api = WWW::SwaggerClient::UserApi->new();
my $username = 'username_example'; # [string] The name that needs to be deleted
eval {
my $result = $api->delete_user(username => $username);
};
if ($@) {
warn "Exception when calling delete_user: $@\n";
}
```
### Parameters
Required | Name | Type | Description
------------ | ------------- | ------------- | -------------
Yes | username | string | The name that needs to be deleted
### Return type
void (empty response body)
### HTTP headers
Content-Type: Not defined
Accept: application/json, application/xml
### Authentication scheme
1;

View File

@ -37,7 +37,7 @@ has version_info => ( is => 'ro',
default => sub { { default => sub { {
app_name => 'Swagger Petstore', app_name => 'Swagger Petstore',
app_version => '1.0.0', app_version => '1.0.0',
generated_date => '2016-03-05T22:31:46.328+08:00', generated_date => '2016-03-06T12:43:31.929+08:00',
generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen', generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen',
} }, } },
documentation => 'Information about the application version and the codegen codebase version' documentation => 'Information about the application version and the codegen codebase version'
@ -103,7 +103,7 @@ Automatically generated by the Perl Swagger Codegen project:
=over 4 =over 4
=item Build date: 2016-03-05T22:31:46.328+08:00 =item Build date: 2016-03-06T12:43:31.929+08:00
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen =item Build package: class io.swagger.codegen.languages.PerlClientCodegen