Skip to content

Commit

Permalink
Renamed name to title and added locale.
Browse files Browse the repository at this point in the history
  • Loading branch information
andresuribe87 committed Nov 2, 2023
1 parent 1f2cd01 commit cb8323c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 19 deletions.
4 changes: 2 additions & 2 deletions EXPLAINER.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Before constructing or issuing a verifiable credential, there must first be a JS
{
"$id": "https://example.com/schemas/email.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"name": "EmailCredential",
"title": "EmailCredential",
"description": "EmailCredential using JsonSchema2023",
"type": "object",
"properties": {
Expand Down Expand Up @@ -104,7 +104,7 @@ Before constructing or issuing a verifiable credential, there must first be a JS
"credentialSubject": {
"$id": "https://example.com/schemas/email-credential-schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"name": "EmailCredential",
"title": "EmailCredential",
"description": "EmailCredential using CredentialSchema2023",
"type": "object",
"properties": {
Expand Down
4 changes: 2 additions & 2 deletions example/yaml-json-schema.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
"$id": https://example.com/schemas/email.json
"$schema": https://json-schema.org/draft/2020-12/schema
name: Email Credential Schema
title: Email Credential Schema
description: Email Credential JSON Schema using YAML
type: object
properties:
Expand All @@ -17,7 +17,7 @@ example: |-
{
"$id": "https://example.com/schemas/email.json",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"name": "EmailCredential",
"title": "EmailCredential",
"description": "Email Credential JSON Schema",
"type": "object",
"properties": {
Expand Down
40 changes: 25 additions & 15 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ <h3>JsonSchema</h3>
{
"$id": "https://example.com/schemas/email.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"name": "EmailCredential",
"title": "EmailCredential",
"description": "EmailCredential using JsonSchema",
"type": "object",
"properties": {
Expand Down Expand Up @@ -397,7 +397,7 @@ <h3>JsonSchemaCredential</h3>
"jsonSchema": {
"$id": "https://example.com/schemas/email-credential-schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"name": "EmailCredential",
"title": "EmailCredential",
"description": "EmailCredential using JsonSchemaCredential",
"type": "object",
"properties": {
Expand Down Expand Up @@ -449,7 +449,7 @@ <h4>jsonSchema</h4>
<span class="highlight"> "jsonSchema": {
"$id": "https://example.com/schemas/favorite-color-schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"name": "Favorite Color Schema",
"title": "Favorite Color Schema",
"description": "Favorite Color using JsonSchemaCredential",
"type": "object",
"properties": {
Expand Down Expand Up @@ -560,17 +560,27 @@ <h4>$schema</h4>
</p>
</section>
<section class="normative">
<h4>name</h4>
<h4>title</h4>
<p>
It is RECOMMENDED that all JSON Schemas include a <code>name</code> property which provides
a human-readable name that describes the schema.
It is RECOMMENDED that all JSON Schemas include the optional <code>title</code> property as defined in
[[JSON-SCHEMA]].
</p>
</section>
<section class="normative">
<h4>description</h4>
<p>
JSON Schemas MAY choose to include an optional <code>description</code> property which provides
a human-readable sentence describing the schema.
It is RECOMMENDED that all JSON Schemas include the optional <code>description</code> property as
defined in [[JSON-SCHEMA]].
</p>
</section>
<section class="normative">
<h4>locale</h4>
<p>
JSON Schemas MAY choose to include an optional <code>locale</code> property to indicate the locale
for the <a href="#title-0">title</a> and <a href="#description">description</a> properties defined in
the JSON Schema. The value of this field MUST be a
<a data-cite="ltli/#dfn-canonical-unicode-locale-identifier">canonical unicode locale identifier</a>.
When absent, implementers MUST assume that the value of this property is `en-US`.
</p>
</section>
</section>
Expand Down Expand Up @@ -689,7 +699,7 @@ <h4>Success Result</h4>
{
"$id": "https://example.com/schemas/email.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"name": "EmailCredential",
"title": "EmailCredential",
"description": "EmailCredential using JsonSchema",
"type": "object",
"properties": {
Expand Down Expand Up @@ -774,7 +784,7 @@ <h4>Indeterminate Result</h4>
{
"$id": "https://example.com/schemas/email.json",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"name": "EmailCredential",
"title": "EmailCredential",
"description": "EmailCredential using JsonSchema",
"type": "object",
"properties": {
Expand Down Expand Up @@ -843,7 +853,7 @@ <h3>Credential Property Validation</h3>
{
"$id": "validuntil-and-evidence-schema",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"name": "Example validUntil and evidence schema",
"title": "Example validUntil and evidence schema",
"description": "Schema requiring validUntil and evidence properties",
"type": "object",
"properties": {
Expand Down Expand Up @@ -880,7 +890,7 @@ <h3>Additional Properties</h3>
{
"$id": "name-schema",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"name": "Name schema",
"title": "Name schema",
"description": "A schema capturing a human name",
"type": "object",
"properties": {
Expand Down Expand Up @@ -961,7 +971,7 @@ <h3>Multiple Schemas</h3>
{
"$id": "name-schema",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"name": "Name schema",
"title": "Name schema",
"description": "A schema capturing a human name",
"type": "object",
"properties": {
Expand Down Expand Up @@ -991,7 +1001,7 @@ <h3>Multiple Schemas</h3>
{
"$id": "email-schema-1.0",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"name": "Email schema",
"title": "Email schema",
"description": "A schema requiring an email address.",
"type": "object",
"properties": {
Expand Down Expand Up @@ -1094,7 +1104,7 @@ <h3>Relationship to Verifiable Credential Type Property</h3>
{
"$id": "https://example.com/schemas/email.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"name": "Email Credential",
"title": "Email Credential",
"description": "Email Credential Schema for usage in JsonSchema",
"type": "object",
"properties": {
Expand Down

0 comments on commit cb8323c

Please sign in to comment.