@@ -5247,15 +5247,24 @@ <h3>Fitness for Purpose</h3>
5247
5247
</ section >
5248
5248
5249
5249
< section class ="appendix informative ">
5250
- < h2 > Base Context</ h2 >
5250
+ < h2 > Contexts and Credential Schemas</ h2 >
5251
+ < section class ="informative ">
5251
5252
5252
- < p >
5253
+ < p >
5254
+ The < a > verifiable credential</ a > and < a > verifiable presentation</ a > data models
5255
+ leverage a variety of underlying technologies including [[JSON-LD]] and
5256
+ [[JSON-SCHEMA-2018]]. This section will cover some of the more specific use
5257
+ cases where it's suggested to utilize these features of the data model.
5258
+ </ p >
5259
+
5260
+ < h3 > Base Context</ h3 >
5261
+ < p >
5253
5262
The base context, located at
5254
5263
< code > https://www.w3.org/2018/credentials/v1</ code > with a SHA-256 digest of
5255
5264
< strong > < code > ab4ddd9a531758807a79a5b450510d61ae8d147eab966cc9a200c07095b0cdcc</ code > </ strong > ,
5256
5265
can be used to implement a local cached copy. For convenience, the base context
5257
5266
is also provided in this section.
5258
- </ p >
5267
+ </ p >
5259
5268
5260
5269
< pre class ="informative ">
5261
5270
{
@@ -5497,6 +5506,44 @@ <h2>Base Context</h2>
5497
5506
}
5498
5507
</ pre >
5499
5508
5509
+ </ section >
5510
+ < section class ="informative appendix ">
5511
+ < h2 > Differences between Contexts and CredentialSchemas</ h2 >
5512
+ < p >
5513
+ The primary purpose of a < code > credentialSchema</ code > is different from the
5514
+ primary purpose of < code > @context</ code > . A < code > credentialSchema</ code > is
5515
+ useful for defining the data shape and type of a < code > Verifiable
5516
+ Credential</ code > , whereas [[JSON-LD]] and a < code > @context</ code > in a
5517
+ verifiable credential are best used only for conveying the semantics and term
5518
+ definitions of the data.
5519
+ </ p >
5520
+
5521
+ < p >
5522
+ A < code > @context</ code > can help you define [[JSON-LD]] semantics and term
5523
+ definitions. A < code > credentialSchema</ code > is much more flexible and can help
5524
+ you define [[JSON-SCHEMA-2018]], [[SHACL]], or any other schema technology you
5525
+ want to use to further constrain the shape of the data.
5526
+ </ p >
5527
+
5528
+ < p >
5529
+ While it is possible to use some of [[JSON-LD]] features to allude to the
5530
+ shape of the data, it's not generally suggested to use < code > @context</ code > for
5531
+ schemas related to the shape of the data model. For example, < code > "@type":
5532
+ "@json"</ code > is useful for leaving the semantics open ended and not strictly
5533
+ defined. This can be very useful when your JSON data has no well defined
5534
+ semantics, or where its semantics are rapidly changing, or externally set.
5535
+ </ p >
5536
+
5537
+ < p >
5538
+ When the < code > credentialSchema</ code > and < code > @context</ code > are used
5539
+ in combination together, these tools can help both producers and consumers
5540
+ agree to establish a rigid data shape with strong semantics that make it much
5541
+ easier for an < a > issuer</ a > to be more explicit about the < a > claims</ a > being
5542
+ signed so that the < a > verifier</ a > is able to clearly interoperate at the data
5543
+ layer without further agreement other than what's been conveyed in the data
5544
+ model.
5545
+ </ p >
5546
+ </ section >
5500
5547
</ section >
5501
5548
5502
5549
< section class ="informative appendix ">
0 commit comments