nicolas-cajelli/api-documenter
Composer 安装命令:
composer require nicolas-cajelli/api-documenter
包简介
README 文档
README
This library is intended to automatically build documentation with the smallest friction possible in a defined scope (see Scope) If your use case doesn't match the current scope, please create an issue/pr
Scope
APIS running:
- Php 7.1 or higher (required by gson)
- Isolated Routes file with structure as Slim framework
Install
composer require nicolas-cajelli/api-documenter
Run (Default)
./vendor/bin/build-documentation src/routes.php "My api name" "/my/api/basepath"
Run (Custom)
Create a .php in your project:
<?php $loader = require 'vendor/autoload.php'; # Required by gson library \Doctrine\Common\Annotations\AnnotationRegistry::registerLoader([$loader, 'loadClass']); $app = new \Documenter\FakeApp('My api name'); $app->setBasePath('/my/api/basepath'); $app->setDescription('My api description'); $app->setVersion('1.0.0'); require 'src/routes.php'; $formatter = new \Documenter\Formatter\SwaggerFormatter(); echo $formatter->getDocumentation($app);
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-14