支持swagger排序

This commit is contained in:
tanghc
2020-08-04 13:55:44 +08:00
parent 57c8f34c3b
commit 199cb67fa3
11 changed files with 190 additions and 1952 deletions

View File

@@ -41,7 +41,7 @@ public class Example1001_BaseController {
}
// 基础用法
@ApiOperation(value = "获取故事信息", notes = "获取故事信息的详细信息")
@ApiOperation(value = "获取故事信息(首位)", notes = "获取故事信息的详细信息", position = -100/* position默认0值越小越靠前 */)
@Open("story.get")
@RequestMapping("/get/v1")
public StoryResult get_v1(StoryParam param) {
@@ -81,7 +81,7 @@ public class Example1001_BaseController {
}
// 返回数组结果
@ApiOperation(value = "返回数组结果", notes = "返回数组结果")
@ApiOperation(value = "返回数组结果(第二)", notes = "返回数组结果", position = -99)
@Open("story.list")
@RequestMapping("/list/v1")
public List<StoryResult> getStory3(StoryParam story) {

View File

@@ -13,6 +13,9 @@ public class StoryParam {
@NotBlank(message = "name不能为空")
@Length(max = 20, message = "name长度不能超过20")
@ApiModelProperty(value = "故事名称", required = true, example = "白雪公主")
@ApiModelProperty(value = "故事名称", required = true, example = "白雪公主", position = 3)
private String name;
@ApiModelProperty(value = "备注 (第二)", example = "xx", position = 2)
private String remark;
}