title: How to declare a $ref property as readOnly in OpenAPI (Swagger)?
body: <p>I am trying to add a read-only field for 'House' in this example. The house is another model that I want to be read-only. </p>
  
  <p>In this example, the array of Dogs can be set to <code>readOnly</code> without an error, but when I set the single definition of House to <code>readOnly</code> I get the following warning in the Swagger Editor:</p>
  
  <blockquote>
    <p>Sibling values are not allowed alongside $refs</p>
  </blockquote>
  
  <p>I understand that this is because everything in the model is inherited here. So how do I define that the write API calls cannot define a 'House' in this endpoint whilst also allowing House to be created and updated in another API endpoints?</p>
  
  <pre class="lang-yaml prettyprint-override"><code>Pets:
    properties:
      id:
        type: string
        example: AAAAE12-1123AEF-1122312123
        readOnly: true
      name:
        type: string
        example: My Default Name
      text:
        type: string
        example: My Default Text
    Dogs:
      type: array
      readOnly: true
      items:
        $ref: '#/definitions/Dog'    
    House:
      readOnly: true
      $ref: '#/definitions/House'
  </code></pre>