Merge remote-tracking branch 'origin/5.3.x' into 6.0.x

This commit is contained in:
William Cheng
2021-07-27 11:52:19 +08:00
1011 changed files with 34058 additions and 5848 deletions

View File

@@ -16,6 +16,7 @@ docs/Category.md
docs/ClassModel.md
docs/Client.md
docs/DefaultApi.md
docs/DeprecatedObject.md
docs/Dog.md
docs/DogAllOf.md
docs/EnumArrays.md
@@ -38,6 +39,7 @@ docs/ModelReturn.md
docs/Name.md
docs/NullableClass.md
docs/NumberOnly.md
docs/ObjectWithDeprecatedFields.md
docs/Order.md
docs/OuterComposite.md
docs/OuterEnum.md
@@ -73,6 +75,7 @@ lib/WWW/OpenAPIClient/Object/CatAllOf.pm
lib/WWW/OpenAPIClient/Object/Category.pm
lib/WWW/OpenAPIClient/Object/ClassModel.pm
lib/WWW/OpenAPIClient/Object/Client.pm
lib/WWW/OpenAPIClient/Object/DeprecatedObject.pm
lib/WWW/OpenAPIClient/Object/Dog.pm
lib/WWW/OpenAPIClient/Object/DogAllOf.pm
lib/WWW/OpenAPIClient/Object/EnumArrays.pm
@@ -93,6 +96,7 @@ lib/WWW/OpenAPIClient/Object/ModelReturn.pm
lib/WWW/OpenAPIClient/Object/Name.pm
lib/WWW/OpenAPIClient/Object/NullableClass.pm
lib/WWW/OpenAPIClient/Object/NumberOnly.pm
lib/WWW/OpenAPIClient/Object/ObjectWithDeprecatedFields.pm
lib/WWW/OpenAPIClient/Object/Order.pm
lib/WWW/OpenAPIClient/Object/OuterComposite.pm
lib/WWW/OpenAPIClient/Object/OuterEnum.pm

View File

@@ -254,6 +254,7 @@ use WWW::OpenAPIClient::Object::CatAllOf;
use WWW::OpenAPIClient::Object::Category;
use WWW::OpenAPIClient::Object::ClassModel;
use WWW::OpenAPIClient::Object::Client;
use WWW::OpenAPIClient::Object::DeprecatedObject;
use WWW::OpenAPIClient::Object::Dog;
use WWW::OpenAPIClient::Object::DogAllOf;
use WWW::OpenAPIClient::Object::EnumArrays;
@@ -274,6 +275,7 @@ use WWW::OpenAPIClient::Object::ModelReturn;
use WWW::OpenAPIClient::Object::Name;
use WWW::OpenAPIClient::Object::NullableClass;
use WWW::OpenAPIClient::Object::NumberOnly;
use WWW::OpenAPIClient::Object::ObjectWithDeprecatedFields;
use WWW::OpenAPIClient::Object::Order;
use WWW::OpenAPIClient::Object::OuterComposite;
use WWW::OpenAPIClient::Object::OuterEnum;
@@ -318,6 +320,7 @@ use WWW::OpenAPIClient::Object::CatAllOf;
use WWW::OpenAPIClient::Object::Category;
use WWW::OpenAPIClient::Object::ClassModel;
use WWW::OpenAPIClient::Object::Client;
use WWW::OpenAPIClient::Object::DeprecatedObject;
use WWW::OpenAPIClient::Object::Dog;
use WWW::OpenAPIClient::Object::DogAllOf;
use WWW::OpenAPIClient::Object::EnumArrays;
@@ -338,6 +341,7 @@ use WWW::OpenAPIClient::Object::ModelReturn;
use WWW::OpenAPIClient::Object::Name;
use WWW::OpenAPIClient::Object::NullableClass;
use WWW::OpenAPIClient::Object::NumberOnly;
use WWW::OpenAPIClient::Object::ObjectWithDeprecatedFields;
use WWW::OpenAPIClient::Object::Order;
use WWW::OpenAPIClient::Object::OuterComposite;
use WWW::OpenAPIClient::Object::OuterEnum;
@@ -432,6 +436,7 @@ Class | Method | HTTP request | Description
- [WWW::OpenAPIClient::Object::Category](docs/Category.md)
- [WWW::OpenAPIClient::Object::ClassModel](docs/ClassModel.md)
- [WWW::OpenAPIClient::Object::Client](docs/Client.md)
- [WWW::OpenAPIClient::Object::DeprecatedObject](docs/DeprecatedObject.md)
- [WWW::OpenAPIClient::Object::Dog](docs/Dog.md)
- [WWW::OpenAPIClient::Object::DogAllOf](docs/DogAllOf.md)
- [WWW::OpenAPIClient::Object::EnumArrays](docs/EnumArrays.md)
@@ -452,6 +457,7 @@ Class | Method | HTTP request | Description
- [WWW::OpenAPIClient::Object::Name](docs/Name.md)
- [WWW::OpenAPIClient::Object::NullableClass](docs/NullableClass.md)
- [WWW::OpenAPIClient::Object::NumberOnly](docs/NumberOnly.md)
- [WWW::OpenAPIClient::Object::ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md)
- [WWW::OpenAPIClient::Object::Order](docs/Order.md)
- [WWW::OpenAPIClient::Object::OuterComposite](docs/OuterComposite.md)
- [WWW::OpenAPIClient::Object::OuterEnum](docs/OuterEnum.md)

