jheckdoc / jheckdoc-laravel
简化API文档的创建。
v1.1.1
2020-11-24 09:29 UTC
Requires
- php: ^7.1
Requires (Dev)
- orchestra/testbench: ^4.0
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-09-29 06:02:48 UTC
README
Jheckdoc laravel
简单的Laravel API文档生成器
演示页面
https://jheckdoc-laravel-demo.herokuapp.com/api/documentation
安装
您可以通过Composer安装此包
composer require jheckdoc/jheckdoc-laravel
使用方法
生成JSON文件
php artisan jheckdoc:generate
发布配置文件
$ php artisan vendor:publish --tag=jheckdoc-config
参数
API文档详细信息(必需)
/*@jheckdocInfo { "version": "1.0.0", "title":"Jheckdoc API", "description" : "Sample description of api", "contact" : "hello@jheckdoc.com", "servers": [ { "url" : "https://jheckdoc.com", "description": "Production api server" }, { "url" : "https://dev.jheckdoc.com", "description": "Development api server" } ] } */
示例注解
每个代码块都需要有效的JSON格式。请参阅示例注解了解更多。
/*@jheckdoc { "method" : "POST", "route" : "/v1/users/login", "name":"User login", "description": "Login to get authorization token.", "group":"user", "headers":{ "Content-Type": { "required": true, "value":"application/x-www-form-urlencoded" } }, "params" : { "email" :{ "type":"string", "description": "Enter E-mail address", "required" : true }, "password" :{ "type":"string", "description": "Enter Password", "required" : true } }, "responses": { "200": { "description": "Success" }, "401": { "description": "Unauthenticated" } } } */
查看API文档(默认)
https://:8000/api/documentation
更新日志
有关最近更改的详细信息,请参阅更新日志。
贡献
有关详细信息,请参阅贡献。
安全性
如果您发现任何安全相关的问题,请使用问题跟踪器。
致谢
许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件。
版权(c)2020,Jeric
Laravel包模板
此包是使用Laravel包模板生成的。

