【若依(ruoyi)】swagger 接口 @ApiModelProperty 添加枚举值说明

前言

  • 若依(ruoyi): v4.3
  • swagger 1.5.21 (https://github.com/swagger-api/swagger-core)
  • 在 @ApiModelProperty 中该如何添加枚举值说明。比如,这样:
    在这里插入图片描述
    在这里插入图片描述

@ApiModelProperty

@ApiModelProperty(value = "单据状态( 0,全部;1, 审批中;2, 已审批)", required = true, allowableValues = "0,1,2")
private Integer status = 0;

参考

https://juejin.im/post/6844903845697421319
https://blog.csdn.net/jinhf10/article/details/106212531

猜你喜欢

转载自blog.csdn.net/sayyy/article/details/108338311