swagger @ApiModelProperty example value for List property

前端 未结 9 2384
温柔的废话
温柔的废话 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:55

    Try to initialize @ApiModelProperty as follows:

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

提交回复
热议问题