title: How to reference array item examples in OpenAPI 3?
body: <p>Using this schema definition:</p>
  
  <pre class="lang-yaml prettyprint-override"><code>schemas:
    AllContacts:
      type: array
      items:
        $ref: '#/definitions/ContactModel1'
      example:
        - id: 1
          firstName: Sherlock
          lastName: Holmes
        - id: 2
          firstName: John
          lastName: Watson
  </code></pre>
  
  <p>I get this expected result:</p>
  
  <pre class="lang-js prettyprint-override"><code>[
    {
       "id": 1,
       "firstName": "Sherlock",
       "lastName": "Holmes"
    },
    {
       "id": 2,
       "firstName": "John",
       "lastName": "Watson"
    }
  ]
  </code></pre>
  
  <p>Now I'd like to reuse the Holmes example for both the single user (<code>ContactModel1</code>) and as part of an array of users (<code>AllContacts</code>). But if I use the referenced examples:</p>
  
  <pre class="lang-yaml prettyprint-override"><code>schemas:
  
    AllContacts:
      type: array
      items:
        $ref: '#/definitions/ContactModel1'
      example:
        Homes:
          $ref: '#/components/examples/Homes'
        Watson:
          $ref: '#/components/examples/Watson'
  
    examples:
  
      Holmes:
        value:
          id: 1
          first_name: Sherlock
          last_name: Holmes
  
      Watson:
        value:
          id: 2
          first_name: John
          last_name: Watson
  </code></pre>
  
  <p>I get this unexpected result in Swagger UI:</p>
  
  <pre class="lang-js prettyprint-override"><code>[
    {
      "value": {
        "id": 1,
        "first_name": "Sherlock",
        "last_name": "Holmes",
      },
      "$$ref": "#/components/examples/Holmes"
    },
    {
      "value": {
        "id": 2,
        "first_name": "John",
        "last_name": "Watson",
      },
      "$$ref": "#/components/examples/Watson"
    }
  ]
  </code></pre>
  
  <p>and a similar unexpected example for <code>GET /user/1</code>:</p>
  
  <pre class="lang-js prettyprint-override"><code>[
    {
      "value": {
        "id": 1,
        "first_name": "Sherlock",
        "last_name": "Holmes",
      },
      "$$ref": "#/components/examples/Holmes"
    }
  ]
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>I am using this doc as reference:<br>
  <a href="https://swagger.io/docs/specification/adding-examples/#reuse" rel="noreferrer">https://swagger.io/docs/specification/adding-examples/#reuse</a></p>