forked from loafle/openapi-generator-original
add apache 2.0 license to perl api client
This commit is contained in:
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::ApiClient;
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::ApiFactory;
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Configuration;
|
||||
|
||||
use strict;
|
||||
|
||||
264
samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeApi.pm
Normal file
264
samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeApi.pm
Normal file
@@ -0,0 +1,264 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::FakeApi;
|
||||
|
||||
require 5.6.0;
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
use Exporter;
|
||||
use Carp qw( croak );
|
||||
use Log::Any qw($log);
|
||||
|
||||
use WWW::SwaggerClient::ApiClient;
|
||||
use WWW::SwaggerClient::Configuration;
|
||||
|
||||
use base "Class::Data::Inheritable";
|
||||
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my (%self) = (
|
||||
'api_client' => WWW::SwaggerClient::ApiClient->instance,
|
||||
@_
|
||||
);
|
||||
|
||||
#my $self = {
|
||||
# #api_client => $options->{api_client}
|
||||
# api_client => $default_api_client
|
||||
#};
|
||||
|
||||
bless \%self, $class;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# test_endpoint_parameters
|
||||
#
|
||||
# Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
#
|
||||
# @param Number $number None (required)
|
||||
# @param double $double None (required)
|
||||
# @param string $string None (required)
|
||||
# @param string $byte None (required)
|
||||
# @param int $integer None (optional)
|
||||
# @param int $int32 None (optional)
|
||||
# @param int $int64 None (optional)
|
||||
# @param double $float None (optional)
|
||||
# @param string $binary None (optional)
|
||||
# @param DateTime $date None (optional)
|
||||
# @param DateTime $date_time None (optional)
|
||||
# @param string $password None (optional)
|
||||
{
|
||||
my $params = {
|
||||
'number' => {
|
||||
data_type => 'Number',
|
||||
description => 'None',
|
||||
required => '1',
|
||||
},
|
||||
'double' => {
|
||||
data_type => 'double',
|
||||
description => 'None',
|
||||
required => '1',
|
||||
},
|
||||
'string' => {
|
||||
data_type => 'string',
|
||||
description => 'None',
|
||||
required => '1',
|
||||
},
|
||||
'byte' => {
|
||||
data_type => 'string',
|
||||
description => 'None',
|
||||
required => '1',
|
||||
},
|
||||
'integer' => {
|
||||
data_type => 'int',
|
||||
description => 'None',
|
||||
required => '0',
|
||||
},
|
||||
'int32' => {
|
||||
data_type => 'int',
|
||||
description => 'None',
|
||||
required => '0',
|
||||
},
|
||||
'int64' => {
|
||||
data_type => 'int',
|
||||
description => 'None',
|
||||
required => '0',
|
||||
},
|
||||
'float' => {
|
||||
data_type => 'double',
|
||||
description => 'None',
|
||||
required => '0',
|
||||
},
|
||||
'binary' => {
|
||||
data_type => 'string',
|
||||
description => 'None',
|
||||
required => '0',
|
||||
},
|
||||
'date' => {
|
||||
data_type => 'DateTime',
|
||||
description => 'None',
|
||||
required => '0',
|
||||
},
|
||||
'date_time' => {
|
||||
data_type => 'DateTime',
|
||||
description => 'None',
|
||||
required => '0',
|
||||
},
|
||||
'password' => {
|
||||
data_type => 'string',
|
||||
description => 'None',
|
||||
required => '0',
|
||||
},
|
||||
};
|
||||
__PACKAGE__->method_documentation->{ test_endpoint_parameters } = {
|
||||
summary => 'Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ',
|
||||
params => $params,
|
||||
returns => undef,
|
||||
};
|
||||
}
|
||||
# @return void
|
||||
#
|
||||
sub test_endpoint_parameters {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'number' is set
|
||||
unless (exists $args{'number'}) {
|
||||
croak("Missing the required parameter 'number' when calling test_endpoint_parameters");
|
||||
}
|
||||
|
||||
# verify the required parameter 'double' is set
|
||||
unless (exists $args{'double'}) {
|
||||
croak("Missing the required parameter 'double' when calling test_endpoint_parameters");
|
||||
}
|
||||
|
||||
# verify the required parameter 'string' is set
|
||||
unless (exists $args{'string'}) {
|
||||
croak("Missing the required parameter 'string' when calling test_endpoint_parameters");
|
||||
}
|
||||
|
||||
# verify the required parameter 'byte' is set
|
||||
unless (exists $args{'byte'}) {
|
||||
croak("Missing the required parameter 'byte' when calling test_endpoint_parameters");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
my $_resource_path = '/fake';
|
||||
$_resource_path =~ s/{format}/json/; # default format to json
|
||||
|
||||
my $_method = 'POST';
|
||||
my $query_params = {};
|
||||
my $header_params = {};
|
||||
my $form_params = {};
|
||||
|
||||
# 'Accept' and 'Content-Type' header
|
||||
my $_header_accept = $self->{api_client}->select_header_accept('application/xml; charset=utf-8', 'application/json; charset=utf-8');
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/xml; charset=utf-8', 'application/json; charset=utf-8');
|
||||
|
||||
# form params
|
||||
if ( exists $args{'integer'} ) {
|
||||
$form_params->{'integer'} = $self->{api_client}->to_form_value($args{'integer'});
|
||||
}
|
||||
|
||||
# form params
|
||||
if ( exists $args{'int32'} ) {
|
||||
$form_params->{'int32'} = $self->{api_client}->to_form_value($args{'int32'});
|
||||
}
|
||||
|
||||
# form params
|
||||
if ( exists $args{'int64'} ) {
|
||||
$form_params->{'int64'} = $self->{api_client}->to_form_value($args{'int64'});
|
||||
}
|
||||
|
||||
# form params
|
||||
if ( exists $args{'number'} ) {
|
||||
$form_params->{'number'} = $self->{api_client}->to_form_value($args{'number'});
|
||||
}
|
||||
|
||||
# form params
|
||||
if ( exists $args{'float'} ) {
|
||||
$form_params->{'float'} = $self->{api_client}->to_form_value($args{'float'});
|
||||
}
|
||||
|
||||
# form params
|
||||
if ( exists $args{'double'} ) {
|
||||
$form_params->{'double'} = $self->{api_client}->to_form_value($args{'double'});
|
||||
}
|
||||
|
||||
# form params
|
||||
if ( exists $args{'string'} ) {
|
||||
$form_params->{'string'} = $self->{api_client}->to_form_value($args{'string'});
|
||||
}
|
||||
|
||||
# form params
|
||||
if ( exists $args{'byte'} ) {
|
||||
$form_params->{'byte'} = $self->{api_client}->to_form_value($args{'byte'});
|
||||
}
|
||||
|
||||
# form params
|
||||
if ( exists $args{'binary'} ) {
|
||||
$form_params->{'binary'} = $self->{api_client}->to_form_value($args{'binary'});
|
||||
}
|
||||
|
||||
# form params
|
||||
if ( exists $args{'date'} ) {
|
||||
$form_params->{'date'} = $self->{api_client}->to_form_value($args{'date'});
|
||||
}
|
||||
|
||||
# form params
|
||||
if ( exists $args{'date_time'} ) {
|
||||
$form_params->{'dateTime'} = $self->{api_client}->to_form_value($args{'date_time'});
|
||||
}
|
||||
|
||||
# form params
|
||||
if ( exists $args{'password'} ) {
|
||||
$form_params->{'password'} = $self->{api_client}->to_form_value($args{'password'});
|
||||
}
|
||||
|
||||
my $_body_data;
|
||||
# authentication setting, if any
|
||||
my $auth_settings = [qw()];
|
||||
|
||||
# make the API Call
|
||||
$self->{api_client}->call_api($_resource_path, $_method,
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
return;
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -0,0 +1,198 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::AdditionalPropertiesClass;
|
||||
|
||||
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 the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
__PACKAGE__->mk_classdata('class_documentation' => {});
|
||||
|
||||
# new object
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
||||
my $self = bless {}, $class;
|
||||
|
||||
foreach my $attribute (keys %{$class->attribute_map}) {
|
||||
my $args_key = $class->attribute_map->{$attribute};
|
||||
$self->$attribute( $args{ $args_key } );
|
||||
}
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
# return perl hash
|
||||
sub to_hash {
|
||||
return decode_json(JSON->new->convert_blessed->encode( shift ));
|
||||
}
|
||||
|
||||
# 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 swagger_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
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 (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::SwaggerClient::Object::$type->new()";
|
||||
return $_instance->from_hash($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
__PACKAGE__->class_documentation({description => '',
|
||||
class => 'AdditionalPropertiesClass',
|
||||
required => [], # TODO
|
||||
} );
|
||||
|
||||
__PACKAGE__->method_documentation({
|
||||
'map_property' => {
|
||||
datatype => 'HASH[string,string]',
|
||||
base_name => 'map_property',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_of_map_property' => {
|
||||
datatype => 'HASH[string,HASH[string,string]]',
|
||||
base_name => 'map_of_map_property',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
'map_property' => 'HASH[string,string]',
|
||||
'map_of_map_property' => 'HASH[string,HASH[string,string]]'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
'map_property' => 'map_property',
|
||||
'map_of_map_property' => 'map_of_map_property'
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
||||
|
||||
1;
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::Animal;
|
||||
|
||||
require 5.6.0;
|
||||
@@ -17,9 +48,41 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#
|
||||
#
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
@@ -110,14 +173,23 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'color' => {
|
||||
datatype => 'string',
|
||||
base_name => 'color',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
'class_name' => 'string'
|
||||
'class_name' => 'string',
|
||||
'color' => 'string'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
'class_name' => 'className'
|
||||
'class_name' => 'className',
|
||||
'color' => 'color'
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::AnimalFarm;
|
||||
|
||||
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 the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
__PACKAGE__->mk_classdata('class_documentation' => {});
|
||||
|
||||
# new object
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
||||
my $self = bless {}, $class;
|
||||
|
||||
foreach my $attribute (keys %{$class->attribute_map}) {
|
||||
my $args_key = $class->attribute_map->{$attribute};
|
||||
$self->$attribute( $args{ $args_key } );
|
||||
}
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
# return perl hash
|
||||
sub to_hash {
|
||||
return decode_json(JSON->new->convert_blessed->encode( shift ));
|
||||
}
|
||||
|
||||
# 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 swagger_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
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 (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::SwaggerClient::Object::$type->new()";
|
||||
return $_instance->from_hash($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
__PACKAGE__->class_documentation({description => '',
|
||||
class => 'AnimalFarm',
|
||||
required => [], # TODO
|
||||
} );
|
||||
|
||||
__PACKAGE__->method_documentation({
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
||||
|
||||
1;
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::ApiResponse;
|
||||
|
||||
require 5.6.0;
|
||||
@@ -17,9 +48,41 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#
|
||||
#
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::ArrayTest;
|
||||
|
||||
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 the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
__PACKAGE__->mk_classdata('class_documentation' => {});
|
||||
|
||||
# new object
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
||||
my $self = bless {}, $class;
|
||||
|
||||
foreach my $attribute (keys %{$class->attribute_map}) {
|
||||
my $args_key = $class->attribute_map->{$attribute};
|
||||
$self->$attribute( $args{ $args_key } );
|
||||
}
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
# return perl hash
|
||||
sub to_hash {
|
||||
return decode_json(JSON->new->convert_blessed->encode( shift ));
|
||||
}
|
||||
|
||||
# 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 swagger_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
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 (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::SwaggerClient::Object::$type->new()";
|
||||
return $_instance->from_hash($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
__PACKAGE__->class_documentation({description => '',
|
||||
class => 'ArrayTest',
|
||||
required => [], # TODO
|
||||
} );
|
||||
|
||||
__PACKAGE__->method_documentation({
|
||||
'array_of_string' => {
|
||||
datatype => 'ARRAY[string]',
|
||||
base_name => 'array_of_string',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'array_array_of_integer' => {
|
||||
datatype => 'ARRAY[ARRAY[int]]',
|
||||
base_name => 'array_array_of_integer',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'array_array_of_model' => {
|
||||
datatype => 'ARRAY[ARRAY[ReadOnlyFirst]]',
|
||||
base_name => 'array_array_of_model',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
'array_of_string' => 'ARRAY[string]',
|
||||
'array_array_of_integer' => 'ARRAY[ARRAY[int]]',
|
||||
'array_array_of_model' => 'ARRAY[ARRAY[ReadOnlyFirst]]'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
'array_of_string' => 'array_of_string',
|
||||
'array_array_of_integer' => 'array_array_of_integer',
|
||||
'array_array_of_model' => 'array_array_of_model'
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
||||
|
||||
1;
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::Cat;
|
||||
|
||||
require 5.6.0;
|
||||
@@ -17,9 +48,41 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#
|
||||
#
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
@@ -110,6 +173,13 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'color' => {
|
||||
datatype => 'string',
|
||||
base_name => 'color',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'declawed' => {
|
||||
datatype => 'boolean',
|
||||
base_name => 'declawed',
|
||||
@@ -121,11 +191,13 @@ __PACKAGE__->method_documentation({
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
'class_name' => 'string',
|
||||
'color' => 'string',
|
||||
'declawed' => 'boolean'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
'class_name' => 'className',
|
||||
'color' => 'color',
|
||||
'declawed' => 'declawed'
|
||||
} );
|
||||
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::Category;
|
||||
|
||||
require 5.6.0;
|
||||
@@ -17,9 +48,41 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#
|
||||
#
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::Dog;
|
||||
|
||||
require 5.6.0;
|
||||
@@ -17,9 +48,41 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#
|
||||
#
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
@@ -110,6 +173,13 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'color' => {
|
||||
datatype => 'string',
|
||||
base_name => 'color',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'breed' => {
|
||||
datatype => 'string',
|
||||
base_name => 'breed',
|
||||
@@ -121,11 +191,13 @@ __PACKAGE__->method_documentation({
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
'class_name' => 'string',
|
||||
'color' => 'string',
|
||||
'breed' => 'string'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
'class_name' => 'className',
|
||||
'color' => 'color',
|
||||
'breed' => 'breed'
|
||||
} );
|
||||
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::EnumClass;
|
||||
|
||||
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 the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
__PACKAGE__->mk_classdata('class_documentation' => {});
|
||||
|
||||
# new object
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
||||
my $self = bless {}, $class;
|
||||
|
||||
foreach my $attribute (keys %{$class->attribute_map}) {
|
||||
my $args_key = $class->attribute_map->{$attribute};
|
||||
$self->$attribute( $args{ $args_key } );
|
||||
}
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
# return perl hash
|
||||
sub to_hash {
|
||||
return decode_json(JSON->new->convert_blessed->encode( shift ));
|
||||
}
|
||||
|
||||
# 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 swagger_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
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 (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::SwaggerClient::Object::$type->new()";
|
||||
return $_instance->from_hash($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
__PACKAGE__->class_documentation({description => '',
|
||||
class => 'EnumClass',
|
||||
required => [], # TODO
|
||||
} );
|
||||
|
||||
__PACKAGE__->method_documentation({
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
||||
|
||||
1;
|
||||
@@ -0,0 +1,207 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::EnumTest;
|
||||
|
||||
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 the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
__PACKAGE__->mk_classdata('class_documentation' => {});
|
||||
|
||||
# new object
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
||||
my $self = bless {}, $class;
|
||||
|
||||
foreach my $attribute (keys %{$class->attribute_map}) {
|
||||
my $args_key = $class->attribute_map->{$attribute};
|
||||
$self->$attribute( $args{ $args_key } );
|
||||
}
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
# return perl hash
|
||||
sub to_hash {
|
||||
return decode_json(JSON->new->convert_blessed->encode( shift ));
|
||||
}
|
||||
|
||||
# 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 swagger_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
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 (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::SwaggerClient::Object::$type->new()";
|
||||
return $_instance->from_hash($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
__PACKAGE__->class_documentation({description => '',
|
||||
class => 'EnumTest',
|
||||
required => [], # TODO
|
||||
} );
|
||||
|
||||
__PACKAGE__->method_documentation({
|
||||
'enum_string' => {
|
||||
datatype => 'string',
|
||||
base_name => 'enum_string',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'enum_integer' => {
|
||||
datatype => 'int',
|
||||
base_name => 'enum_integer',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'enum_number' => {
|
||||
datatype => 'double',
|
||||
base_name => 'enum_number',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
'enum_string' => 'string',
|
||||
'enum_integer' => 'int',
|
||||
'enum_number' => 'double'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
'enum_string' => 'enum_string',
|
||||
'enum_integer' => 'enum_integer',
|
||||
'enum_number' => 'enum_number'
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
||||
|
||||
1;
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::FormatTest;
|
||||
|
||||
require 5.6.0;
|
||||
@@ -17,9 +48,41 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#
|
||||
#
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
@@ -180,6 +243,13 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'uuid' => {
|
||||
datatype => 'UUID',
|
||||
base_name => 'uuid',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'password' => {
|
||||
datatype => 'string',
|
||||
base_name => 'password',
|
||||
@@ -201,6 +271,7 @@ __PACKAGE__->swagger_types( {
|
||||
'binary' => 'string',
|
||||
'date' => 'DateTime',
|
||||
'date_time' => 'DateTime',
|
||||
'uuid' => 'UUID',
|
||||
'password' => 'string'
|
||||
} );
|
||||
|
||||
@@ -216,6 +287,7 @@ __PACKAGE__->attribute_map( {
|
||||
'binary' => 'binary',
|
||||
'date' => 'date',
|
||||
'date_time' => 'dateTime',
|
||||
'uuid' => 'uuid',
|
||||
'password' => 'password'
|
||||
} );
|
||||
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
|
||||
|
||||
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 the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
__PACKAGE__->mk_classdata('class_documentation' => {});
|
||||
|
||||
# new object
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
||||
my $self = bless {}, $class;
|
||||
|
||||
foreach my $attribute (keys %{$class->attribute_map}) {
|
||||
my $args_key = $class->attribute_map->{$attribute};
|
||||
$self->$attribute( $args{ $args_key } );
|
||||
}
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
# return perl hash
|
||||
sub to_hash {
|
||||
return decode_json(JSON->new->convert_blessed->encode( shift ));
|
||||
}
|
||||
|
||||
# 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 swagger_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
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 (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::SwaggerClient::Object::$type->new()";
|
||||
return $_instance->from_hash($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
__PACKAGE__->class_documentation({description => '',
|
||||
class => 'MixedPropertiesAndAdditionalPropertiesClass',
|
||||
required => [], # TODO
|
||||
} );
|
||||
|
||||
__PACKAGE__->method_documentation({
|
||||
'uuid' => {
|
||||
datatype => 'UUID',
|
||||
base_name => 'uuid',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'date_time' => {
|
||||
datatype => 'DateTime',
|
||||
base_name => 'dateTime',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map' => {
|
||||
datatype => 'HASH[string,Animal]',
|
||||
base_name => 'map',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
'uuid' => 'UUID',
|
||||
'date_time' => 'DateTime',
|
||||
'map' => 'HASH[string,Animal]'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
'uuid' => 'uuid',
|
||||
'date_time' => 'dateTime',
|
||||
'map' => 'map'
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
||||
|
||||
1;
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::Model200Response;
|
||||
|
||||
require 5.6.0;
|
||||
@@ -17,9 +48,41 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#
|
||||
#Model for testing model name starting with number
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::ModelReturn;
|
||||
|
||||
require 5.6.0;
|
||||
@@ -17,9 +48,41 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#
|
||||
#Model for testing reserved words
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::Name;
|
||||
|
||||
require 5.6.0;
|
||||
@@ -17,9 +48,41 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#
|
||||
#Model for testing model name same as property name
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
@@ -117,16 +180,34 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'property' => {
|
||||
datatype => 'string',
|
||||
base_name => 'property',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'_123_number' => {
|
||||
datatype => 'int',
|
||||
base_name => '123Number',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
'name' => 'int',
|
||||
'snake_case' => 'int'
|
||||
'snake_case' => 'int',
|
||||
'property' => 'string',
|
||||
'_123_number' => 'int'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
'name' => 'name',
|
||||
'snake_case' => 'snake_case'
|
||||
'snake_case' => 'snake_case',
|
||||
'property' => 'property',
|
||||
'_123_number' => '123Number'
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::Order;
|
||||
|
||||
require 5.6.0;
|
||||
@@ -17,9 +48,41 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#
|
||||
#
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::Pet;
|
||||
|
||||
require 5.6.0;
|
||||
@@ -17,9 +48,41 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#
|
||||
#
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::ReadOnlyFirst;
|
||||
|
||||
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 the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
__PACKAGE__->mk_classdata('class_documentation' => {});
|
||||
|
||||
# new object
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
||||
my $self = bless {}, $class;
|
||||
|
||||
foreach my $attribute (keys %{$class->attribute_map}) {
|
||||
my $args_key = $class->attribute_map->{$attribute};
|
||||
$self->$attribute( $args{ $args_key } );
|
||||
}
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
# return perl hash
|
||||
sub to_hash {
|
||||
return decode_json(JSON->new->convert_blessed->encode( shift ));
|
||||
}
|
||||
|
||||
# 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 swagger_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
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 (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::SwaggerClient::Object::$type->new()";
|
||||
return $_instance->from_hash($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
__PACKAGE__->class_documentation({description => '',
|
||||
class => 'ReadOnlyFirst',
|
||||
required => [], # TODO
|
||||
} );
|
||||
|
||||
__PACKAGE__->method_documentation({
|
||||
'bar' => {
|
||||
datatype => 'string',
|
||||
base_name => 'bar',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'baz' => {
|
||||
datatype => 'string',
|
||||
base_name => 'baz',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
'bar' => 'string',
|
||||
'baz' => 'string'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
'bar' => 'bar',
|
||||
'baz' => 'baz'
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
||||
|
||||
1;
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::SpecialModelName;
|
||||
|
||||
require 5.6.0;
|
||||
@@ -17,9 +48,41 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#
|
||||
#
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::Tag;
|
||||
|
||||
require 5.6.0;
|
||||
@@ -17,9 +48,41 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#
|
||||
#
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Object::User;
|
||||
|
||||
require 5.6.0;
|
||||
@@ -17,9 +48,41 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
#
|
||||
#
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
|
||||
@@ -1,21 +1,33 @@
|
||||
#
|
||||
# Copyright 2016 SmartBear Software
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::PetApi;
|
||||
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Role;
|
||||
use utf8;
|
||||
|
||||
@@ -37,7 +68,7 @@ has version_info => ( is => 'ro',
|
||||
default => sub { {
|
||||
app_name => 'Swagger Petstore',
|
||||
app_version => '1.0.0',
|
||||
generated_date => '2016-04-13T22:41:41.133+08:00',
|
||||
generated_date => '2016-06-10T22:39:40.931+08:00',
|
||||
generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen',
|
||||
} },
|
||||
documentation => 'Information about the application version and the codegen codebase version'
|
||||
@@ -103,7 +134,7 @@ Automatically generated by the Perl Swagger Codegen project:
|
||||
|
||||
=over 4
|
||||
|
||||
=item Build date: 2016-04-13T22:41:41.133+08:00
|
||||
=item Build date: 2016-06-10T22:39:40.931+08:00
|
||||
|
||||
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::Role::AutoDoc;
|
||||
use List::MoreUtils qw(uniq);
|
||||
|
||||
|
||||
@@ -1,21 +1,33 @@
|
||||
#
|
||||
# Copyright 2016 SmartBear Software
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::StoreApi;
|
||||
|
||||
|
||||
@@ -1,21 +1,33 @@
|
||||
#
|
||||
# Copyright 2016 SmartBear Software
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
=begin comment
|
||||
|
||||
Swagger 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
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program.
|
||||
# Do not edit the class manually.
|
||||
# Ref: https://github.com/swagger-api/swagger-codegen
|
||||
#
|
||||
package WWW::SwaggerClient::UserApi;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user