title: Swagger array of different objects
body: <p>For example I need to represent following structure in swagger yaml format:</p>
  
  <pre><code>  "included": [
      {
        "type": "people",
        "id": "42",
        "attributes": {
          "name": "John",
          "age": 80,
          "gender": "male"
        }
      }
    ]
  </code></pre>
  
  <p>With single object everything is fine:</p>
  
  <pre><code>  included:
      type: "array"
      items:
        type: object
        properties:
          type:
            type: "string"
          # and so on 
  </code></pre>
  
  <p>The question is what if I need to describe something like:</p>
  
  <pre><code>"included": [{
      "type": "people",
      "id": "9",
      "attributes": {
        "first-name": "Dan",
        "last-name": "Gebhardt",
        "twitter": "dgeb"
      },
      "links": {
        "self": "http://example.com/people/9"
      }
    }, {
      "type": "comments",
      "id": "5",
      "attributes": {
        "body": "First!"
      },
      "relationships": {
        "author": {
          "data": { "type": "people", "id": "2" }
        }
      },
      "links": {
        "self": "http://example.com/comments/5"
      }
    }, {
      "type": "comments",
      "id": "12",
      "attributes": {
        "body": "I like XML better"
      },
      "relationships": {
        "author": {
          "data": { "type": "people", "id": "9" }
        }
      },
      "links": {
        "self": "http://example.com/comments/12"
      }
    }]
  </code></pre>
  
  <p>I know that in OpenAPI it's possible ( aka swagger 3 ) and tried some workarounds in current version but with no luck.</p>