forked from loafle/openapi-generator-original
Perl: Basic bearer auth support (#3192)
* bearer token support * [generator] running scripts
This commit is contained in:
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -53,10 +53,10 @@ sub new {
|
||||
#
|
||||
# To test special tags
|
||||
#
|
||||
# @param Client $body client model (required)
|
||||
# @param Client $client client model (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'client' => {
|
||||
data_type => 'Client',
|
||||
description => 'client model',
|
||||
required => '1',
|
||||
@@ -73,9 +73,9 @@ sub new {
|
||||
sub call_123_test_special_tags {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling call_123_test_special_tags");
|
||||
# verify the required parameter 'client' is set
|
||||
unless (exists $args{'client'}) {
|
||||
croak("Missing the required parameter 'client' when calling call_123_test_special_tags");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@@ -95,8 +95,8 @@ sub call_123_test_special_tags {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'client'}) {
|
||||
$_body_data = $args{'client'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -348,6 +348,12 @@ sub update_params_for_auth {
|
||||
$query_params->{'api_key_query'} = $api_key;
|
||||
}
|
||||
}
|
||||
elsif ($auth eq 'bearer_test') {
|
||||
// this endpoint requires Bearer (JWT) authentication (access token)
|
||||
if ($self->{config}{access_token}) {
|
||||
$headers['Authorization'] = 'Bearer ' . $self->{config}{access_token};
|
||||
}
|
||||
}
|
||||
elsif ($auth eq 'http_basic_test') {
|
||||
if ($self->{config}{username} || $self->{config}{password}) {
|
||||
$header_params->{'Authorization'} = 'Basic ' . encode_base64($self->{config}{username} . ":" . $self->{config}{password});
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -49,64 +49,52 @@ sub new {
|
||||
|
||||
|
||||
#
|
||||
# create_xml_item
|
||||
# fake_health_get
|
||||
#
|
||||
# creates an XmlItem
|
||||
# Health check endpoint
|
||||
#
|
||||
# @param XmlItem $xml_item XmlItem Body (required)
|
||||
{
|
||||
my $params = {
|
||||
'xml_item' => {
|
||||
data_type => 'XmlItem',
|
||||
description => 'XmlItem Body',
|
||||
required => '1',
|
||||
},
|
||||
};
|
||||
__PACKAGE__->method_documentation->{ 'create_xml_item' } = {
|
||||
summary => 'creates an XmlItem',
|
||||
__PACKAGE__->method_documentation->{ 'fake_health_get' } = {
|
||||
summary => 'Health check endpoint',
|
||||
params => $params,
|
||||
returns => undef,
|
||||
returns => 'HealthCheckResult',
|
||||
};
|
||||
}
|
||||
# @return void
|
||||
# @return HealthCheckResult
|
||||
#
|
||||
sub create_xml_item {
|
||||
sub fake_health_get {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'xml_item' is set
|
||||
unless (exists $args{'xml_item'}) {
|
||||
croak("Missing the required parameter 'xml_item' when calling create_xml_item");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
my $_resource_path = '/fake/create_xml_item';
|
||||
my $_resource_path = '/fake/health';
|
||||
|
||||
my $_method = 'POST';
|
||||
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();
|
||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/xml', 'application/xml; charset=utf-8', 'application/xml; charset=utf-16', 'text/xml', 'text/xml; charset=utf-8', 'text/xml; charset=utf-16');
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'xml_item'}) {
|
||||
$_body_data = $args{'xml_item'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
my $auth_settings = [qw()];
|
||||
|
||||
# make the API Call
|
||||
$self->{api_client}->call_api($_resource_path, $_method,
|
||||
my $response = $self->{api_client}->call_api($_resource_path, $_method,
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
if (!$response) {
|
||||
return;
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('HealthCheckResult', $response);
|
||||
return $_response_object;
|
||||
}
|
||||
|
||||
#
|
||||
@@ -147,7 +135,7 @@ sub fake_outer_boolean_serialize {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
@@ -174,10 +162,10 @@ sub fake_outer_boolean_serialize {
|
||||
#
|
||||
#
|
||||
#
|
||||
# @param OuterComposite $body Input composite as post body (optional)
|
||||
# @param OuterComposite $outer_composite Input composite as post body (optional)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'outer_composite' => {
|
||||
data_type => 'OuterComposite',
|
||||
description => 'Input composite as post body',
|
||||
required => '0',
|
||||
@@ -207,12 +195,12 @@ sub fake_outer_composite_serialize {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'outer_composite'}) {
|
||||
$_body_data = $args{'outer_composite'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@@ -267,7 +255,7 @@ sub fake_outer_number_serialize {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
@@ -327,7 +315,7 @@ sub fake_outer_string_serialize {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
@@ -354,10 +342,10 @@ sub fake_outer_string_serialize {
|
||||
#
|
||||
#
|
||||
#
|
||||
# @param FileSchemaTestClass $body (required)
|
||||
# @param FileSchemaTestClass $file_schema_test_class (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'file_schema_test_class' => {
|
||||
data_type => 'FileSchemaTestClass',
|
||||
description => '',
|
||||
required => '1',
|
||||
@@ -374,9 +362,9 @@ sub fake_outer_string_serialize {
|
||||
sub test_body_with_file_schema {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling test_body_with_file_schema");
|
||||
# verify the required parameter 'file_schema_test_class' is set
|
||||
unless (exists $args{'file_schema_test_class'}) {
|
||||
croak("Missing the required parameter 'file_schema_test_class' when calling test_body_with_file_schema");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@@ -396,8 +384,8 @@ sub test_body_with_file_schema {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'file_schema_test_class'}) {
|
||||
$_body_data = $args{'file_schema_test_class'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@@ -416,7 +404,7 @@ sub test_body_with_file_schema {
|
||||
#
|
||||
#
|
||||
# @param string $query (required)
|
||||
# @param User $body (required)
|
||||
# @param User $user (required)
|
||||
{
|
||||
my $params = {
|
||||
'query' => {
|
||||
@@ -424,7 +412,7 @@ sub test_body_with_file_schema {
|
||||
description => '',
|
||||
required => '1',
|
||||
},
|
||||
'body' => {
|
||||
'user' => {
|
||||
data_type => 'User',
|
||||
description => '',
|
||||
required => '1',
|
||||
@@ -446,9 +434,9 @@ sub test_body_with_query_params {
|
||||
croak("Missing the required parameter 'query' when calling test_body_with_query_params");
|
||||
}
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling test_body_with_query_params");
|
||||
# verify the required parameter 'user' is set
|
||||
unless (exists $args{'user'}) {
|
||||
croak("Missing the required parameter 'user' when calling test_body_with_query_params");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@@ -473,8 +461,8 @@ sub test_body_with_query_params {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'user'}) {
|
||||
$_body_data = $args{'user'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@@ -492,10 +480,10 @@ sub test_body_with_query_params {
|
||||
#
|
||||
# To test \"client\" model
|
||||
#
|
||||
# @param Client $body client model (required)
|
||||
# @param Client $client client model (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'client' => {
|
||||
data_type => 'Client',
|
||||
description => 'client model',
|
||||
required => '1',
|
||||
@@ -512,9 +500,9 @@ sub test_body_with_query_params {
|
||||
sub test_client_model {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling test_client_model");
|
||||
# verify the required parameter 'client' is set
|
||||
unless (exists $args{'client'}) {
|
||||
croak("Missing the required parameter 'client' when calling test_client_model");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@@ -534,8 +522,8 @@ sub test_client_model {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'client'}) {
|
||||
$_body_data = $args{'client'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@@ -1022,7 +1010,7 @@ sub test_group_parameters {
|
||||
|
||||
my $_body_data;
|
||||
# authentication setting, if any
|
||||
my $auth_settings = [qw()];
|
||||
my $auth_settings = [qw(bearer_test )];
|
||||
|
||||
# make the API Call
|
||||
$self->{api_client}->call_api($_resource_path, $_method,
|
||||
@@ -1036,10 +1024,10 @@ sub test_group_parameters {
|
||||
#
|
||||
# test inline additionalProperties
|
||||
#
|
||||
# @param HASH[string,string] $param request body (required)
|
||||
# @param HASH[string,string] $request_body request body (required)
|
||||
{
|
||||
my $params = {
|
||||
'param' => {
|
||||
'request_body' => {
|
||||
data_type => 'HASH[string,string]',
|
||||
description => 'request body',
|
||||
required => '1',
|
||||
@@ -1056,9 +1044,9 @@ sub test_group_parameters {
|
||||
sub test_inline_additional_properties {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'param' is set
|
||||
unless (exists $args{'param'}) {
|
||||
croak("Missing the required parameter 'param' when calling test_inline_additional_properties");
|
||||
# verify the required parameter 'request_body' is set
|
||||
unless (exists $args{'request_body'}) {
|
||||
croak("Missing the required parameter 'request_body' when calling test_inline_additional_properties");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@@ -1078,8 +1066,8 @@ sub test_inline_additional_properties {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'param'}) {
|
||||
$_body_data = $args{'param'};
|
||||
if ( exists $args{'request_body'}) {
|
||||
$_body_data = $args{'request_body'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -53,10 +53,10 @@ sub new {
|
||||
#
|
||||
# To test class name in snake case
|
||||
#
|
||||
# @param Client $body client model (required)
|
||||
# @param Client $client client model (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'client' => {
|
||||
data_type => 'Client',
|
||||
description => 'client model',
|
||||
required => '1',
|
||||
@@ -73,9 +73,9 @@ sub new {
|
||||
sub test_classname {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling test_classname");
|
||||
# verify the required parameter 'client' is set
|
||||
unless (exists $args{'client'}) {
|
||||
croak("Missing the required parameter 'client' when calling test_classname");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@@ -95,8 +95,8 @@ sub test_classname {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'client'}) {
|
||||
$_body_data = $args{'client'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
|
||||
@@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@@ -142,10 +135,10 @@ sub from_hash {
|
||||
sub _deserialize {
|
||||
my ($self, $type, $data) = @_;
|
||||
$log->debugf("deserializing %s with %s",Dumper($data), $type);
|
||||
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
||||
@@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@@ -142,10 +135,10 @@ sub from_hash {
|
||||
sub _deserialize {
|
||||
my ($self, $type, $data) = @_;
|
||||
$log->debugf("deserializing %s with %s",Dumper($data), $type);
|
||||
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
||||
@@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@@ -142,10 +135,10 @@ sub from_hash {
|
||||
sub _deserialize {
|
||||
my ($self, $type, $data) = @_;
|
||||
$log->debugf("deserializing %s with %s",Dumper($data), $type);
|
||||
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -161,79 +161,16 @@ __PACKAGE__->class_documentation({description => '',
|
||||
} );
|
||||
|
||||
__PACKAGE__->method_documentation({
|
||||
'map_string' => {
|
||||
'map_property' => {
|
||||
datatype => 'HASH[string,string]',
|
||||
base_name => 'map_string',
|
||||
base_name => 'map_property',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_number' => {
|
||||
datatype => 'HASH[string,double]',
|
||||
base_name => 'map_number',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_integer' => {
|
||||
datatype => 'HASH[string,int]',
|
||||
base_name => 'map_integer',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_boolean' => {
|
||||
datatype => 'HASH[string,boolean]',
|
||||
base_name => 'map_boolean',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_array_integer' => {
|
||||
datatype => 'HASH[string,ARRAY[int]]',
|
||||
base_name => 'map_array_integer',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_array_anytype' => {
|
||||
datatype => 'HASH[string,ARRAY[object]]',
|
||||
base_name => 'map_array_anytype',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_map_string' => {
|
||||
'map_of_map_property' => {
|
||||
datatype => 'HASH[string,HASH[string,string]]',
|
||||
base_name => 'map_map_string',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_map_anytype' => {
|
||||
datatype => 'HASH[string,HASH[string,object]]',
|
||||
base_name => 'map_map_anytype',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'anytype_1' => {
|
||||
datatype => 'object',
|
||||
base_name => 'anytype_1',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'anytype_2' => {
|
||||
datatype => 'object',
|
||||
base_name => 'anytype_2',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'anytype_3' => {
|
||||
datatype => 'object',
|
||||
base_name => 'anytype_3',
|
||||
base_name => 'map_of_map_property',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
@@ -241,31 +178,13 @@ __PACKAGE__->method_documentation({
|
||||
});
|
||||
|
||||
__PACKAGE__->openapi_types( {
|
||||
'map_string' => 'HASH[string,string]',
|
||||
'map_number' => 'HASH[string,double]',
|
||||
'map_integer' => 'HASH[string,int]',
|
||||
'map_boolean' => 'HASH[string,boolean]',
|
||||
'map_array_integer' => 'HASH[string,ARRAY[int]]',
|
||||
'map_array_anytype' => 'HASH[string,ARRAY[object]]',
|
||||
'map_map_string' => 'HASH[string,HASH[string,string]]',
|
||||
'map_map_anytype' => 'HASH[string,HASH[string,object]]',
|
||||
'anytype_1' => 'object',
|
||||
'anytype_2' => 'object',
|
||||
'anytype_3' => 'object'
|
||||
'map_property' => 'HASH[string,string]',
|
||||
'map_of_map_property' => 'HASH[string,HASH[string,string]]'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
'map_string' => 'map_string',
|
||||
'map_number' => 'map_number',
|
||||
'map_integer' => 'map_integer',
|
||||
'map_boolean' => 'map_boolean',
|
||||
'map_array_integer' => 'map_array_integer',
|
||||
'map_array_anytype' => 'map_array_anytype',
|
||||
'map_map_string' => 'map_map_string',
|
||||
'map_map_anytype' => 'map_map_anytype',
|
||||
'anytype_1' => 'anytype_1',
|
||||
'anytype_2' => 'anytype_2',
|
||||
'anytype_3' => 'anytype_3'
|
||||
'map_property' => 'map_property',
|
||||
'map_of_map_property' => 'map_of_map_property'
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
||||
@@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@@ -142,10 +135,10 @@ sub from_hash {
|
||||
sub _deserialize {
|
||||
my ($self, $type, $data) = @_;
|
||||
$log->debugf("deserializing %s with %s",Dumper($data), $type);
|
||||
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
||||
@@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@@ -142,10 +135,10 @@ sub from_hash {
|
||||
sub _deserialize {
|
||||
my ($self, $type, $data) = @_;
|
||||
$log->debugf("deserializing %s with %s",Dumper($data), $type);
|
||||
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
||||
@@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@@ -142,10 +135,10 @@ sub from_hash {
|
||||
sub _deserialize {
|
||||
my ($self, $type, $data) = @_;
|
||||
$log->debugf("deserializing %s with %s",Dumper($data), $type);
|
||||
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
||||
@@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@@ -142,10 +135,10 @@ sub from_hash {
|
||||
sub _deserialize {
|
||||
my ($self, $type, $data) = @_;
|
||||
$log->debugf("deserializing %s with %s",Dumper($data), $type);
|
||||
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -47,7 +47,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -47,7 +47,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -47,7 +47,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -31,6 +31,9 @@ use Date::Parse;
|
||||
use DateTime;
|
||||
|
||||
use WWW::OpenAPIClient::Object::OuterEnum;
|
||||
use WWW::OpenAPIClient::Object::OuterEnumDefaultValue;
|
||||
use WWW::OpenAPIClient::Object::OuterEnumInteger;
|
||||
use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue;
|
||||
|
||||
use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
|
||||
@@ -47,7 +50,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -197,6 +200,27 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'outer_enum_integer' => {
|
||||
datatype => 'OuterEnumInteger',
|
||||
base_name => 'outerEnumInteger',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'outer_enum_default_value' => {
|
||||
datatype => 'OuterEnumDefaultValue',
|
||||
base_name => 'outerEnumDefaultValue',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'outer_enum_integer_default_value' => {
|
||||
datatype => 'OuterEnumIntegerDefaultValue',
|
||||
base_name => 'outerEnumIntegerDefaultValue',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
});
|
||||
|
||||
__PACKAGE__->openapi_types( {
|
||||
@@ -204,7 +228,10 @@ __PACKAGE__->openapi_types( {
|
||||
'enum_string_required' => 'string',
|
||||
'enum_integer' => 'int',
|
||||
'enum_number' => 'double',
|
||||
'outer_enum' => 'OuterEnum'
|
||||
'outer_enum' => 'OuterEnum',
|
||||
'outer_enum_integer' => 'OuterEnumInteger',
|
||||
'outer_enum_default_value' => 'OuterEnumDefaultValue',
|
||||
'outer_enum_integer_default_value' => 'OuterEnumIntegerDefaultValue'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
@@ -212,7 +239,10 @@ __PACKAGE__->attribute_map( {
|
||||
'enum_string_required' => 'enum_string_required',
|
||||
'enum_integer' => 'enum_integer',
|
||||
'enum_number' => 'enum_number',
|
||||
'outer_enum' => 'outerEnum'
|
||||
'outer_enum' => 'outerEnum',
|
||||
'outer_enum_integer' => 'outerEnumInteger',
|
||||
'outer_enum_default_value' => 'outerEnumDefaultValue',
|
||||
'outer_enum_integer_default_value' => 'outerEnumIntegerDefaultValue'
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -47,7 +47,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -252,6 +252,20 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'pattern_with_digits' => {
|
||||
datatype => 'string',
|
||||
base_name => 'pattern_with_digits',
|
||||
description => 'A string that is a 10 digit number. Can have leading zeros.',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'pattern_with_digits_and_delimiter' => {
|
||||
datatype => 'string',
|
||||
base_name => 'pattern_with_digits_and_delimiter',
|
||||
description => 'A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
});
|
||||
|
||||
__PACKAGE__->openapi_types( {
|
||||
@@ -267,7 +281,9 @@ __PACKAGE__->openapi_types( {
|
||||
'date' => 'DateTime',
|
||||
'date_time' => 'DateTime',
|
||||
'uuid' => 'string',
|
||||
'password' => 'string'
|
||||
'password' => 'string',
|
||||
'pattern_with_digits' => 'string',
|
||||
'pattern_with_digits_and_delimiter' => 'string'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
@@ -283,7 +299,9 @@ __PACKAGE__->attribute_map( {
|
||||
'date' => 'date',
|
||||
'date_time' => 'dateTime',
|
||||
'uuid' => 'uuid',
|
||||
'password' => 'password'
|
||||
'password' => 'password',
|
||||
'pattern_with_digits' => 'pattern_with_digits',
|
||||
'pattern_with_digits_and_delimiter' => 'pattern_with_digits_and_delimiter'
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -47,7 +47,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -47,7 +47,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -48,7 +48,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@@ -142,10 +135,10 @@ sub from_hash {
|
||||
sub _deserialize {
|
||||
my ($self, $type, $data) = @_;
|
||||
$log->debugf("deserializing %s with %s",Dumper($data), $type);
|
||||
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
||||
@@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@@ -142,10 +135,10 @@ sub from_hash {
|
||||
sub _deserialize {
|
||||
my ($self, $type, $data) = @_;
|
||||
$log->debugf("deserializing %s with %s",Dumper($data), $type);
|
||||
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@@ -142,10 +135,10 @@ sub from_hash {
|
||||
sub _deserialize {
|
||||
my ($self, $type, $data) = @_;
|
||||
$log->debugf("deserializing %s with %s",Dumper($data), $type);
|
||||
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -53,10 +53,10 @@ sub new {
|
||||
#
|
||||
# Add a new pet to the store
|
||||
#
|
||||
# @param Pet $body Pet object that needs to be added to the store (required)
|
||||
# @param Pet $pet Pet object that needs to be added to the store (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'pet' => {
|
||||
data_type => 'Pet',
|
||||
description => 'Pet object that needs to be added to the store',
|
||||
required => '1',
|
||||
@@ -73,9 +73,9 @@ sub new {
|
||||
sub add_pet {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling add_pet");
|
||||
# verify the required parameter 'pet' is set
|
||||
unless (exists $args{'pet'}) {
|
||||
croak("Missing the required parameter 'pet' when calling add_pet");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@@ -95,8 +95,8 @@ sub add_pet {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'pet'}) {
|
||||
$_body_data = $args{'pet'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@@ -385,10 +385,10 @@ sub get_pet_by_id {
|
||||
#
|
||||
# Update an existing pet
|
||||
#
|
||||
# @param Pet $body Pet object that needs to be added to the store (required)
|
||||
# @param Pet $pet Pet object that needs to be added to the store (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'pet' => {
|
||||
data_type => 'Pet',
|
||||
description => 'Pet object that needs to be added to the store',
|
||||
required => '1',
|
||||
@@ -405,9 +405,9 @@ sub get_pet_by_id {
|
||||
sub update_pet {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling update_pet");
|
||||
# verify the required parameter 'pet' is set
|
||||
unless (exists $args{'pet'}) {
|
||||
croak("Missing the required parameter 'pet' when calling update_pet");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@@ -427,8 +427,8 @@ sub update_pet {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'pet'}) {
|
||||
$_body_data = $args{'pet'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -232,10 +232,10 @@ sub get_order_by_id {
|
||||
#
|
||||
# Place an order for a pet
|
||||
#
|
||||
# @param Order $body order placed for purchasing the pet (required)
|
||||
# @param Order $order order placed for purchasing the pet (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'order' => {
|
||||
data_type => 'Order',
|
||||
description => 'order placed for purchasing the pet',
|
||||
required => '1',
|
||||
@@ -252,9 +252,9 @@ sub get_order_by_id {
|
||||
sub place_order {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling place_order");
|
||||
# verify the required parameter 'order' is set
|
||||
unless (exists $args{'order'}) {
|
||||
croak("Missing the required parameter 'order' when calling place_order");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@@ -270,12 +270,12 @@ sub place_order {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'order'}) {
|
||||
$_body_data = $args{'order'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
|
||||
@@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@@ -53,10 +53,10 @@ sub new {
|
||||
#
|
||||
# Create user
|
||||
#
|
||||
# @param User $body Created user object (required)
|
||||
# @param User $user Created user object (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'user' => {
|
||||
data_type => 'User',
|
||||
description => 'Created user object',
|
||||
required => '1',
|
||||
@@ -73,9 +73,9 @@ sub new {
|
||||
sub create_user {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling create_user");
|
||||
# verify the required parameter 'user' is set
|
||||
unless (exists $args{'user'}) {
|
||||
croak("Missing the required parameter 'user' when calling create_user");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@@ -91,12 +91,12 @@ sub create_user {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'user'}) {
|
||||
$_body_data = $args{'user'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@@ -114,10 +114,10 @@ sub create_user {
|
||||
#
|
||||
# Creates list of users with given input array
|
||||
#
|
||||
# @param ARRAY[User] $body List of user object (required)
|
||||
# @param ARRAY[User] $user List of user object (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'user' => {
|
||||
data_type => 'ARRAY[User]',
|
||||
description => 'List of user object',
|
||||
required => '1',
|
||||
@@ -134,9 +134,9 @@ sub create_user {
|
||||
sub create_users_with_array_input {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling create_users_with_array_input");
|
||||
# verify the required parameter 'user' is set
|
||||
unless (exists $args{'user'}) {
|
||||
croak("Missing the required parameter 'user' when calling create_users_with_array_input");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@@ -152,12 +152,12 @@ sub create_users_with_array_input {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'user'}) {
|
||||
$_body_data = $args{'user'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@@ -175,10 +175,10 @@ sub create_users_with_array_input {
|
||||
#
|
||||
# Creates list of users with given input array
|
||||
#
|
||||
# @param ARRAY[User] $body List of user object (required)
|
||||
# @param ARRAY[User] $user List of user object (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'user' => {
|
||||
data_type => 'ARRAY[User]',
|
||||
description => 'List of user object',
|
||||
required => '1',
|
||||
@@ -195,9 +195,9 @@ sub create_users_with_array_input {
|
||||
sub create_users_with_list_input {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling create_users_with_list_input");
|
||||
# verify the required parameter 'user' is set
|
||||
unless (exists $args{'user'}) {
|
||||
croak("Missing the required parameter 'user' when calling create_users_with_list_input");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@@ -213,12 +213,12 @@ sub create_users_with_list_input {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'user'}) {
|
||||
$_body_data = $args{'user'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@@ -493,7 +493,7 @@ sub logout_user {
|
||||
# Updated user
|
||||
#
|
||||
# @param string $username name that need to be deleted (required)
|
||||
# @param User $body Updated user object (required)
|
||||
# @param User $user Updated user object (required)
|
||||
{
|
||||
my $params = {
|
||||
'username' => {
|
||||
@@ -501,7 +501,7 @@ sub logout_user {
|
||||
description => 'name that need to be deleted',
|
||||
required => '1',
|
||||
},
|
||||
'body' => {
|
||||
'user' => {
|
||||
data_type => 'User',
|
||||
description => 'Updated user object',
|
||||
required => '1',
|
||||
@@ -523,9 +523,9 @@ sub update_user {
|
||||
croak("Missing the required parameter 'username' when calling update_user");
|
||||
}
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling update_user");
|
||||
# verify the required parameter 'user' is set
|
||||
unless (exists $args{'user'}) {
|
||||
croak("Missing the required parameter 'user' when calling update_user");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@@ -541,7 +541,7 @@ sub update_user {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
# path params
|
||||
if ( exists $args{'username'}) {
|
||||
@@ -552,8 +552,8 @@ sub update_user {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'user'}) {
|
||||
$_body_data = $args{'user'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
|
||||
Reference in New Issue
Block a user