title: How to use definitions from external files in JSON Schema?
body: <p>I'm trying to import the definitions from another json schema using <code>$ref</code> but getting the following error:</p>
  
  <p><code>can't resolve reference ../base/definitions.schema.json#/definitions/datetime from id #</code></p>
  
  <pre>
  {
    "$schema": "http://json-schema.org/draft-06/schema#",
  
    "definitions": {
      "datetime": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
    }
  }
  
  </pre>
  
  <pre>
  {
    "$schema": "http://json-schema.org/draft-06/schema#",
    "properties": {
      "active": {"type": "boolean"},
      "created_at": { "$ref": "../base/definitions.schema.json#/definitions/datetime" },
      "name": { "$ref": "../base/base/definitions.schema.json#/definitions/name" },
      "updated_at": { "$ref": "../base/definitions.schema.json#/definitions/datetime" }
    },
    "required": ["name"],
    "type": "object"
  }
  
  </pre>
  
  <p>Directory structure:</p>
  
  <p><pre>
  api
  -- base
    -- definitions.schema.json
  -- country
    -- country.schema.json
  </pre></p>
  
  <p>I have tried several combinations by using an absolute path, a <code>file</code> url and several other combinations of the path. Not sure what's going on.</p>
  
  <p>Schema validator: <code>ajv@5.1.1</code></p>