title: Referencing JSON Schema from json similar way XML references XML Schema
body: <p>When I have defined XML Schema I can then reference it from XML this way saying that that XML must correspond to the referenced schema. This way I can force validation of such XML and I can also provide valuable hint for the person who is going to edit this file, because XML editors supporting XML Schema will use such reference to generate auto-complete, this way making editing much easier.</p>
  
  <p>However I can't see such referencing in JSON Schema documentation.
  For example: <a href="https://json-schema.org/learn/getting-started-step-by-step.html" rel="nofollow noreferrer">https://json-schema.org/learn/getting-started-step-by-step.html</a></p>
  
  <p>It looks like it is not part of the standard, or I just can't find it.</p>
  
  <p>Here is an example for XSD Schema with reference usage:</p>
  
  <pre><code>&lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
              targetNamespace="http://example.org/definitions/product"&gt;
      &lt;xsd:element name="product"&gt;
          &lt;xsd:complexType&gt;
              &lt;xsd:sequence&gt;
                  &lt;xsd:element name="id" type="xsd:long" maxOccurs="1" minOccurs="1"/&gt;
                  &lt;xsd:element name="name" type="xsd:string" maxOccurs="1" minOccurs="1"/&gt;
                  &lt;xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" /&gt;
              &lt;/xsd:sequence&gt;
          &lt;/xsd:complexType&gt;
      &lt;/xsd:element&gt;
  &lt;/xsd:schema&gt;
  </code></pre>
  
  <p>And here is an XML that uses that Schema by referencing it logical name: <a href="http://example.org/definitions/product" rel="nofollow noreferrer">http://example.org/definitions/product</a></p>
  
  <pre><code>&lt;product:product xmlns:product="http://example.org/definitions/product"&gt;
      &lt;id&gt;1&lt;/id&gt;
      &lt;name&gt;One&lt;/name&gt;
      &lt;description&gt;The One&lt;/description&gt;
  &lt;/product:product&gt;
  </code></pre>
  
  <p><strong>So now anyone can start editing it and, if supported, get auto-complete by their editor based on referenced XSD Schema.</strong></p>
  
  <p>But what about JSON Schema?</p>
  
  <p>If I have JSON schema like this:</p>
  
  <pre><code>{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "http://example.org/definitions/product",
    "title": "product",
    "type": "object",
    "properties": {
      "id": {
        "type": "long"
      },
      "name": {
        "type": "string"
      },
      "description": {
        "type": "string"
      }
    },
    "required": [ "id", "name" ]
  }
  </code></pre>
  
  <p>And actual JSON like this:</p>
  
  <pre><code>{
    "id": 1,
    "name": "One",
    "description": "The one"
  }
  </code></pre>
  
  <p><strong>Then how can I actually link the JSON to Schema I expect it will correspond to?</strong></p>