用于设置API名称
缺省情况下, 默认使用api注释的第一行作为API的名称
# read api name from tag `api.name`
api.name=#api.name标记接口 status
api.status=#status标记接口 tag
api.tag=@io.swagger.annotations.ApiOperation#tags默认的只会导出注解有 org.springframework.stereotype.Controller或org.springframework.web.bind.annotation.RestController的类中的api.
当有导出未注解 org.springframework.stereotype.Controller或org.springframework.web.bind.annotation.RestController的类中的api的需求时,可以配置此规则
apiclass.is.ctrl=truectrl类中的api@ctrl来控制哪些类会包含api, 可以配置为:class.is.ctrl=#ctrl设置API请求前缀
#Resolve spring properties
###set ignoreUnresolved = true
class.prefix.path=${server.servlet.context-path}
###set ignoreUnresolved = falseserver.servlet.context-path=/demoserver:
servlet:
context-path: /democlass.prefix.path=/demo忽略常量字段
#ignore serialVersionUID
constant.field.ignore=serialVersionUID#ignore serialVersionUID
constant.field.ignore=groovy:it.name()=="serialVersionUID"@see com.itangcent.common.constant.UserTypeConstant{@link com.itangcent.common.constant.UserTypeConstant}枚举: 1,2,3
枚举备注: 1 :管理员 2 :成员 3 :游客
mock: @pick(["1","2","3"])用于设置使用 @see枚举类型时的默认取值字段
public enum UserType {
//管理员
ADMIN(1, "管理员"),
//成员
MEMBER(2, "成员"),
//游客
GUEST(3, "游客");
private int code;
private String desc;
public int getCode() {
return code;
}
public String getDesc() {
return desc;
}
UserType(int code, String desc) {
this.code = code;
this.desc = desc;
}
}@see UserType时默认使用code字段作为取值enum.use.custom[com.itangcent.common.constant.UserType]=code| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| type | integer | 非必须 | 用户类型 | 枚举: 1,2,3 枚举备注: 1: 管理员 2: 成员 3: 游客 mock: @pick([1,2,3]) |