update type mapping, update test.pl to use local file for testing upload

This commit is contained in:
William Cheng
2015-05-08 03:56:35 +08:00
parent 063a1ffd36
commit fc43828c20
10 changed files with 14 additions and 15 deletions

View File

@@ -65,7 +65,7 @@ sub _deserialize {
if ($type eq 'DateTime') {
return DateTime->from_epoch(epoch => str2time($data));
} elsif ( grep( /^$type$/, ('int', 'Math::BigInt', 'double', 'string', 'boolean'))) {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";

View File

@@ -20,7 +20,7 @@ use base "WWW::SwaggerClient::Object::BaseObject";
#
my $swagger_types = {
'id' => 'Math::BigInt',
'id' => 'int',
'name' => 'string'
};

View File

@@ -20,8 +20,8 @@ use base "WWW::SwaggerClient::Object::BaseObject";
#
my $swagger_types = {
'id' => 'Math::BigInt',
'pet_id' => 'Math::BigInt',
'id' => 'int',
'pet_id' => 'int',
'quantity' => 'int',
'ship_date' => 'DateTime',
'status' => 'string',

View File

@@ -20,7 +20,7 @@ use base "WWW::SwaggerClient::Object::BaseObject";
#
my $swagger_types = {
'id' => 'Math::BigInt',
'id' => 'int',
'category' => 'Category',
'name' => 'string',
'photo_urls' => 'ARRAY[string]',

View File

@@ -20,7 +20,7 @@ use base "WWW::SwaggerClient::Object::BaseObject";
#
my $swagger_types = {
'id' => 'Math::BigInt',
'id' => 'int',
'name' => 'string'
};

View File

@@ -20,7 +20,7 @@ use base "WWW::SwaggerClient::Object::BaseObject";
#
my $swagger_types = {
'id' => 'Math::BigInt',
'id' => 'int',
'username' => 'string',
'first_name' => 'string',
'last_name' => 'string',

View File

@@ -279,7 +279,7 @@ sub new {
#
# Find pet by ID
#
# @param Math::BigInt $pet_id ID of pet that needs to be fetched (required)
# @param int $pet_id ID of pet that needs to be fetched (required)
# @return Pet
#
sub get_pet_by_id {
@@ -411,7 +411,7 @@ sub new {
# Deletes a pet
#
# @param string $api_key (required)
# @param Math::BigInt $pet_id Pet id to delete (required)
# @param int $pet_id Pet id to delete (required)
# @return void
#
sub delete_pet {
@@ -472,7 +472,7 @@ sub new {
#
# uploads an image
#
# @param Math::BigInt $pet_id ID of pet to update (required)
# @param int $pet_id ID of pet to update (required)
# @param string $additional_metadata Additional data to pass to server (required)
# @param file $file file to upload (required)
# @return void