mport('Load');
}
if (eval { require JSON::XS }) {
JSON::XS->import('decode_json')
}
else {
require JSON::PP;
JSON::PP->import('decode_json');
}
}
sub new {
bless {}, shift
open file $file";
my $content = <$fh>;
close $fh;
if ($file =~ /\.json$/) {
push @defs, decode_json($content);
}
else {
push @defs, Load($content);
}
}
merg
f /\.(yml|yaml|json)$/ }, $_[1];
@files
}
1
__END__
=head1 NAME
OpenAPI::Generator::From::Definitions - Generate openapi single definition from several definitions in yaml or json!
=head1 SYNOP