swagger @ApiModelProperty example value for List property

前端 未结 9 2361
温柔的废话
温柔的废话 2020-12-14 00:10

I have one class in which there is one property which is List

public class MyClass {
    ....
    @ApiModelProperty(position = 2)
         


        
9条回答
  •  旧巷少年郎
    2020-12-14 00:45

    I changed my example to the code below and it worked.

    public class MyClass {
    ....
    @ApiModelProperty(
        position = 2, datatype="List", example = "'[''{''PRD1''}','{''PRD2''}'']"
    )
    private List productIdentifiers;
    ....
    }
    

提交回复
热议问题