Swagger配置List的example值

直接看代码

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "参数")
public class ReqDTO extends BaseReqDTO {
    
    /**
     * 
     */
    private static final long serialVersionUID = -xxx;

    @ApiModelProperty(value = "不展示的id列表", example = "[1,2,3]")
    private List visibleIdList;

}

结果:


image.png

你可能感兴趣的:(Swagger配置List的example值)