title: How do you define an array of different examples in a Swagger spec?
body: <p>I'm trying to document an API with a static swagger file that can return some JSON that contains an array that looks something like this:</p>
  
  <pre><code>[
    {
      "type": "type A",
      "field A": "this field is specific to type A"
    },
    {
      "type": "type B",
      "field B": "this field is specific to type B"
    }
  ]
  </code></pre>
  
  <p>I've tried a few different ways of defining my spec using either polymorphism or explicitly defining multiple examples. The examples have always either ended up looking like:</p>
  
  <pre><code>[
    {
      "type": "type A",
      "field A": "this field is specific to type A",
      "field B": "this field is specific to type B"
    }
  ]
  </code></pre>
  
  <p>or just:</p>
  
  <pre><code>[
    {
      "type": "type A",
      "field A": "this field is specific to type A"
    }
  ]
  </code></pre>
  
  <p>Is there a way to define an example in my swagger spec so that the example payload shown by swagger-ui will contain an array containing an example of Type A and an example of Type B like the first JSON I wrote?</p>