API-CLI
view release on metacpan or search on metacpan
lib/API/CLI.pm view on Meta::CPAN
}
}
my ($ok, $out, $content) = $REQ->request;
if (defined $out) {
unless ($ok) {
$out = $run->error($out);
}
warn $out;
}
say $content;
}
1;
__END__
=pod
=head1 NAME
lib/API/CLI/Cmd.pm view on Meta::CPAN
# ABSTRACT:
package API::CLI::Cmd;
use strict;
use warnings;
our $VERSION = '0.001'; # VERSION
use feature qw/ say /;
use base 'App::Spec::Run::Cmd';
use API::CLI::App::Spec;
use YAML::XS qw/ LoadFile DumpFile Dump /;
sub appspec_openapi {
my ($self, $run) = @_;
my $options = $run->options;
my $parameters = $run->parameters;
my $openapi_file = $parameters->{file};
lib/API/CLI/Cmd.pm view on Meta::CPAN
my $openapi = LoadFile($openapi_file);
my $appspec = API::CLI::App::Spec->openapi2appspec(
openapi => $openapi,
name => $name,
class => $class,
);
if (defined $outfile) {
DumpFile($outfile, $appspec);
say "Wrote appspec to $outfile";
}
else {
print Dump $appspec;
}
}
1;
__END__
( run in 0.472 second using v1.01-cache-2.11-cpan-5623c5533a1 )