内容简介:uniadmin-apidoc是无侵入的Swagger3/OpenApi3.0接口文档查看工具UI。引用即可生效,无需自己配置路由,无需自己部署swagger-ui到public目录。 插件为你做好了一切,基于ThinkPHP6的无侵入OpenApi UI界面,基于swa...
uniadmin-apidoc是无侵入的Swagger3/OpenApi3.0接口文档查看工具UI。引用即可生效,无需自己配置路由,无需自己部署swagger-ui到public目录。 插件为你做好了一切,基于ThinkPHP6的无侵入OpenApi UI界面,基于swagger-bootstrap-ui制作。

软件架构
基于ThinPHP6的ServiceProvider与Swagger-Bootstrap-UI,适合所有thinkphp6.0项目。
安装教程
composer require-dev zircote/swagger-php
composer require-dev uniadmin/uniadmin-apidoc dev-master
写一个文档
在一个控制器比如app/controller/User.php里写一个标准的接开文档如下
/**
* 用户登录
*
* @OA\POST(
* tags={"核心模块"},
* summary="用户登录",
* description="支持账号密码、手机号、邮箱登录",
* path="/core/user/login",
* @OA\Response(response="200",description="获取成功"),
* @OA\Parameter(
* name="account",in="query",required=true,description="用户名",
* @OA\Schema(type="string")
* ),
* @OA\Parameter(
* name="password",in="query",required=true,description="用户密码",
* @OA\Schema(type="string")
* )
* )
*
* @param \think\Request $request
* @return \think\Response
* @author jry <ijry@qq.com>
*/
public function login(Request $request)
{
}
使用说明
访问 {域名:端口}/doc
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- VirAPI 接口文档导出功能上线,可分享并离线查看接口文档啦!
- Spring Boot 集成 Swagger 构建接口文档
- SpringBoot整合Swagger3生成接口文档
- 推荐一个接口文档自动生成工具Swagger
- 前后端分离ssm配置swagger接口文档
- Springboot系列(七) 集成接口文档swagger,使用,测试
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Head First HTML5 Programming
Eric Freeman、Elisabeth Robson / O'Reilly Media / 2011-10-18 / USD 49.99
What can HTML5 do for you? If you're a web developer looking to use this new version of HTML, you might be wondering how much has really changed. Head First HTML5 Programming introduces the key featur......一起来看看 《Head First HTML5 Programming》 这本书的介绍吧!
