forked from loafle/openapi-generator-original
fix swift mapping with int and number
This commit is contained in:
@@ -10,7 +10,7 @@ Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build date: 2016-03-30T20:57:51.908+08:00
|
||||
- Build date: 2016-04-11T17:07:28.577+08:00
|
||||
- Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||
|
||||
## A note on Moose
|
||||
@@ -235,6 +235,7 @@ use WWW::SwaggerClient::Object::Animal;
|
||||
use WWW::SwaggerClient::Object::Cat;
|
||||
use WWW::SwaggerClient::Object::Category;
|
||||
use WWW::SwaggerClient::Object::Dog;
|
||||
use WWW::SwaggerClient::Object::FormatTest;
|
||||
use WWW::SwaggerClient::Object::InlineResponse200;
|
||||
use WWW::SwaggerClient::Object::Model200Response;
|
||||
use WWW::SwaggerClient::Object::ModelReturn;
|
||||
@@ -264,6 +265,7 @@ use WWW::SwaggerClient::Object::Animal;
|
||||
use WWW::SwaggerClient::Object::Cat;
|
||||
use WWW::SwaggerClient::Object::Category;
|
||||
use WWW::SwaggerClient::Object::Dog;
|
||||
use WWW::SwaggerClient::Object::FormatTest;
|
||||
use WWW::SwaggerClient::Object::InlineResponse200;
|
||||
use WWW::SwaggerClient::Object::Model200Response;
|
||||
use WWW::SwaggerClient::Object::ModelReturn;
|
||||
@@ -299,20 +301,20 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
|
||||
*PetApi* | [**add_pet_using_byte_array**](docs/PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
*PetApi* | [**add_pet_using_byte_array**](docs/PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
|
||||
*PetApi* | [**get_pet_by_id_in_object**](docs/PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
*PetApi* | [**pet_pet_idtesting_byte_arraytrue_get**](docs/PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
*PetApi* | [**get_pet_by_id_in_object**](docs/PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
*PetApi* | [**pet_pet_idtesting_byte_arraytrue_get**](docs/PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
|
||||
*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
*StoreApi* | [**find_orders_by_status**](docs/StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status
|
||||
*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*StoreApi* | [**get_inventory_in_object**](docs/StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
*StoreApi* | [**get_inventory_in_object**](docs/StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||
*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user
|
||||
@@ -330,6 +332,7 @@ Class | Method | HTTP request | Description
|
||||
- [WWW::SwaggerClient::Object::Cat](docs/Cat.md)
|
||||
- [WWW::SwaggerClient::Object::Category](docs/Category.md)
|
||||
- [WWW::SwaggerClient::Object::Dog](docs/Dog.md)
|
||||
- [WWW::SwaggerClient::Object::FormatTest](docs/FormatTest.md)
|
||||
- [WWW::SwaggerClient::Object::InlineResponse200](docs/InlineResponse200.md)
|
||||
- [WWW::SwaggerClient::Object::Model200Response](docs/Model200Response.md)
|
||||
- [WWW::SwaggerClient::Object::ModelReturn](docs/ModelReturn.md)
|
||||
|
||||
@@ -8,7 +8,7 @@ use WWW::SwaggerClient::Object::Name;
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **int** | | [optional]
|
||||
**name** | **int** | |
|
||||
**snake_case** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
@@ -10,13 +10,13 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
|
||||
[**add_pet_using_byte_array**](PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
[**add_pet_using_byte_array**](PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**get_pet_by_id_in_object**](PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
[**pet_pet_idtesting_byte_arraytrue_get**](PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
[**get_pet_by_id_in_object**](PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
[**pet_pet_idtesting_byte_arraytrue_get**](PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
|
||||
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
|
||||
@@ -12,7 +12,7 @@ Method | HTTP request | Description
|
||||
[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
[**find_orders_by_status**](StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status
|
||||
[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**get_inventory_in_object**](StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
[**get_inventory_in_object**](StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ Get user by user name
|
||||
use Data::Dumper;
|
||||
|
||||
my $api_instance = WWW::SwaggerClient::UserApi->new();
|
||||
my $username = 'username_example'; # string | The name that needs to be fetched. Use user1 for testing.
|
||||
my $username = 'username_example'; # string | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->get_user_by_name(username => $username);
|
||||
@@ -222,7 +222,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **string**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **string**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -326,47 +326,46 @@ sub update_params_for_auth {
|
||||
$header_params->{'test_api_key_header'} = $api_key;
|
||||
}
|
||||
}
|
||||
elsif ($auth eq 'api_key') {
|
||||
elsif ($auth eq 'api_key') {
|
||||
|
||||
my $api_key = $self->get_api_key_with_prefix('api_key');
|
||||
if ($api_key) {
|
||||
$header_params->{'api_key'} = $api_key;
|
||||
}
|
||||
}
|
||||
elsif ($auth eq 'test_http_basic') {
|
||||
elsif ($auth eq 'test_http_basic') {
|
||||
|
||||
if ($WWW::SwaggerClient::Configuration::username || $WWW::SwaggerClient::Configuration::password) {
|
||||
$header_params->{'Authorization'} = 'Basic ' . encode_base64($WWW::SwaggerClient::Configuration::username . ":" . $WWW::SwaggerClient::Configuration::password);
|
||||
}
|
||||
}
|
||||
elsif ($auth eq 'test_api_client_secret') {
|
||||
elsif ($auth eq 'test_api_client_secret') {
|
||||
|
||||
my $api_key = $self->get_api_key_with_prefix('x-test_api_client_secret');
|
||||
if ($api_key) {
|
||||
$header_params->{'x-test_api_client_secret'} = $api_key;
|
||||
}
|
||||
}
|
||||
elsif ($auth eq 'test_api_client_id') {
|
||||
elsif ($auth eq 'test_api_client_id') {
|
||||
|
||||
my $api_key = $self->get_api_key_with_prefix('x-test_api_client_id');
|
||||
if ($api_key) {
|
||||
$header_params->{'x-test_api_client_id'} = $api_key;
|
||||
}
|
||||
}
|
||||
elsif ($auth eq 'test_api_key_query') {
|
||||
elsif ($auth eq 'test_api_key_query') {
|
||||
|
||||
my $api_key = $self->get_api_key_with_prefix('test_api_key_query');
|
||||
if ($api_key) {
|
||||
$query_params->{'test_api_key_query'} = $api_key;
|
||||
}
|
||||
}
|
||||
elsif ($auth eq 'petstore_auth') {
|
||||
elsif ($auth eq 'petstore_auth') {
|
||||
|
||||
if ($WWW::SwaggerClient::Configuration::access_token) {
|
||||
$header_params->{'Authorization'} = 'Bearer ' . $WWW::SwaggerClient::Configuration::access_token;
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
# TODO show warning about security definition not found
|
||||
}
|
||||
|
||||
@@ -110,7 +110,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
@@ -110,14 +110,13 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'declawed' => {
|
||||
'declawed' => {
|
||||
datatype => 'boolean',
|
||||
base_name => 'declawed',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
@@ -110,14 +110,13 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'name' => {
|
||||
'name' => {
|
||||
datatype => 'string',
|
||||
base_name => 'name',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
@@ -110,14 +110,13 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'breed' => {
|
||||
'breed' => {
|
||||
datatype => 'string',
|
||||
base_name => 'breed',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
@@ -110,42 +110,41 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'id' => {
|
||||
'id' => {
|
||||
datatype => 'int',
|
||||
base_name => 'id',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'category' => {
|
||||
'category' => {
|
||||
datatype => 'object',
|
||||
base_name => 'category',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'status' => {
|
||||
'status' => {
|
||||
datatype => 'string',
|
||||
base_name => 'status',
|
||||
description => 'pet status in the store',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'name' => {
|
||||
'name' => {
|
||||
datatype => 'string',
|
||||
base_name => 'name',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'photo_urls' => {
|
||||
'photo_urls' => {
|
||||
datatype => 'ARRAY[string]',
|
||||
base_name => 'photoUrls',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
@@ -15,7 +15,7 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
#Model for testing model name starting with number
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
#
|
||||
@@ -97,7 +97,7 @@ sub _deserialize {
|
||||
|
||||
|
||||
|
||||
__PACKAGE__->class_documentation({description => '',
|
||||
__PACKAGE__->class_documentation({description => 'Model for testing model name starting with number',
|
||||
class => 'Model200Response',
|
||||
required => [], # TODO
|
||||
} );
|
||||
@@ -110,7 +110,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
@@ -15,7 +15,7 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
#Model for testing reserved words
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
#
|
||||
@@ -97,7 +97,7 @@ sub _deserialize {
|
||||
|
||||
|
||||
|
||||
__PACKAGE__->class_documentation({description => '',
|
||||
__PACKAGE__->class_documentation({description => 'Model for testing reserved words',
|
||||
class => 'ModelReturn',
|
||||
required => [], # TODO
|
||||
} );
|
||||
@@ -110,7 +110,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
@@ -15,7 +15,7 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
#Model for testing model name same as property name
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
#
|
||||
@@ -97,7 +97,7 @@ sub _deserialize {
|
||||
|
||||
|
||||
|
||||
__PACKAGE__->class_documentation({description => '',
|
||||
__PACKAGE__->class_documentation({description => 'Model for testing model name same as property name',
|
||||
class => 'Name',
|
||||
required => [], # TODO
|
||||
} );
|
||||
@@ -110,14 +110,13 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'snake_case' => {
|
||||
'snake_case' => {
|
||||
datatype => 'int',
|
||||
base_name => 'snake_case',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
@@ -110,42 +110,41 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'pet_id' => {
|
||||
'pet_id' => {
|
||||
datatype => 'int',
|
||||
base_name => 'petId',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'quantity' => {
|
||||
'quantity' => {
|
||||
datatype => 'int',
|
||||
base_name => 'quantity',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'ship_date' => {
|
||||
'ship_date' => {
|
||||
datatype => 'DateTime',
|
||||
base_name => 'shipDate',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'status' => {
|
||||
'status' => {
|
||||
datatype => 'string',
|
||||
base_name => 'status',
|
||||
description => 'Order Status',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'complete' => {
|
||||
'complete' => {
|
||||
datatype => 'boolean',
|
||||
base_name => 'complete',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
@@ -110,42 +110,41 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'category' => {
|
||||
'category' => {
|
||||
datatype => 'Category',
|
||||
base_name => 'category',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'name' => {
|
||||
'name' => {
|
||||
datatype => 'string',
|
||||
base_name => 'name',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'photo_urls' => {
|
||||
'photo_urls' => {
|
||||
datatype => 'ARRAY[string]',
|
||||
base_name => 'photoUrls',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'tags' => {
|
||||
'tags' => {
|
||||
datatype => 'ARRAY[Tag]',
|
||||
base_name => 'tags',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'status' => {
|
||||
'status' => {
|
||||
datatype => 'string',
|
||||
base_name => 'status',
|
||||
description => 'pet status in the store',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
@@ -110,7 +110,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
@@ -110,14 +110,13 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'name' => {
|
||||
'name' => {
|
||||
datatype => 'string',
|
||||
base_name => 'name',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
@@ -110,56 +110,55 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'username' => {
|
||||
'username' => {
|
||||
datatype => 'string',
|
||||
base_name => 'username',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'first_name' => {
|
||||
'first_name' => {
|
||||
datatype => 'string',
|
||||
base_name => 'firstName',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'last_name' => {
|
||||
'last_name' => {
|
||||
datatype => 'string',
|
||||
base_name => 'lastName',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'email' => {
|
||||
'email' => {
|
||||
datatype => 'string',
|
||||
base_name => 'email',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'password' => {
|
||||
'password' => {
|
||||
datatype => 'string',
|
||||
base_name => 'password',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'phone' => {
|
||||
'phone' => {
|
||||
datatype => 'string',
|
||||
base_name => 'phone',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'user_status' => {
|
||||
'user_status' => {
|
||||
datatype => 'int',
|
||||
base_name => 'userStatus',
|
||||
description => 'User Status',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
@@ -113,7 +113,6 @@ sub add_pet {
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
@@ -144,7 +143,7 @@ sub add_pet_using_byte_array {
|
||||
|
||||
|
||||
# parse inputs
|
||||
my $_resource_path = '/pet?testing_byte_array=true';
|
||||
my $_resource_path = '/pet?testing_byte_array=true';
|
||||
$_resource_path =~ s/{format}/json/; # default format to json
|
||||
|
||||
my $_method = 'POST';
|
||||
@@ -178,7 +177,6 @@ sub add_pet_using_byte_array {
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
@@ -259,7 +257,6 @@ sub delete_pet {
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
@@ -327,8 +324,7 @@ sub find_pets_by_status {
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('ARRAY[Pet]', $response);
|
||||
return $_response_object;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# find_pets_by_tags
|
||||
@@ -395,8 +391,7 @@ sub find_pets_by_tags {
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('ARRAY[Pet]', $response);
|
||||
return $_response_object;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# get_pet_by_id
|
||||
@@ -470,8 +465,7 @@ sub get_pet_by_id {
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('Pet', $response);
|
||||
return $_response_object;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# get_pet_by_id_in_object
|
||||
@@ -506,7 +500,7 @@ sub get_pet_by_id_in_object {
|
||||
|
||||
|
||||
# parse inputs
|
||||
my $_resource_path = '/pet/{petId}?response=inline_arbitrary_object';
|
||||
my $_resource_path = '/pet/{petId}?response=inline_arbitrary_object';
|
||||
$_resource_path =~ s/{format}/json/; # default format to json
|
||||
|
||||
my $_method = 'GET';
|
||||
@@ -545,8 +539,7 @@ sub get_pet_by_id_in_object {
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('InlineResponse200', $response);
|
||||
return $_response_object;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# pet_pet_idtesting_byte_arraytrue_get
|
||||
@@ -581,7 +574,7 @@ sub pet_pet_idtesting_byte_arraytrue_get {
|
||||
|
||||
|
||||
# parse inputs
|
||||
my $_resource_path = '/pet/{petId}?testing_byte_array=true';
|
||||
my $_resource_path = '/pet/{petId}?testing_byte_array=true';
|
||||
$_resource_path =~ s/{format}/json/; # default format to json
|
||||
|
||||
my $_method = 'GET';
|
||||
@@ -620,8 +613,7 @@ sub pet_pet_idtesting_byte_arraytrue_get {
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('string', $response);
|
||||
return $_response_object;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# update_pet
|
||||
@@ -685,7 +677,6 @@ sub update_pet {
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
@@ -758,14 +749,10 @@ sub update_pet_with_form {
|
||||
}
|
||||
# form params
|
||||
if ( exists $args{'name'} ) {
|
||||
|
||||
$form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'});
|
||||
|
||||
$form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'});
|
||||
}# form params
|
||||
if ( exists $args{'status'} ) {
|
||||
|
||||
$form_params->{'status'} = $self->{api_client}->to_form_value($args{'status'});
|
||||
|
||||
$form_params->{'status'} = $self->{api_client}->to_form_value($args{'status'});
|
||||
}
|
||||
my $_body_data;
|
||||
|
||||
@@ -779,7 +766,6 @@ sub update_pet_with_form {
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
@@ -852,16 +838,12 @@ sub upload_file {
|
||||
}
|
||||
# form params
|
||||
if ( exists $args{'additional_metadata'} ) {
|
||||
|
||||
$form_params->{'additionalMetadata'} = $self->{api_client}->to_form_value($args{'additional_metadata'});
|
||||
|
||||
$form_params->{'additionalMetadata'} = $self->{api_client}->to_form_value($args{'additional_metadata'});
|
||||
}# form params
|
||||
if ( exists $args{'file'} ) {
|
||||
$form_params->{'file'} = [] unless defined $form_params->{'file'};
|
||||
push @{$form_params->{'file'}}, $args{'file'};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
my $_body_data;
|
||||
|
||||
|
||||
@@ -874,7 +856,6 @@ sub upload_file {
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ has version_info => ( is => 'ro',
|
||||
default => sub { {
|
||||
app_name => 'Swagger Petstore',
|
||||
app_version => '1.0.0',
|
||||
generated_date => '2016-03-30T20:57:51.908+08:00',
|
||||
generated_date => '2016-04-11T17:07:28.577+08:00',
|
||||
generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen',
|
||||
} },
|
||||
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
|
||||
|
||||
=item Build date: 2016-03-30T20:57:51.908+08:00
|
||||
=item Build date: 2016-04-11T17:07:28.577+08:00
|
||||
|
||||
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||
|
||||
|
||||
@@ -120,7 +120,6 @@ sub delete_order {
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
@@ -188,8 +187,7 @@ sub find_orders_by_status {
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('ARRAY[Order]', $response);
|
||||
return $_response_object;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# get_inventory
|
||||
@@ -247,8 +245,7 @@ sub get_inventory {
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('HASH[string,int]', $response);
|
||||
return $_response_object;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# get_inventory_in_object
|
||||
@@ -272,7 +269,7 @@ sub get_inventory_in_object {
|
||||
|
||||
|
||||
# parse inputs
|
||||
my $_resource_path = '/store/inventory?response=arbitrary_object';
|
||||
my $_resource_path = '/store/inventory?response=arbitrary_object';
|
||||
$_resource_path =~ s/{format}/json/; # default format to json
|
||||
|
||||
my $_method = 'GET';
|
||||
@@ -306,8 +303,7 @@ sub get_inventory_in_object {
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('object', $response);
|
||||
return $_response_object;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# get_order_by_id
|
||||
@@ -381,8 +377,7 @@ sub get_order_by_id {
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('Order', $response);
|
||||
return $_response_object;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# place_order
|
||||
@@ -449,8 +444,7 @@ sub place_order {
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('Order', $response);
|
||||
return $_response_object;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
@@ -113,7 +113,6 @@ sub create_user {
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
@@ -178,7 +177,6 @@ sub create_users_with_array_input {
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
@@ -243,7 +241,6 @@ sub create_users_with_list_input {
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
@@ -315,7 +312,6 @@ sub delete_user {
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
@@ -323,12 +319,12 @@ sub delete_user {
|
||||
#
|
||||
# Get user by user name
|
||||
#
|
||||
# @param string $username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
# @param string $username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
{
|
||||
my $params = {
|
||||
'username' => {
|
||||
data_type => 'string',
|
||||
description => 'The name that needs to be fetched. Use user1 for testing.',
|
||||
description => 'The name that needs to be fetched. Use user1 for testing. ',
|
||||
required => '1',
|
||||
},
|
||||
};
|
||||
@@ -390,8 +386,7 @@ sub get_user_by_name {
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('User', $response);
|
||||
return $_response_object;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# login_user
|
||||
@@ -467,8 +462,7 @@ sub login_user {
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('string', $response);
|
||||
return $_response_object;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# logout_user
|
||||
@@ -523,7 +517,6 @@ sub logout_user {
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
@@ -604,7 +597,6 @@ sub update_user {
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user