Swagger 接口文档查看工具 uniadmin-apidoc 发布

栏目: 软件资讯 · 发布时间: 4年前

内容简介: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制作。

Swagger 接口文档查看工具 uniadmin-apidoc 发布

软件架构

基于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


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Bad Blood

Bad Blood

John Carreyrou / Knopf / 2018-5-21 / USD 27.95

The full inside story of the breathtaking rise and shocking collapse of Theranos, the multibillion-dollar biotech startup, by the prize-winning journalist who first broke the story and pursued it to t......一起来看看 《Bad Blood》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

html转js在线工具
html转js在线工具

html转js在线工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具