View File

@@ -0,0 +1,15 @@
# WWW::OpenAPIClient::Object::DeprecatedObject
## Load the model package
```perl
use WWW::OpenAPIClient::Object::DeprecatedObject;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **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)

View File

@@ -0,0 +1,18 @@
# WWW::OpenAPIClient::Object::ObjectWithDeprecatedFields
## Load the model package
```perl
use WWW::OpenAPIClient::Object::ObjectWithDeprecatedFields;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | **string** | | [optional]
**id** | **double** | | [optional]
**deprecated_ref** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional]
**bars** | **ARRAY[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)

View File

@@ -0,0 +1,184 @@
=begin comment
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: \" \\
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
=end comment
=cut
#
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# Do not edit the class manually.
# Ref: https://openapi-generator.tech
#
package WWW::OpenAPIClient::Object::DeprecatedObject;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Date::Parse;
use DateTime;
use base ("Class::Accessor", "Class::Data::Inheritable");
#
#
#
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually.
# REF: https://openapi-generator.tech
#
=begin comment
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: \" \\
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
=end comment
=cut
#
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# Do not edit the class manually.
# Ref: https://openapi-generator.tech
#
__PACKAGE__->mk_classdata('attribute_map' => {});
__PACKAGE__->mk_classdata('openapi_types' => {});
__PACKAGE__->mk_classdata('method_documentation' => {});
__PACKAGE__->mk_classdata('class_documentation' => {});
# new plain object
sub new {
my ($class, %args) = @_;
my $self = bless {}, $class;
$self->init(%args);
return $self;
}
# initialize the object
sub init
{
my ($self, %args) = @_;
foreach my $attribute (keys %{$self->attribute_map}) {
my $args_key = $self->attribute_map->{$attribute};
$self->$attribute( $args{ $args_key } );
}
}
# return perl hash
sub to_hash {
my $self = shift;
my $_hash = decode_json(JSON->new->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $_data = {};
foreach my $_key (keys %{$self->attribute_map}) {
if (defined $self->{$_key}) {
$_data->{$self->attribute_map->{$_key}} = $self->{$_key};
}
}
return $_data;
}
# from Perl hashref
sub from_hash {
my ($self, $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;
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 {
$log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute);
}
}
return $self;
}
# deserialize non-array data
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'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}
__PACKAGE__->class_documentation({description => '',
class => 'DeprecatedObject',
required => [], # TODO
} );
__PACKAGE__->method_documentation({
'name' => {
datatype => 'string',
base_name => 'name',
description => '',
format => '',
read_only => '',
},
});
__PACKAGE__->openapi_types( {
'name' => 'string'
} );
__PACKAGE__->attribute_map( {
'name' => 'name'
} );
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
1;

