红联Linux门户
Linux帮助

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

发布时间:2017-09-06 21:02:42来源:红联作者:uineqa
swagger-bootstrap-ui 1.6 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

swagger-bootstrap-ui 1.6更新如下:

1、支持文件上传,需要指定dataType=MultipartFile,如下:[code] @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");
//......
}[/code]2、ResponseBody类型的string展示

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

4、ApiImplicitParam注解defaultValue属性支持

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

maven坐标:[code]
com.github.xiaoymin
swagger-bootstrap-ui
1.6
[/code]软件详情:http://git.oschina.net/xiaoym/swagger-bootstrap-ui

来自:开源中国社区
文章评论

共有 0 条评论