How to use references in JustinRainbow JsonValidator
<p>Can someone tell me how to make the JustinRainbow Json schema validator be able to find references.</p>

<p>This is the schema of foobar I'm trying to validate:</p>

<pre><code>{
  "title": "foobar schema",
  "type": "object",
  "properties": {
    "pagination": {
       "$ref": "#/definitions/pagination"
    }
  },
  "required": ["pagination"]
}
</code></pre>

<p>And the definition of the pagination schema is contained in a separate file on my computer.</p>

<p>Trying to validate that without telling the JSON validator how to resolve references like this:</p>

<pre><code>$uriRetriever = new JsonSchema\Uri\UriRetriever();
$refResolver = new JsonSchema\RefResolver($uriRetriever, $uriResolver);
$schema = $refResolver-&gt;resolve("file://".realpath(__DIR__."/foobar.json"));
</code></pre>

<p>Gives an error message: </p>

<pre><code>File: file://features/foobar.json is found, but could not resolve fragment: #/definitions/pagination (JsonSchema\Exception\UnresolvableJsonPointerException)
</code></pre>

<p>Which is fair enough as there is no way for the validator to know how to find the file that contains the pagination schema definition....so how can I tell the RefResolver how to find the definition of the pagination schema? </p>

<p>I would prefer to be able to resolve the file through the local filesystem, rather than having to use URL's on a webserver.</p>