Shodo
Auto-generate documents from HTTP::Request and HTTP::Response
Install / Use
/learn @yusukebe/ShodoREADME
NAME
Shodo - Auto-generate documents from HTTP::Request and HTTP::Response
SYNOPSIS
use HTTP::Request::Common;
use HTTP::Response;
use Shodo;
my $shodo = Shodo->new();
my $suzuri = $shodo->new_suzuri('An endpoint method.');
my $req = POST '/entry', [ id => 1, message => 'Hello Shodo' ];
$suzuri->request($req);
my $res = HTTP::Response->new(200);
$res->content('{ "message" : "success" }');
$suzuri->response($res);
print $suzuri->document(); # print document as Markdown format
DESCRIPTION
Shodo generates Web API documents as Markdown format automatically and validates parameters using HTTP::Request/Response.
THIS IS A DEVELOPMENT RELEASE. API MAY CHANGE WITHOUT NOTICE.
Methods
new
my $shodo = Shodo->new(
document_root => 'doc'
);
Create and return new Shodo object. "document_root" is optional parameter for your document root directory.
template
$shodo->template($tmpl);
Set custom template.
document_root
$shodo->document_root('doc');
Set document root directory.
new_suzuri
my $suzuri = $shodo->new_suzuri('This is description.');
Create and return new Shodo::Suzuri object with the description.
stock
$shodo->stock($suzuri->doc());
Stock text of documents for writing later. The parameter document is anything ok, but Markdown based is recommended.
write
$shodo->write('output.md');
Write the documentation in stocks to the file and make the stock empty.
SEE ALSO
"autodoc": https://github.com/r7kamura/autodoc
What is Shodo?: http://en.wikipedia.org/wiki/Shodo
THANKS
Songmu for naming as "Shodo". It's pretty.
Moznion for making Test::JsonAPI::Autodoc.
Hachioji.pm for advising.
LICENSE
Copyright (C) Yusuke Wada.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Yusuke Wada yusuke@kamawada.com
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.6kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。

