forked from loafle/openapi-generator-original
update type mapping, update test.pl to use local file for testing upload
This commit is contained in:
@@ -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()";
|
||||
|
||||
@@ -20,7 +20,7 @@ use base "WWW::SwaggerClient::Object::BaseObject";
|
||||
#
|
||||
|
||||
my $swagger_types = {
|
||||
'id' => 'Math::BigInt',
|
||||
'id' => 'int',
|
||||
'name' => 'string'
|
||||
};
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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]',
|
||||
|
||||
@@ -20,7 +20,7 @@ use base "WWW::SwaggerClient::Object::BaseObject";
|
||||
#
|
||||
|
||||
my $swagger_types = {
|
||||
'id' => 'Math::BigInt',
|
||||
'id' => 'int',
|
||||
'name' => 'string'
|
||||
};
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user