Skip to content

Commit 5b7bd95

Browse files
committed
add section to differentiate between contexts and credential Schemas
1 parent 6253730 commit 5b7bd95

File tree

1 file changed

+50
-3
lines changed

1 file changed

+50
-3
lines changed

index.html

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5247,15 +5247,24 @@ <h3>Fitness for Purpose</h3>
52475247
</section>
52485248

52495249
<section class="appendix informative">
5250-
<h2>Base Context</h2>
5250+
<h2>Contexts and Credential Schemas</h2>
5251+
<section class="informative">
52515252

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>
52535262
The base context, located at
52545263
<code>https://www.w3.org/2018/credentials/v1</code> with a SHA-256 digest of
52555264
<strong><code>ab4ddd9a531758807a79a5b450510d61ae8d147eab966cc9a200c07095b0cdcc</code></strong>,
52565265
can be used to implement a local cached copy. For convenience, the base context
52575266
is also provided in this section.
5258-
</p>
5267+
</p>
52595268

52605269
<pre class="informative">
52615270
{
@@ -5497,6 +5506,44 @@ <h2>Base Context</h2>
54975506
}
54985507
</pre>
54995508

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>
55005547
</section>
55015548

55025549
<section class="informative appendix">

0 commit comments

Comments
 (0)