From 5781e68d6edc991b98e230c74c27ad7747df95d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IT=E5=B0=8F=E5=BC=BAxqitw=2Ecn?= <360237521@qq.com> Date: Wed, 6 Jun 2018 13:41:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=EF=BC=8C=E4=BB=85=E4=BE=9B=E5=8F=82=E8=80=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - README.md | 3 +- test/Api.php | 38 ++++++++++++++ test/Api2.php | 49 ++++++++++++++++++ test/index.php | 132 +++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 221 insertions(+), 2 deletions(-) create mode 100644 test/Api.php create mode 100644 test/Api2.php create mode 100644 test/index.php 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参数

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

状态码说明

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

返回参数

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