spring-boot-starter-swagger
spring-boot-starter-swagger copied to clipboard
@ApiModelProperty没有默认值设置的属性,能否支持下
通过界面请求时,经常需要去填一些固定的值,希望能设置默认值
通过界面请求时,经常需要去填一些固定的值,希望能设置默认值
你好,使用@ApiModelProperty是可以设置默认值的,例如:@ApiModelProperty(name="username",value="用户名", example="张三")。 example的值即为默认值
example是举例吧,不是默认值