NAME

API::CLI::App::Spec - Can turn an OpenAPI to App::Spec file

METHODS

from_openapi
my $spec = API::CLI::App::Spec->from_openapi(
    openapi => $openapi,
    name => "myclient",
    class => "My::API::CLI", # default API::CLI
);

Returns a App::Spec object from an OpenAPI structure.

openapi2appspec
my $hashref = API::CLI::App::Spec->openapi2appspec(
    openapi => $openapi,
    name => $name,
    class => $class,
);

Returns a hashref representing App::Spec data

param2appspec
my $appspec_param = $class->param2appspec($p);

Returns a Parameter for App::Spec from an OpenAPI parameter.

openapi

Attribute which stores the OpenAPI structure.