swagger-bootstrap-ui 1.6 发布,前端 UI 实现

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

内容简介:swagger-bootstrap-ui 1.6 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿 swagger-bootstrap-ui 1.6更新如下: 1、支持文件上传,...

swagger-bootstrap-ui 1.6 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

swagger-bootstrap-ui 1.6更新如下:

1、支持文件上传,需要指定dataType=MultipartFile,如下:

 @ApiOperation(value = "文件素材上传接口")
 @ApiImplicitParams({@ApiImplicitParam(name = "file", value = "文件流对象,接收数组格式", required = true,dataType = "MultipartFile"),
            @ApiImplicitParam(name = "title", value = "title", required = true)}
    )
 @RequestMapping(value="/uploadMaterial",method = RequestMethod.POST)
 @ResponseBody
 public RestMessage uploadMaterial(@RequestParam(value="file") MultipartFile[] files,@RequestParam(value = "title") String title, HttpServletRequest request) throws IOException {
        //int mul=1*1024*1024;
        String realPath=request.getSession().getServletContext().getRealPath("/upload");
  //......
}

swagger-bootstrap-ui 1.6 发布,前端 UI 实现

2、ResponseBody<String>类型的string展示

3、布局溢出的问题.bycdao-main样式调整,修改margin-left:270px;

4、ApiImplicitParam注解defaultValue属性支持

5、菜单名称调整,展示接口方法类型、接口地址、接口说明三个参数

swagger-bootstrap-ui 1.6 发布,前端 UI 实现

maven坐标:

<dependency>
   <groupId>com.github.xiaoymin</groupId>
   <artifactId>swagger-bootstrap-ui</artifactId>
   <version>1.6</version>
</dependency>

【声明】文章转载自:开源中国社区 [http://www.oschina.net]


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

查看所有标签

猜你喜欢:

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

The Lean Startup

The Lean Startup

Eric Ries / Crown Business / 2011-9-13 / USD 26.00

更多中文介绍:http://huing.com Most startups fail. But many of those failures are preventable. The Lean Startup is a new approach being adopted across the globe, chan ging the way companies are built and ......一起来看看 《The Lean Startup》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具