Mojoli...openapi(3pm)
π Mojolicious::Command::openapi β bestie edition π
okay so you found the manual page for Mojolicious::Command::openapi, which lives in section 3pm of the User Contributed Perl Documentation (iykyk, that's the perl module manuals). It's the command line side of OpenAPI::Client, and honestly? it's giving "I do one thing and I do it fabulously". πΈ
β¨ NAME β¨
Mojolicious::Command::openapi β do Open API requests, but make it a command line moment. π«Ά
π SYNOPSIS π
Usage: APPLICATION openapi SPECIFICATION OPERATION "{ARGUMENTS}" [SELECTOR|JSON-POINTER]
# Fetch /api from myapp.pl and list available operationId
./myapp.pl openapi /api
# Dump the whole specification or for an operationId
./myapp.pl openapi /api -I
./myapp.pl openapi /api -I addPet
# Run an operation against a local application
./myapp.pl openapi /api listPets /pets/0
# Run an operation against a local application, with body parameter
./myapp.pl openapi /api addPet -c '{"name":"pluto"}'
echo '{"name":"pluto"} | ./myapp.pl openapi /api addPet
# Run an operation with parameters
mojo openapi spec.json listPets -p limit=10 -p type=dog
# Run against local or online specifications
mojo openapi /path/to/spec.json listPets
mojo openapi http://service.example.com/api.json listPets
Options:
-h, --help Show this summary of available options
-c, --content <content> JSON content, with body parameter data
-i, --inactivity-timeout <seconds> Inactivity timeout, defaults to the
value of MOJO_INACTIVITY_TIMEOUT or 20
-I, --information [operationId] Dump the specification about a given
operationId or the whole spec.
YAML::XS is preferred if available.
-o, --connect-timeout <seconds> Connect timeout, defaults to the value
of MOJO_CONNECT_TIMEOUT or 10
-p, --parameter <name=value> Specify multiple header, path, or
query parameter
-S, --response-size <size> Maximum response size in bytes,
defaults to 2147483648 (2GB)
-v, --verbose Print request and response headers to
STDERR
π DESCRIPTION π
Mojolicious::Command::openapi is a command line interface for OpenAPI::Client. it's the glow-up where your spec file gets to be the main character and you just tell it what to do. π
WARNING bestie, listen up: this implementation is currently EXPERIMENTAL! Not "experimental" as in quirky-cute, experimental as in things could shift under your feet. But like, the author is literally asking for feedback β so if you have thoughts, send them, they're appreciated. π
π ATTRIBUTES π
πΈ description
$str = $command->description;
πΈ usage
$str = $command->usage;
π¦ METHODS π¦
β run
$command->run(@ARGV);
Run this command. That's it, that's the method β it just runs. iconic.
π₯ SEE ALSO π₯
OpenAPI::Client. π
okay that's the whole vibe, bestie π go forth and hit those endpoints with main character energy. this page came to you from perl v5.40.1, dated 2026-06-12, under the name Mojoli...openapi(3pm) β slay, no cap, periodt. β¨π
π¦ where this page comes from
- ubuntu stonking: libopenapi-client-perl 1.09-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms