382
382
<t >
383
383
JSON Schema uses <xref target =" json-reference" >JSON Reference</xref > as a
384
384
mechanism for schema addressing. It extends this specification in two ways:
385
-
385
+
386
386
<list >
387
387
<t >JSON Schema offers facilities to alter the base URI against which a
388
388
URI reference must resolve by the means of the "id" keyword;</t >
389
389
<t >it offers schemas a mechanism to declare their own URIs, placing no limits on the structure of the URI</t >
390
390
</list >
391
391
392
392
</t >
393
-
393
+
394
394
<t >
395
395
<!-- TODO: RFC3986 defines exactly how to do this -->
396
396
The initial base URI of a schema is the URI of the schema itself, or a suitable substitute URI if none is known.
397
397
</t >
398
398
</section >
399
399
400
400
<section title =' Base URI alteration with the "id" keyword' >
401
-
402
401
<section title =" Valid values" >
403
402
<t >
404
403
The value for this keyword MUST be a string, and MUST be a valid URI-reference [RFC3986].
458
457
<t hangText =" #/schema3" >urn:uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f</t >
459
458
</list >
460
459
</t >
461
-
460
+
462
461
</section >
463
462
464
463
<section title =" Methods for dereferencing" >
467
466
This is known as "canonical referencing".
468
467
</t >
469
468
<t >
470
- Tools MAY also take note of the URIs schemas provide for themselves using "id", and use these values for schema dereferencing as well.
469
+ Tools MAY also take note of the URIs schemas provide for themselves using "id", and use these values for schema dereferencing as well.
471
470
This is known as "inline referencing".
472
471
</t >
473
472
509
508
schema, and choose to use the appropriate subschema.</t >
510
509
</list >
511
510
</t >
512
-
511
+
513
512
</section >
514
513
515
514
<section title =" Inline dereferencing and fragments" >
516
515
<t >
517
516
When using inline dereferencing, a base URI may lead to a URI which
518
- has a non empty fragment part which is not a JSON Pointer, as in this
517
+ has a non- empty fragment part which is not a JSON Pointer, as in this
519
518
example:
520
519
</t >
521
520
540
539
An implementation choosing to support inline dereferencing SHOULD be able to use this kind of reference.
541
540
</t >
542
541
</section >
543
-
542
+
544
543
</section >
545
544
546
545
<section title =" Interoperability considerations" >
@@ -587,7 +586,7 @@ Link: <http://example.com/my-hyper-schema#>; rel="describedBy"
587
586
</figure >
588
587
589
588
</section >
590
-
589
+
591
590
<section title =' Correlation by means of the "Content-Type" header' >
592
591
<t >
593
592
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.
@@ -602,7 +601,7 @@ Link: <http://example.com/my-hyper-schema#>; rel="describedBy"
602
601
<artwork >
603
602
<![CDATA[
604
603
Content-Type: application/my-media-type+json;
605
- profile=http://example.com/my-hyper-schema#
604
+ profile=" http://example.com/my-hyper-schema#"
606
605
]]>
607
606
</artwork >
608
607
</figure >
0 commit comments