wing doc using regular expressions to achieve, no context dependent, so it can use in any php file system
include "vendor/autoload.php";
$app = new \Wing\Doc\Doc("/Users/yuyi/Web/xiaoan/api",__DIR__."/doc");
$app->addExcludePath([
"vendor/*","Config/*","config/*",
"public/*","database/*","tests/*"
]);
$app->addExcludeFileName([
"artisan","composer","app.php","web.php"
]);
$app->run();
string(6,64) means that the password form key length must be between 6-64
/**
* user login api
*
* @url http://api.local.com/user/login
* @request number(11,11) phone 手机号码
* @request string(6,64) password 密码
* @response json
*/
json template like this : * @request json topics [{"id":0,"name":"${string(0,0)}"},{"id":0,"name":"${string(0,0)}"}] 悬赏话题
datetime format like this : * @request datetime time ${Y-m-d H:i:s} 时间
/**
* 发布悬赏
*
* @url http://api.xsl.com/reward/publish
* @header string token 用户token标识
* @request string title 悬赏标题
* @request string describe 问题描述
* @request json topics [{"id":0,"name":"${string(0,0)}"},{"id":0,"name":"${string(0,0)}"}] 悬赏话题
* @request datetime time ${Y-m-d H:i:s} 时间
* @request double money 悬赏金额
* @response json
*/