forked from loafle/openapi-generator-original
update perl sample
This commit is contained in:
@@ -21,10 +21,10 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
#
|
||||
|
||||
#__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
#__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
#__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
#__PACKAGE__->mk_classdata('class_documentation' => {});
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
__PACKAGE__->mk_classdata('class_documentation' => {});
|
||||
|
||||
# new object
|
||||
sub new {
|
||||
|
||||
@@ -567,65 +567,6 @@ sub delete_pet {
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
# download_file
|
||||
#
|
||||
# downloads an image
|
||||
#
|
||||
{
|
||||
my $params = {
|
||||
};
|
||||
__PACKAGE__->method_documentation->{ download_file } = {
|
||||
summary => 'downloads an image',
|
||||
params => $params,
|
||||
returns => 'File',
|
||||
};
|
||||
}
|
||||
# @return File
|
||||
#
|
||||
sub download_file {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
|
||||
|
||||
# parse inputs
|
||||
my $_resource_path = '/pet/{petId}/downloadImage';
|
||||
$_resource_path =~ s/{format}/json/; # default format to json
|
||||
|
||||
my $_method = 'GET';
|
||||
my $query_params = {};
|
||||
my $header_params = {};
|
||||
my $form_params = {};
|
||||
|
||||
# 'Accept' and 'Content-Type' header
|
||||
my $_header_accept = $self->{api_client}->select_header_accept('application/octet-stream');
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
my $_body_data;
|
||||
|
||||
|
||||
# authentication setting, if any
|
||||
my $auth_settings = [qw()];
|
||||
|
||||
# make the API Call
|
||||
my $response = $self->{api_client}->call_api($_resource_path, $_method,
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
if (!$response) {
|
||||
return;
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('File', $response);
|
||||
return $_response_object;
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
# upload_file
|
||||
#
|
||||
|
||||
@@ -37,7 +37,7 @@ has version_info => ( is => 'ro',
|
||||
default => sub { {
|
||||
app_name => 'Swagger Petstore',
|
||||
app_version => '1.0.0',
|
||||
generated_date => '2015-12-28T16:00:32.828+08:00',
|
||||
generated_date => '2015-12-28T16:09:37.489+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: 2015-12-28T16:00:32.828+08:00
|
||||
=item Build date: 2015-12-28T16:09:37.489+08:00
|
||||
|
||||
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||
|
||||
|
||||
Reference in New Issue
Block a user