380
380
<t >
381
381
JSON Schema uses <xref target =" json-reference" >JSON Reference</xref > as a
382
382
mechanism for schema addressing. It extends this specification in two ways:
383
-
383
+
384
384
<list >
385
385
<t >JSON Schema offers facilities to alter the base URI against which a
386
386
reference must resolve by the means of the "id" keyword;</t >
387
387
<t >it offers schemas a mechanism to declare their own URIs, placing no limits on the structure of the URI</t >
388
388
</list >
389
389
390
390
</t >
391
-
391
+
392
392
<t >
393
393
Altering the URI within a schema is called defining a new resolution scope.
394
394
The initial resolution scope of a schema is the URI of the schema itself, or a suitable substitute URI if none is known.
395
395
</t >
396
396
</section >
397
397
398
398
<section title =' URI resolution scope alteration with the "id" keyword' >
399
-
399
+
400
400
<section title =" Valid values" >
401
401
<t >
402
402
The value for this keyword MUST be a string, and MUST be a valid URI (relative or absolute).
455
455
Subschemas at the following URI-encoded <xref target =" json-pointer" >JSON
456
456
Pointer</xref >s (starting from the root schema) define the following
457
457
resolution scopes:
458
-
458
+
459
459
<list style =" hanging" >
460
460
<t hangText =" # (document root)" >http://x.y.z/rootschema.json#</t >
461
461
<t hangText =" #/schema1" >http://x.y.z/rootschema.json#foo</t >
465
465
<t hangText =" #/schema3" >some://where.else/completely#</t >
466
466
</list >
467
467
</t >
468
-
468
+
469
469
</section >
470
470
471
471
<section title =" Methods for dereferencing" >
474
474
This is known as "canonical referencing".
475
475
</t >
476
476
<t >
477
- Tools MAY also take note of the URIs schemas provide for themselves using "id", and use these values for schema dereferencing as well.
477
+ Tools MAY also take note of the URIs schemas provide for themselves using "id", and use these values for schema dereferencing as well.
478
478
This is known as "inline referencing".
479
479
</t >
480
480
516
516
schema, and choose to use the appropriate subschema.</t >
517
517
</list >
518
518
</t >
519
-
519
+
520
520
</section >
521
521
522
522
<section title =" Inline dereferencing and fragments" >
547
547
An implementation choosing to support inline dereferencing SHOULD be able to use this kind of reference.
548
548
</t >
549
549
</section >
550
-
550
+
551
551
</section >
552
552
553
553
<section title =" Interoperability considerations" >
@@ -593,7 +593,7 @@ Link: <http://example.com/my-hyper-schema#>; rel="describedBy"
593
593
</figure >
594
594
595
595
</section >
596
-
596
+
597
597
<section title =' Correlation by means of the "Content-Type" header' >
598
598
<t >
599
599
Instances may also specify a schema using the "profile" MIME type parameter in the Content-Type header, when the MIME type MUST be "application/json", or any other subtype.
@@ -608,7 +608,7 @@ Link: <http://example.com/my-hyper-schema#>; rel="describedBy"
608
608
<artwork >
609
609
<![CDATA[
610
610
Content-Type: application/my-media-type+json;
611
- profile=http://example.com/my-hyper-schema#
611
+ profile=" http://example.com/my-hyper-schema#"
612
612
]]>
613
613
</artwork >
614
614
</figure >
0 commit comments