title: How to use $ref to reference a path from another OpenAPI file?
body: <p><a href="https://swagger.io/docs/specification/using-ref/" rel="noreferrer">Here</a> it says I could refer to the definition in another file for an individual path, but the example seems to refer to a whole file, instead of a single path definition under the <code>paths</code> object. How to assign an individual path in another file's <code>paths</code> object?</p>
  
  <p>For example, I have <code>Anotherfile.yaml</code> that contains the <code>/a/b</code> path:</p>
  
  <pre class="lang-yaml prettyprint-override"><code>paths:
    /a/b:
      post:
  </code></pre>
  
  <p>In another file, I use <code>$ref</code> to reference the <code>/a/b</code> path as follows:</p>
  
  <pre class="lang-yaml prettyprint-override"><code>paths:
    /c/d:
      $ref: 'Anotherfile.yaml#/paths/a/b'
  </code></pre>
  
  <p>but this gives an error:</p>
  
  <blockquote>
    <p>Could not find paths/a/b in contents of ./Anotherfile.yaml</p>
  </blockquote>