View File

@@ -0,0 +1,212 @@
=begin comment
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: \" \\
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
=end comment
=cut
#
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# Do not edit the class manually.
# Ref: https://openapi-generator.tech
#
package WWW::OpenAPIClient::Object::ObjectWithDeprecatedFields;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Date::Parse;
use DateTime;
use WWW::OpenAPIClient::Object::DeprecatedObject;
use base ("Class::Accessor", "Class::Data::Inheritable");
#
#
#
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually.
# REF: https://openapi-generator.tech
#
=begin comment
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: \" \\
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
=end comment
=cut
#
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# Do not edit the class manually.
# Ref: https://openapi-generator.tech
#
__PACKAGE__->mk_classdata('attribute_map' => {});
__PACKAGE__->mk_classdata('openapi_types' => {});
__PACKAGE__->mk_classdata('method_documentation' => {});
__PACKAGE__->mk_classdata('class_documentation' => {});
# new plain object
sub new {
my ($class, %args) = @_;
my $self = bless {}, $class;
$self->init(%args);
return $self;
}
# initialize the object
sub init
{
my ($self, %args) = @_;
foreach my $attribute (keys %{$self->attribute_map}) {
my $args_key = $self->attribute_map->{$attribute};
$self->$attribute( $args{ $args_key } );
}
}
# return perl hash
sub to_hash {
my $self = shift;
my $_hash = decode_json(JSON->new->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $_data = {};
foreach my $_key (keys %{$self->attribute_map}) {
if (defined $self->{$_key}) {
$_data->{$self->attribute_map->{$_key}} = $self->{$_key};
}
}
return $_data;
}
# from Perl hashref
sub from_hash {
my ($self, $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;
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 {
$log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute);
}
}
return $self;
}
# deserialize non-array data
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'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}
__PACKAGE__->class_documentation({description => '',
class => 'ObjectWithDeprecatedFields',
required => [], # TODO
} );
__PACKAGE__->method_documentation({
'uuid' => {
datatype => 'string',
base_name => 'uuid',
description => '',
format => '',
read_only => '',
},
'id' => {
datatype => 'double',
base_name => 'id',
description => '',
format => '',
read_only => '',
},
'deprecated_ref' => {
datatype => 'DeprecatedObject',
base_name => 'deprecatedRef',
description => '',
format => '',
read_only => '',
},
'bars' => {
datatype => 'ARRAY[string]',
base_name => 'bars',
description => '',
format => '',
read_only => '',
},
});
__PACKAGE__->openapi_types( {
'uuid' => 'string',
'id' => 'double',
'deprecated_ref' => 'DeprecatedObject',
'bars' => 'ARRAY[string]'
} );
__PACKAGE__->attribute_map( {
'uuid' => 'uuid',
'id' => 'id',
'deprecated_ref' => 'deprecatedRef',
'bars' => 'bars'
} );
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
1;

View File

@@ -0,0 +1,34 @@
=begin comment
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: \" \\
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
=end comment
=cut
#
# NOTE: This class is auto generated by the OpenAPI Generator
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::Exception;
use lib 'lib';
use strict;
use warnings;
use_ok('WWW::OpenAPIClient::Object::DeprecatedObject');
# uncomment below and update the test
#my $instance = WWW::OpenAPIClient::Object::DeprecatedObject->new();
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::DeprecatedObject');

View File

@@ -0,0 +1,34 @@
=begin comment
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: \" \\
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
=end comment
=cut
#
# NOTE: This class is auto generated by the OpenAPI Generator
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::Exception;
use lib 'lib';
use strict;
use warnings;
use_ok('WWW::OpenAPIClient::Object::ObjectWithDeprecatedFields');
# uncomment below and update the test
#my $instance = WWW::OpenAPIClient::Object::ObjectWithDeprecatedFields->new();
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ObjectWithDeprecatedFields');