diff --git a/.gitignore b/.gitignore index 2c0386c..c7e0800 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ /.idea -/test/ /vendor/ /composer.lock \ No newline at end of file diff --git a/README.md b/README.md index b822e0d..ea91dd0 100644 --- a/README.md +++ b/README.md @@ -40,4 +40,5 @@ $doc = $api->getApiDoc(); echo '
';
 var_dump($doc);
 echo '
'; -``` \ No newline at end of file +``` ++ 具体使用可参见test目录 \ No newline at end of file diff --git a/test/Api.php b/test/Api.php new file mode 100644 index 0000000..41fefad --- /dev/null +++ b/test/Api.php @@ -0,0 +1,38 @@ + ['Api', 'Api2'], // 要生成文档的类 + 'filter_method' => ['__construct'], // 要过滤的方法名称 +]; +$api = new \itxq\apidoc\ApiDoc($config); +$doc = $api->getApiDoc(); +?> + + + + + + + + + API文档 By Api-Doc-PHP + + + + +
+ $classItem) { ?> +
+
+

+ +

+
+ $actionItem) { ?> +
+

API -

+

请求方式: + +

+

请求地址:

+
+

body参数

+ + + + + + + + + + + + + + + + + +
参数类型描述默认值是否必须
+
+
+

状态码说明

+ + + + + + + + + + + +
状态码描述
+
+
+

返回参数

+ + + + + + + + + + + + + +
参数类型描述
+
+
+ +
+
+ +
+ + + + +