forked from loafle/openapi-generator-original
update perl indention
This commit is contained in:
parent
b34c9dd7ee
commit
16a20f6194
@ -81,13 +81,15 @@ sub new {
|
|||||||
sub {{operationId}} {
|
sub {{operationId}} {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
{{#allParams}}{{#required}}
|
{{#allParams}}
|
||||||
|
{{#required}}
|
||||||
# verify the required parameter '{{paramName}}' is set
|
# verify the required parameter '{{paramName}}' is set
|
||||||
unless (exists $args{'{{paramName}}'}) {
|
unless (exists $args{'{{paramName}}'}) {
|
||||||
croak("Missing the required parameter '{{paramName}}' when calling {{operationId}}");
|
croak("Missing the required parameter '{{paramName}}' when calling {{operationId}}");
|
||||||
}
|
}
|
||||||
{{/required}}{{/allParams}}
|
|
||||||
|
|
||||||
|
{{/required}}
|
||||||
|
{{/allParams}}
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '{{path}}';
|
my $_resource_path = '{{path}}';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -104,54 +106,70 @@ sub {{operationId}} {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type({{#consumes}}'{{mediaType}}'{{#hasMore}}, {{/hasMore}}{{/consumes}});
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type({{#consumes}}'{{mediaType}}'{{#hasMore}}, {{/hasMore}}{{/consumes}});
|
||||||
|
|
||||||
{{#queryParams}}# query params
|
{{#queryParams}}
|
||||||
|
# query params
|
||||||
if ( exists $args{'{{paramName}}'}) {
|
if ( exists $args{'{{paramName}}'}) {
|
||||||
$query_params->{'{{baseName}}'} = $self->{api_client}->to_query_value($args{'{{paramName}}'});
|
$query_params->{'{{baseName}}'} = $self->{api_client}->to_query_value($args{'{{paramName}}'});
|
||||||
}{{/queryParams}}
|
}
|
||||||
{{#headerParams}}# header params
|
|
||||||
|
{{/queryParams}}
|
||||||
|
{{#headerParams}}
|
||||||
|
# header params
|
||||||
if ( exists $args{'{{paramName}}'}) {
|
if ( exists $args{'{{paramName}}'}) {
|
||||||
$header_params->{'{{baseName}}'} = $self->{api_client}->to_header_value($args{'{{paramName}}'});
|
$header_params->{'{{baseName}}'} = $self->{api_client}->to_header_value($args{'{{paramName}}'});
|
||||||
}{{/headerParams}}
|
}
|
||||||
{{#pathParams}}# path params
|
|
||||||
|
{{/headerParams}}
|
||||||
|
{{#pathParams}}
|
||||||
|
# path params
|
||||||
if ( exists $args{'{{paramName}}'}) {
|
if ( exists $args{'{{paramName}}'}) {
|
||||||
my $_base_variable = "{" . "{{baseName}}" . "}";
|
my $_base_variable = "{" . "{{baseName}}" . "}";
|
||||||
my $_base_value = $self->{api_client}->to_path_value($args{'{{paramName}}'});
|
my $_base_value = $self->{api_client}->to_path_value($args{'{{paramName}}'});
|
||||||
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
||||||
}{{/pathParams}}
|
}
|
||||||
{{#formParams}}# form params
|
|
||||||
|
{{/pathParams}}
|
||||||
|
{{#formParams}}
|
||||||
|
# form params
|
||||||
if ( exists $args{'{{paramName}}'} ) {
|
if ( exists $args{'{{paramName}}'} ) {
|
||||||
{{#isFile}}$form_params->{'{{baseName}}'} = [] unless defined $form_params->{'{{baseName}}'};
|
{{#isFile}}$form_params->{'{{baseName}}'} = [] unless defined $form_params->{'{{baseName}}'};
|
||||||
push @{$form_params->{'{{baseName}}'}}, $args{'{{paramName}}'};
|
push @{$form_params->{'{{baseName}}'}}, $args{'{{paramName}}'};
|
||||||
{{/isFile}}
|
{{/isFile}}
|
||||||
{{^isFile}}$form_params->{'{{baseName}}'} = $self->{api_client}->to_form_value($args{'{{paramName}}'});
|
{{^isFile}}$form_params->{'{{baseName}}'} = $self->{api_client}->to_form_value($args{'{{paramName}}'});
|
||||||
{{/isFile}}
|
{{/isFile}}
|
||||||
}{{/formParams}}
|
}
|
||||||
|
|
||||||
|
{{/formParams}}
|
||||||
my $_body_data;
|
my $_body_data;
|
||||||
{{#bodyParams}}# body params
|
{{#bodyParams}}
|
||||||
|
# body params
|
||||||
if ( exists $args{'{{paramName}}'}) {
|
if ( exists $args{'{{paramName}}'}) {
|
||||||
$_body_data = $args{'{{paramName}}'};
|
$_body_data = $args{'{{paramName}}'};
|
||||||
}{{/bodyParams}}
|
}
|
||||||
|
|
||||||
|
{{/bodyParams}}
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw({{#authMethods}}{{name}} {{/authMethods}})];
|
my $auth_settings = [qw({{#authMethods}}{{name}} {{/authMethods}})];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
{{#returnType}}my $response = $self->{api_client}->call_api($_resource_path, $_method,
|
{{#returnType}}
|
||||||
|
my $response = $self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
if (!$response) {
|
if (!$response) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
my $_response_object = $self->{api_client}->deserialize('{{returnType}}', $response);
|
my $_response_object = $self->{api_client}->deserialize('{{returnType}}', $response);
|
||||||
return $_response_object;{{/returnType}}
|
return $_response_object;
|
||||||
{{^returnType}}$self->{api_client}->call_api($_resource_path, $_method,
|
{{/returnType}}
|
||||||
|
{{^returnType}}
|
||||||
|
$self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
return;
|
return;
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
}
|
}
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
{{newline}}
|
|
||||||
{{/operations}}
|
{{/operations}}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -10,7 +10,7 @@ Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/
|
|||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- Package version: 1.0.0
|
- Package version: 1.0.0
|
||||||
- Build date: 2016-04-11T20:30:20.696+08:00
|
- Build date: 2016-04-12T12:54:53.924+08:00
|
||||||
- Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
- Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||||
|
|
||||||
## A note on Moose
|
## A note on Moose
|
||||||
|
@ -18,7 +18,8 @@ Name | Type | Description | Notes
|
|||||||
**byte** | **string** | | [optional]
|
**byte** | **string** | | [optional]
|
||||||
**binary** | **string** | | [optional]
|
**binary** | **string** | | [optional]
|
||||||
**date** | **DateTime** | | [optional]
|
**date** | **DateTime** | | [optional]
|
||||||
**date_time** | **string** | | [optional]
|
**date_time** | **DateTime** | | [optional]
|
||||||
|
**password** | **string** | | [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)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -174,12 +174,19 @@ __PACKAGE__->method_documentation({
|
|||||||
read_only => '',
|
read_only => '',
|
||||||
},
|
},
|
||||||
'date_time' => {
|
'date_time' => {
|
||||||
datatype => 'string',
|
datatype => 'DateTime',
|
||||||
base_name => 'dateTime',
|
base_name => 'dateTime',
|
||||||
description => '',
|
description => '',
|
||||||
format => '',
|
format => '',
|
||||||
read_only => '',
|
read_only => '',
|
||||||
},
|
},
|
||||||
|
'password' => {
|
||||||
|
datatype => 'string',
|
||||||
|
base_name => 'password',
|
||||||
|
description => '',
|
||||||
|
format => '',
|
||||||
|
read_only => '',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
__PACKAGE__->swagger_types( {
|
__PACKAGE__->swagger_types( {
|
||||||
@ -193,7 +200,8 @@ __PACKAGE__->swagger_types( {
|
|||||||
'byte' => 'string',
|
'byte' => 'string',
|
||||||
'binary' => 'string',
|
'binary' => 'string',
|
||||||
'date' => 'DateTime',
|
'date' => 'DateTime',
|
||||||
'date_time' => 'string'
|
'date_time' => 'DateTime',
|
||||||
|
'password' => 'string'
|
||||||
} );
|
} );
|
||||||
|
|
||||||
__PACKAGE__->attribute_map( {
|
__PACKAGE__->attribute_map( {
|
||||||
@ -207,7 +215,8 @@ __PACKAGE__->attribute_map( {
|
|||||||
'byte' => 'byte',
|
'byte' => 'byte',
|
||||||
'binary' => 'binary',
|
'binary' => 'binary',
|
||||||
'date' => 'date',
|
'date' => 'date',
|
||||||
'date_time' => 'dateTime'
|
'date_time' => 'dateTime',
|
||||||
|
'password' => 'password'
|
||||||
} );
|
} );
|
||||||
|
|
||||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||||
|
@ -76,8 +76,6 @@ sub new {
|
|||||||
sub add_pet {
|
sub add_pet {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/pet';
|
my $_resource_path = '/pet';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -94,10 +92,6 @@ sub add_pet {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json', 'application/xml');
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json', 'application/xml');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $_body_data;
|
my $_body_data;
|
||||||
# body params
|
# body params
|
||||||
if ( exists $args{'body'}) {
|
if ( exists $args{'body'}) {
|
||||||
@ -108,7 +102,6 @@ sub add_pet {
|
|||||||
my $auth_settings = [qw(petstore_auth )];
|
my $auth_settings = [qw(petstore_auth )];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
|
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
$self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
@ -140,8 +133,6 @@ sub add_pet {
|
|||||||
sub add_pet_using_byte_array {
|
sub add_pet_using_byte_array {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# 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
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -158,10 +149,6 @@ sub add_pet_using_byte_array {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json', 'application/xml');
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json', 'application/xml');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $_body_data;
|
my $_body_data;
|
||||||
# body params
|
# body params
|
||||||
if ( exists $args{'body'}) {
|
if ( exists $args{'body'}) {
|
||||||
@ -172,7 +159,6 @@ sub add_pet_using_byte_array {
|
|||||||
my $auth_settings = [qw(petstore_auth )];
|
my $auth_settings = [qw(petstore_auth )];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
|
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
$self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
@ -210,12 +196,10 @@ sub add_pet_using_byte_array {
|
|||||||
sub delete_pet {
|
sub delete_pet {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
# verify the required parameter 'pet_id' is set
|
# verify the required parameter 'pet_id' is set
|
||||||
unless (exists $args{'pet_id'}) {
|
unless (exists $args{'pet_id'}) {
|
||||||
croak("Missing the required parameter 'pet_id' when calling delete_pet");
|
croak("Missing the required parameter 'pet_id' when calling delete_pet");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/pet/{petId}';
|
my $_resource_path = '/pet/{petId}';
|
||||||
@ -233,26 +217,23 @@ sub delete_pet {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
# header params
|
# header params
|
||||||
if ( exists $args{'api_key'}) {
|
if ( exists $args{'api_key'}) {
|
||||||
$header_params->{'api_key'} = $self->{api_client}->to_header_value($args{'api_key'});
|
$header_params->{'api_key'} = $self->{api_client}->to_header_value($args{'api_key'});
|
||||||
}
|
}
|
||||||
|
|
||||||
# path params
|
# path params
|
||||||
if ( exists $args{'pet_id'}) {
|
if ( exists $args{'pet_id'}) {
|
||||||
my $_base_variable = "{" . "petId" . "}";
|
my $_base_variable = "{" . "petId" . "}";
|
||||||
my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'});
|
my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'});
|
||||||
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
|
|
||||||
|
|
||||||
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(petstore_auth )];
|
my $auth_settings = [qw(petstore_auth )];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
|
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
$self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
@ -284,8 +265,6 @@ sub delete_pet {
|
|||||||
sub find_pets_by_status {
|
sub find_pets_by_status {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/pet/findByStatus';
|
my $_resource_path = '/pet/findByStatus';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -306,12 +285,8 @@ sub find_pets_by_status {
|
|||||||
if ( exists $args{'status'}) {
|
if ( exists $args{'status'}) {
|
||||||
$query_params->{'status'} = $self->{api_client}->to_query_value($args{'status'});
|
$query_params->{'status'} = $self->{api_client}->to_query_value($args{'status'});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
|
|
||||||
|
|
||||||
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(petstore_auth )];
|
my $auth_settings = [qw(petstore_auth )];
|
||||||
|
|
||||||
@ -324,7 +299,7 @@ sub find_pets_by_status {
|
|||||||
}
|
}
|
||||||
my $_response_object = $self->{api_client}->deserialize('ARRAY[Pet]', $response);
|
my $_response_object = $self->{api_client}->deserialize('ARRAY[Pet]', $response);
|
||||||
return $_response_object;
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# find_pets_by_tags
|
# find_pets_by_tags
|
||||||
@ -351,8 +326,6 @@ sub find_pets_by_status {
|
|||||||
sub find_pets_by_tags {
|
sub find_pets_by_tags {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/pet/findByTags';
|
my $_resource_path = '/pet/findByTags';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -373,12 +346,8 @@ sub find_pets_by_tags {
|
|||||||
if ( exists $args{'tags'}) {
|
if ( exists $args{'tags'}) {
|
||||||
$query_params->{'tags'} = $self->{api_client}->to_query_value($args{'tags'});
|
$query_params->{'tags'} = $self->{api_client}->to_query_value($args{'tags'});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
|
|
||||||
|
|
||||||
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(petstore_auth )];
|
my $auth_settings = [qw(petstore_auth )];
|
||||||
|
|
||||||
@ -391,7 +360,7 @@ sub find_pets_by_tags {
|
|||||||
}
|
}
|
||||||
my $_response_object = $self->{api_client}->deserialize('ARRAY[Pet]', $response);
|
my $_response_object = $self->{api_client}->deserialize('ARRAY[Pet]', $response);
|
||||||
return $_response_object;
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# get_pet_by_id
|
# get_pet_by_id
|
||||||
@ -418,12 +387,10 @@ sub find_pets_by_tags {
|
|||||||
sub get_pet_by_id {
|
sub get_pet_by_id {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
# verify the required parameter 'pet_id' is set
|
# verify the required parameter 'pet_id' is set
|
||||||
unless (exists $args{'pet_id'}) {
|
unless (exists $args{'pet_id'}) {
|
||||||
croak("Missing the required parameter 'pet_id' when calling get_pet_by_id");
|
croak("Missing the required parameter 'pet_id' when calling get_pet_by_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/pet/{petId}';
|
my $_resource_path = '/pet/{petId}';
|
||||||
@ -441,18 +408,14 @@ sub get_pet_by_id {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# path params
|
# path params
|
||||||
if ( exists $args{'pet_id'}) {
|
if ( exists $args{'pet_id'}) {
|
||||||
my $_base_variable = "{" . "petId" . "}";
|
my $_base_variable = "{" . "petId" . "}";
|
||||||
my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'});
|
my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'});
|
||||||
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
|
|
||||||
|
|
||||||
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(api_key petstore_auth )];
|
my $auth_settings = [qw(api_key petstore_auth )];
|
||||||
|
|
||||||
@ -465,7 +428,7 @@ sub get_pet_by_id {
|
|||||||
}
|
}
|
||||||
my $_response_object = $self->{api_client}->deserialize('Pet', $response);
|
my $_response_object = $self->{api_client}->deserialize('Pet', $response);
|
||||||
return $_response_object;
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# get_pet_by_id_in_object
|
# get_pet_by_id_in_object
|
||||||
@ -492,12 +455,10 @@ sub get_pet_by_id {
|
|||||||
sub get_pet_by_id_in_object {
|
sub get_pet_by_id_in_object {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
# verify the required parameter 'pet_id' is set
|
# verify the required parameter 'pet_id' is set
|
||||||
unless (exists $args{'pet_id'}) {
|
unless (exists $args{'pet_id'}) {
|
||||||
croak("Missing the required parameter 'pet_id' when calling get_pet_by_id_in_object");
|
croak("Missing the required parameter 'pet_id' when calling get_pet_by_id_in_object");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/pet/{petId}?response=inline_arbitrary_object';
|
my $_resource_path = '/pet/{petId}?response=inline_arbitrary_object';
|
||||||
@ -515,18 +476,14 @@ sub get_pet_by_id_in_object {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# path params
|
# path params
|
||||||
if ( exists $args{'pet_id'}) {
|
if ( exists $args{'pet_id'}) {
|
||||||
my $_base_variable = "{" . "petId" . "}";
|
my $_base_variable = "{" . "petId" . "}";
|
||||||
my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'});
|
my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'});
|
||||||
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
|
|
||||||
|
|
||||||
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(api_key petstore_auth )];
|
my $auth_settings = [qw(api_key petstore_auth )];
|
||||||
|
|
||||||
@ -539,7 +496,7 @@ sub get_pet_by_id_in_object {
|
|||||||
}
|
}
|
||||||
my $_response_object = $self->{api_client}->deserialize('InlineResponse200', $response);
|
my $_response_object = $self->{api_client}->deserialize('InlineResponse200', $response);
|
||||||
return $_response_object;
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# pet_pet_idtesting_byte_arraytrue_get
|
# pet_pet_idtesting_byte_arraytrue_get
|
||||||
@ -566,12 +523,10 @@ sub get_pet_by_id_in_object {
|
|||||||
sub pet_pet_idtesting_byte_arraytrue_get {
|
sub pet_pet_idtesting_byte_arraytrue_get {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
# verify the required parameter 'pet_id' is set
|
# verify the required parameter 'pet_id' is set
|
||||||
unless (exists $args{'pet_id'}) {
|
unless (exists $args{'pet_id'}) {
|
||||||
croak("Missing the required parameter 'pet_id' when calling pet_pet_idtesting_byte_arraytrue_get");
|
croak("Missing the required parameter 'pet_id' when calling pet_pet_idtesting_byte_arraytrue_get");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/pet/{petId}?testing_byte_array=true';
|
my $_resource_path = '/pet/{petId}?testing_byte_array=true';
|
||||||
@ -589,18 +544,14 @@ sub pet_pet_idtesting_byte_arraytrue_get {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# path params
|
# path params
|
||||||
if ( exists $args{'pet_id'}) {
|
if ( exists $args{'pet_id'}) {
|
||||||
my $_base_variable = "{" . "petId" . "}";
|
my $_base_variable = "{" . "petId" . "}";
|
||||||
my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'});
|
my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'});
|
||||||
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
|
|
||||||
|
|
||||||
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(api_key petstore_auth )];
|
my $auth_settings = [qw(api_key petstore_auth )];
|
||||||
|
|
||||||
@ -613,7 +564,7 @@ sub pet_pet_idtesting_byte_arraytrue_get {
|
|||||||
}
|
}
|
||||||
my $_response_object = $self->{api_client}->deserialize('string', $response);
|
my $_response_object = $self->{api_client}->deserialize('string', $response);
|
||||||
return $_response_object;
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# update_pet
|
# update_pet
|
||||||
@ -640,8 +591,6 @@ sub pet_pet_idtesting_byte_arraytrue_get {
|
|||||||
sub update_pet {
|
sub update_pet {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/pet';
|
my $_resource_path = '/pet';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -658,10 +607,6 @@ sub update_pet {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json', 'application/xml');
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json', 'application/xml');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $_body_data;
|
my $_body_data;
|
||||||
# body params
|
# body params
|
||||||
if ( exists $args{'body'}) {
|
if ( exists $args{'body'}) {
|
||||||
@ -672,7 +617,6 @@ sub update_pet {
|
|||||||
my $auth_settings = [qw(petstore_auth )];
|
my $auth_settings = [qw(petstore_auth )];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
|
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
$self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
@ -716,12 +660,10 @@ sub update_pet {
|
|||||||
sub update_pet_with_form {
|
sub update_pet_with_form {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
# verify the required parameter 'pet_id' is set
|
# verify the required parameter 'pet_id' is set
|
||||||
unless (exists $args{'pet_id'}) {
|
unless (exists $args{'pet_id'}) {
|
||||||
croak("Missing the required parameter 'pet_id' when calling update_pet_with_form");
|
croak("Missing the required parameter 'pet_id' when calling update_pet_with_form");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/pet/{petId}';
|
my $_resource_path = '/pet/{petId}';
|
||||||
@ -739,29 +681,28 @@ sub update_pet_with_form {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/x-www-form-urlencoded');
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/x-www-form-urlencoded');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# path params
|
# path params
|
||||||
if ( exists $args{'pet_id'}) {
|
if ( exists $args{'pet_id'}) {
|
||||||
my $_base_variable = "{" . "petId" . "}";
|
my $_base_variable = "{" . "petId" . "}";
|
||||||
my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'});
|
my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'});
|
||||||
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
# form params
|
# form params
|
||||||
if ( exists $args{'name'} ) {
|
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
|
}
|
||||||
|
|
||||||
|
# form params
|
||||||
if ( exists $args{'status'} ) {
|
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;
|
|
||||||
|
|
||||||
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(petstore_auth )];
|
my $auth_settings = [qw(petstore_auth )];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
|
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
$self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
@ -805,12 +746,10 @@ sub update_pet_with_form {
|
|||||||
sub upload_file {
|
sub upload_file {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
# verify the required parameter 'pet_id' is set
|
# verify the required parameter 'pet_id' is set
|
||||||
unless (exists $args{'pet_id'}) {
|
unless (exists $args{'pet_id'}) {
|
||||||
croak("Missing the required parameter 'pet_id' when calling upload_file");
|
croak("Missing the required parameter 'pet_id' when calling upload_file");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/pet/{petId}/uploadImage';
|
my $_resource_path = '/pet/{petId}/uploadImage';
|
||||||
@ -828,35 +767,33 @@ sub upload_file {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data');
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# path params
|
# path params
|
||||||
if ( exists $args{'pet_id'}) {
|
if ( exists $args{'pet_id'}) {
|
||||||
my $_base_variable = "{" . "petId" . "}";
|
my $_base_variable = "{" . "petId" . "}";
|
||||||
my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'});
|
my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'});
|
||||||
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
# form params
|
# form params
|
||||||
if ( exists $args{'additional_metadata'} ) {
|
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
|
}
|
||||||
|
|
||||||
|
# form params
|
||||||
if ( exists $args{'file'} ) {
|
if ( exists $args{'file'} ) {
|
||||||
$form_params->{'file'} = [] unless defined $form_params->{'file'};
|
$form_params->{'file'} = [] unless defined $form_params->{'file'};
|
||||||
push @{$form_params->{'file'}}, $args{'file'};
|
push @{$form_params->{'file'}}, $args{'file'};
|
||||||
}
|
}
|
||||||
my $_body_data;
|
|
||||||
|
|
||||||
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(petstore_auth )];
|
my $auth_settings = [qw(petstore_auth )];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
|
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
$self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -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-04-11T20:30:20.696+08:00',
|
generated_date => '2016-04-12T12:54:53.924+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-04-11T20:30:20.696+08:00
|
=item Build date: 2016-04-12T12:54:53.924+08:00
|
||||||
|
|
||||||
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||||
|
|
||||||
|
@ -76,12 +76,10 @@ sub new {
|
|||||||
sub delete_order {
|
sub delete_order {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
# verify the required parameter 'order_id' is set
|
# verify the required parameter 'order_id' is set
|
||||||
unless (exists $args{'order_id'}) {
|
unless (exists $args{'order_id'}) {
|
||||||
croak("Missing the required parameter 'order_id' when calling delete_order");
|
croak("Missing the required parameter 'order_id' when calling delete_order");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/store/order/{orderId}';
|
my $_resource_path = '/store/order/{orderId}';
|
||||||
@ -99,23 +97,18 @@ sub delete_order {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# path params
|
# path params
|
||||||
if ( exists $args{'order_id'}) {
|
if ( exists $args{'order_id'}) {
|
||||||
my $_base_variable = "{" . "orderId" . "}";
|
my $_base_variable = "{" . "orderId" . "}";
|
||||||
my $_base_value = $self->{api_client}->to_path_value($args{'order_id'});
|
my $_base_value = $self->{api_client}->to_path_value($args{'order_id'});
|
||||||
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
|
|
||||||
|
|
||||||
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw()];
|
my $auth_settings = [qw()];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
|
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
$self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
@ -147,8 +140,6 @@ sub delete_order {
|
|||||||
sub find_orders_by_status {
|
sub find_orders_by_status {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/store/findByStatus';
|
my $_resource_path = '/store/findByStatus';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -169,12 +160,8 @@ sub find_orders_by_status {
|
|||||||
if ( exists $args{'status'}) {
|
if ( exists $args{'status'}) {
|
||||||
$query_params->{'status'} = $self->{api_client}->to_query_value($args{'status'});
|
$query_params->{'status'} = $self->{api_client}->to_query_value($args{'status'});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
|
|
||||||
|
|
||||||
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(test_api_client_id test_api_client_secret )];
|
my $auth_settings = [qw(test_api_client_id test_api_client_secret )];
|
||||||
|
|
||||||
@ -187,7 +174,7 @@ sub find_orders_by_status {
|
|||||||
}
|
}
|
||||||
my $_response_object = $self->{api_client}->deserialize('ARRAY[Order]', $response);
|
my $_response_object = $self->{api_client}->deserialize('ARRAY[Order]', $response);
|
||||||
return $_response_object;
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# get_inventory
|
# get_inventory
|
||||||
@ -208,8 +195,6 @@ sub find_orders_by_status {
|
|||||||
sub get_inventory {
|
sub get_inventory {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/store/inventory';
|
my $_resource_path = '/store/inventory';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -226,13 +211,7 @@ sub get_inventory {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $_body_data;
|
my $_body_data;
|
||||||
|
|
||||||
|
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(api_key )];
|
my $auth_settings = [qw(api_key )];
|
||||||
|
|
||||||
@ -245,7 +224,7 @@ sub get_inventory {
|
|||||||
}
|
}
|
||||||
my $_response_object = $self->{api_client}->deserialize('HASH[string,int]', $response);
|
my $_response_object = $self->{api_client}->deserialize('HASH[string,int]', $response);
|
||||||
return $_response_object;
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# get_inventory_in_object
|
# get_inventory_in_object
|
||||||
@ -266,8 +245,6 @@ sub get_inventory {
|
|||||||
sub get_inventory_in_object {
|
sub get_inventory_in_object {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# 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
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -284,13 +261,7 @@ sub get_inventory_in_object {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $_body_data;
|
my $_body_data;
|
||||||
|
|
||||||
|
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(api_key )];
|
my $auth_settings = [qw(api_key )];
|
||||||
|
|
||||||
@ -303,7 +274,7 @@ sub get_inventory_in_object {
|
|||||||
}
|
}
|
||||||
my $_response_object = $self->{api_client}->deserialize('object', $response);
|
my $_response_object = $self->{api_client}->deserialize('object', $response);
|
||||||
return $_response_object;
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# get_order_by_id
|
# get_order_by_id
|
||||||
@ -330,12 +301,10 @@ sub get_inventory_in_object {
|
|||||||
sub get_order_by_id {
|
sub get_order_by_id {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
# verify the required parameter 'order_id' is set
|
# verify the required parameter 'order_id' is set
|
||||||
unless (exists $args{'order_id'}) {
|
unless (exists $args{'order_id'}) {
|
||||||
croak("Missing the required parameter 'order_id' when calling get_order_by_id");
|
croak("Missing the required parameter 'order_id' when calling get_order_by_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/store/order/{orderId}';
|
my $_resource_path = '/store/order/{orderId}';
|
||||||
@ -353,18 +322,14 @@ sub get_order_by_id {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# path params
|
# path params
|
||||||
if ( exists $args{'order_id'}) {
|
if ( exists $args{'order_id'}) {
|
||||||
my $_base_variable = "{" . "orderId" . "}";
|
my $_base_variable = "{" . "orderId" . "}";
|
||||||
my $_base_value = $self->{api_client}->to_path_value($args{'order_id'});
|
my $_base_value = $self->{api_client}->to_path_value($args{'order_id'});
|
||||||
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
|
|
||||||
|
|
||||||
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(test_api_key_header test_api_key_query )];
|
my $auth_settings = [qw(test_api_key_header test_api_key_query )];
|
||||||
|
|
||||||
@ -377,7 +342,7 @@ sub get_order_by_id {
|
|||||||
}
|
}
|
||||||
my $_response_object = $self->{api_client}->deserialize('Order', $response);
|
my $_response_object = $self->{api_client}->deserialize('Order', $response);
|
||||||
return $_response_object;
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# place_order
|
# place_order
|
||||||
@ -404,8 +369,6 @@ sub get_order_by_id {
|
|||||||
sub place_order {
|
sub place_order {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/store/order';
|
my $_resource_path = '/store/order';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -422,10 +385,6 @@ sub place_order {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $_body_data;
|
my $_body_data;
|
||||||
# body params
|
# body params
|
||||||
if ( exists $args{'body'}) {
|
if ( exists $args{'body'}) {
|
||||||
@ -444,7 +403,6 @@ sub place_order {
|
|||||||
}
|
}
|
||||||
my $_response_object = $self->{api_client}->deserialize('Order', $response);
|
my $_response_object = $self->{api_client}->deserialize('Order', $response);
|
||||||
return $_response_object;
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -76,8 +76,6 @@ sub new {
|
|||||||
sub create_user {
|
sub create_user {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/user';
|
my $_resource_path = '/user';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -94,10 +92,6 @@ sub create_user {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $_body_data;
|
my $_body_data;
|
||||||
# body params
|
# body params
|
||||||
if ( exists $args{'body'}) {
|
if ( exists $args{'body'}) {
|
||||||
@ -108,7 +102,6 @@ sub create_user {
|
|||||||
my $auth_settings = [qw()];
|
my $auth_settings = [qw()];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
|
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
$self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
@ -140,8 +133,6 @@ sub create_user {
|
|||||||
sub create_users_with_array_input {
|
sub create_users_with_array_input {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/user/createWithArray';
|
my $_resource_path = '/user/createWithArray';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -158,10 +149,6 @@ sub create_users_with_array_input {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $_body_data;
|
my $_body_data;
|
||||||
# body params
|
# body params
|
||||||
if ( exists $args{'body'}) {
|
if ( exists $args{'body'}) {
|
||||||
@ -172,7 +159,6 @@ sub create_users_with_array_input {
|
|||||||
my $auth_settings = [qw()];
|
my $auth_settings = [qw()];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
|
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
$self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
@ -204,8 +190,6 @@ sub create_users_with_array_input {
|
|||||||
sub create_users_with_list_input {
|
sub create_users_with_list_input {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/user/createWithList';
|
my $_resource_path = '/user/createWithList';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -222,10 +206,6 @@ sub create_users_with_list_input {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $_body_data;
|
my $_body_data;
|
||||||
# body params
|
# body params
|
||||||
if ( exists $args{'body'}) {
|
if ( exists $args{'body'}) {
|
||||||
@ -236,7 +216,6 @@ sub create_users_with_list_input {
|
|||||||
my $auth_settings = [qw()];
|
my $auth_settings = [qw()];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
|
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
$self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
@ -268,12 +247,10 @@ sub create_users_with_list_input {
|
|||||||
sub delete_user {
|
sub delete_user {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
# verify the required parameter 'username' is set
|
# verify the required parameter 'username' is set
|
||||||
unless (exists $args{'username'}) {
|
unless (exists $args{'username'}) {
|
||||||
croak("Missing the required parameter 'username' when calling delete_user");
|
croak("Missing the required parameter 'username' when calling delete_user");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/user/{username}';
|
my $_resource_path = '/user/{username}';
|
||||||
@ -291,23 +268,18 @@ sub delete_user {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# path params
|
# path params
|
||||||
if ( exists $args{'username'}) {
|
if ( exists $args{'username'}) {
|
||||||
my $_base_variable = "{" . "username" . "}";
|
my $_base_variable = "{" . "username" . "}";
|
||||||
my $_base_value = $self->{api_client}->to_path_value($args{'username'});
|
my $_base_value = $self->{api_client}->to_path_value($args{'username'});
|
||||||
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
|
|
||||||
|
|
||||||
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(test_http_basic )];
|
my $auth_settings = [qw(test_http_basic )];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
|
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
$self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
@ -339,12 +311,10 @@ sub delete_user {
|
|||||||
sub get_user_by_name {
|
sub get_user_by_name {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
# verify the required parameter 'username' is set
|
# verify the required parameter 'username' is set
|
||||||
unless (exists $args{'username'}) {
|
unless (exists $args{'username'}) {
|
||||||
croak("Missing the required parameter 'username' when calling get_user_by_name");
|
croak("Missing the required parameter 'username' when calling get_user_by_name");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/user/{username}';
|
my $_resource_path = '/user/{username}';
|
||||||
@ -362,18 +332,14 @@ sub get_user_by_name {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# path params
|
# path params
|
||||||
if ( exists $args{'username'}) {
|
if ( exists $args{'username'}) {
|
||||||
my $_base_variable = "{" . "username" . "}";
|
my $_base_variable = "{" . "username" . "}";
|
||||||
my $_base_value = $self->{api_client}->to_path_value($args{'username'});
|
my $_base_value = $self->{api_client}->to_path_value($args{'username'});
|
||||||
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
|
|
||||||
|
|
||||||
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw()];
|
my $auth_settings = [qw()];
|
||||||
|
|
||||||
@ -386,7 +352,7 @@ sub get_user_by_name {
|
|||||||
}
|
}
|
||||||
my $_response_object = $self->{api_client}->deserialize('User', $response);
|
my $_response_object = $self->{api_client}->deserialize('User', $response);
|
||||||
return $_response_object;
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# login_user
|
# login_user
|
||||||
@ -419,8 +385,6 @@ sub get_user_by_name {
|
|||||||
sub login_user {
|
sub login_user {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/user/login';
|
my $_resource_path = '/user/login';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -440,16 +404,14 @@ sub login_user {
|
|||||||
# query params
|
# query params
|
||||||
if ( exists $args{'username'}) {
|
if ( exists $args{'username'}) {
|
||||||
$query_params->{'username'} = $self->{api_client}->to_query_value($args{'username'});
|
$query_params->{'username'} = $self->{api_client}->to_query_value($args{'username'});
|
||||||
}# query params
|
}
|
||||||
|
|
||||||
|
# query params
|
||||||
if ( exists $args{'password'}) {
|
if ( exists $args{'password'}) {
|
||||||
$query_params->{'password'} = $self->{api_client}->to_query_value($args{'password'});
|
$query_params->{'password'} = $self->{api_client}->to_query_value($args{'password'});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
|
|
||||||
|
|
||||||
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw()];
|
my $auth_settings = [qw()];
|
||||||
|
|
||||||
@ -462,7 +424,7 @@ sub login_user {
|
|||||||
}
|
}
|
||||||
my $_response_object = $self->{api_client}->deserialize('string', $response);
|
my $_response_object = $self->{api_client}->deserialize('string', $response);
|
||||||
return $_response_object;
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# logout_user
|
# logout_user
|
||||||
@ -483,8 +445,6 @@ sub login_user {
|
|||||||
sub logout_user {
|
sub logout_user {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/user/logout';
|
my $_resource_path = '/user/logout';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@ -501,18 +461,11 @@ sub logout_user {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $_body_data;
|
my $_body_data;
|
||||||
|
|
||||||
|
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw()];
|
my $auth_settings = [qw()];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
|
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
$self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
@ -550,12 +503,10 @@ sub logout_user {
|
|||||||
sub update_user {
|
sub update_user {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
|
||||||
# verify the required parameter 'username' is set
|
# verify the required parameter 'username' is set
|
||||||
unless (exists $args{'username'}) {
|
unless (exists $args{'username'}) {
|
||||||
croak("Missing the required parameter 'username' when calling update_user");
|
croak("Missing the required parameter 'username' when calling update_user");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/user/{username}';
|
my $_resource_path = '/user/{username}';
|
||||||
@ -573,15 +524,13 @@ sub update_user {
|
|||||||
}
|
}
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# path params
|
# path params
|
||||||
if ( exists $args{'username'}) {
|
if ( exists $args{'username'}) {
|
||||||
my $_base_variable = "{" . "username" . "}";
|
my $_base_variable = "{" . "username" . "}";
|
||||||
my $_base_value = $self->{api_client}->to_path_value($args{'username'});
|
my $_base_value = $self->{api_client}->to_path_value($args{'username'});
|
||||||
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $_body_data;
|
my $_body_data;
|
||||||
# body params
|
# body params
|
||||||
if ( exists $args{'body'}) {
|
if ( exists $args{'body'}) {
|
||||||
@ -592,12 +541,10 @@ sub update_user {
|
|||||||
my $auth_settings = [qw()];
|
my $auth_settings = [qw()];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
|
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
$self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user