swagger @ApiModelProperty example value for List<String> property
<p>I have one class in which there is one property which is <code>List&lt;String&gt;</code></p>

<pre><code>public class MyClass {
    ....
    @ApiModelProperty(position = 2)
    private List&lt;String&gt; productIdentifiers;
    ....
}
</code></pre>

<p>This code generates the example values as following:</p>

<pre><code>{
  "customerId": "1001",
  "productIdentifiers": [
    "string"
  ],
  "statuses": [
    "NEW"
  ]
}
</code></pre>

<p>The example values here shown are not valid. My expected example values should be like :</p>

<pre><code>{
  "customerId": "1001",
  "productIdentifiers": [
    "PRD1",
    "PRD2",
    "PRD3"
  ],
  "statuses": [
    "NEW"
  ]
}
</code></pre>

<p>I have tried passing example attribute as following but it is not generating proper value:</p>

<pre><code>@ApiModelProperty(position = 2, example = "PRD1, PRD2, PRD3")
// This generates -&gt; "productIdentifiers": "PRD1, PRD2, PRD3" // Its not json array

@ApiModelProperty(position = 2, example = "[\"PRD1\", \"PRD2\", \"PRD3\"]")
// This generates -&gt; "productIdentifiers": "[\"PRD1\", \"PRD2\", \"PRD3\"]" // Its too not json array
</code></pre>

<p>Is there any way I can generate proper example value for List property ?</p>

<p><strong>Update :</strong></p>

<p>I have tried the solutions suggested by @nullpointer and @Zeeshan Arif</p>

<pre><code>@ApiModelProperty(position = 2, dataType="List", example = "PRD1, PRD2, PRD3")
private List&lt;String&gt; productIdentifiers;
//This generates -&gt; `"productIdentifiers": "PRD1, PRD2, PRD3"`
</code></pre>

<p><strong>Update 2 :</strong></p>

<p>Tried following approach which <strong>did not</strong> generate proper response</p>

<pre><code>@ApiModelProperty(position = 2, dataType="java.util.List&lt;String&gt;", example = "PRD1, PRD2, PRD3")
// This generates -&gt; "productIdentifiers": "PRD1, PRD2, PRD3"


@ApiModelProperty(position = 2, dataType="String[]", example = "PRD1, PRD2, PRD3")
// This generates -&gt; "productIdentifiers": "PRD1, PRD2, PRD3"
</code></pre>

<p>my maven dependency for swagger jar is :</p>

<pre><code>&lt;dependency&gt;
    &lt;groupId&gt;io.springfox&lt;/groupId&gt;
    &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;
    &lt;version&gt;2.5.0&lt;/version&gt;
    &lt;exclusions&gt;
        &lt;exclusion&gt;
            &lt;artifactId&gt;mapstruct&lt;/artifactId&gt;
            &lt;groupId&gt;org.mapstruct&lt;/groupId&gt;
        &lt;/exclusion&gt;
    &lt;/exclusions&gt;
&lt;/dependency&gt;
</code></pre>

<p><strong>Update</strong>
<a href="https://github.com/swagger-api/swagger-core/issues/1855" rel="noreferrer">github ticket for this issue</a></p>