punarinta / doru-doc
API 自动文档生成器
dev-master
2017-04-19 16:15 UTC
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2024-09-15 02:40:58 UTC
README
API 自动文档生成器。
标记
请参阅 'example' 目录以获得更好的理解。
数据类型
- "int" — 创建一个限制为整数的输入
- "date" — 创建一个日期选择器
- "bool" — 创建一个包含 "true" 和 "false" 的下拉框
- "enum" — 创建一个包含备选值的下拉框
- 其他任何内容 — 简单地生成一个文本输入字段
格式
* @doc-var (int=42) foo! - An obligatory integer named "foo" with default of 42.
* @doc-var (string) bar - Just a string named "bar".
配置文件
示例
{
"input":
{
"dirs":
[
"../../App/Controller"
]
},
"output":
{
"dir": "../../public/docs",
"filename": "index.html",
"rootUrl": "/api"
},
"exclude":
[
"Generic.php",
"Upload.php"
],
"templates":
{
"dir": "templates",
"overwrite": ["header", "footer", "layout"]
}
}
input.dirs — 一个包含要扫描文件相对路径的数组
output.dir — 输出目录的相对路径 output.filename — 结果 HTML 文件的名字 output.rootUrl — 页面内 API 调用的根 URL
exclude — 在扫描时排除的文件列表
templates.dir — 包含模板替换的目录的相对路径 templates.overwrite — 要覆盖的模板列表