`
y806839048
  • 浏览: 1084303 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

swagger的使用注意的地方

阅读更多

swagger的使用注意的地方

1,@Api(value = "/article", tags = "article", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)

@Api是controller头部的,tag中不能出现/否则会出现后面的路径/被转义

 

2,@ApiResponses(@ApiResponse(code = 404, message = "text not found")),因为可以被每个方法公用,也在类上,也可在每个方法上写

 

3,@ApiOperation(value = "listArticle") 方法上的说明,类似tag美没有其他作用

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics