From 4d7f7155e59fcd5fdad16b80e35e3dbaafae68ff Mon Sep 17 00:00:00 2001
From: gabe JsonSchemaCredential
The credentialSubject
property MUST contain two properties:
type
– the value of which MUST be JsonSchema
jsonSchema
– an object which contains a valid JSON SchemajsonSchema
– an object which contains a valid JSON SchemaJsonSchemaCredential
- The term definition
- for using the jsonSchema
property within the credentialSubject
- of a verifiable credential is https://www.w3.org/ns/credentials#jsonSchema
.
-
Any version of [[JSON-SCHEMA]] in the section on JSON Schema Specifications @@ -410,10 +405,60 @@
- Add language about JsonSchemaCredential credentials having a credentialSchema property - and the risks of nesting. -
++ This term is part of the + Verifiable Credentials Vocabulary v2.0. +
+jsonSchema enables the use of the jsonSchema
property
+ within the credentialSubject
of a verifiable credential. The term is
+ intended to be used with the type. The value of
+ the jsonSchema
property MUST be a valid [[JSON-SCHEMA]].
+
+
+ {
+ "@context": [
+ "https://www.w3.org/ns/credentials/v2",
+ "https://www.w3.org/ns/credentials/examples/v2"
+ ],
+ "id": "https://example.com/credentials/3734",
+ "type": ["VerifiableCredential", "JsonSchemaCredential"],
+ "issuer": "https://example.com/issuers/14",
+ "issuanceDate": "2010-01-01T19:23:24Z",
+ "credentialSchema": {
+ "id": "https://www.w3.org/2022/credentials/v2/json-schema-credential-schema.json",
+ "type": "JsonSchema",
+ },
+ "credentialSubject": {
+ "id": "https://example.com/schemas/favorite-color-schema.json",
+ "type": "JsonSchema",
+ "jsonSchema": {
+ "$id": "https://example.com/schemas/favorite-color-schema.json",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "name": "Favorite Color Schema",
+ "description": "Favorite Color using JsonSchemaCredential",
+ "type": "object",
+ "properties": {
+ "credentialSubject": {
+ "type": "object",
+ "properties": {
+ "favoriteColor": {
+ "type": "string"
+ "enum": ["red", "orange", "green", "blue", "yellow", "purple"]
+ }
+ },
+ "required": ["favoriteColor"]
+ }
+ }
+ }
+
+ }
+ }
+
+
+ This term is part of the - Verifiable Credentials Vocabulary v2.0. + Verifiable Credentials Vocabulary v2.0.
jsonSchema enables the use of the jsonSchema
property
within the credentialSubject
of a verifiable credential. The term is
From f517cb5bc225484742760374e68845e2be0ad889 Mon Sep 17 00:00:00 2001
From: gabe JsonSchema
+ Usage of the jsonSchema
property is restricted to
+ situations where the JsonSchema
class instance is the object of the credentialSubject
+ property within a JsonSchemaCredential
instance.
+
An example of utilizing the VC Data Model's credentialSchema
is provided below:
@@ -506,7 +511,7 @@
A stable JSON Schema specification is in the works. When it's released, we intend to update this table to require the stable version. -
+jsonSchema enables the use of the jsonSchema
property
within the credentialSubject
of a verifiable credential. The term is
- intended to be used with the type. The value of
+ intended to be used with the type only. The value of
the jsonSchema
property MUST be a valid [[JSON-SCHEMA]].
From c1d214bdde6333c58a99565022bde831e53f2419 Mon Sep 17 00:00:00 2001
From: gabe
It is RECOMMENDED that the value of the JsonSchemaCredential
id
The constraints on the
id
property are listed in the Verifiable Credentials
- Data Model specification [[VC-DATA-MODEL-2]]. The value MUST be a URL that identifies
+ Data Model specification [[VC-DATA-MODEL-2]]. The value MUST be a URL that identifies
the verifiable credential which contains a credential schema.
@@ -539,7 +539,7 @@ $id
$id
property match the id
value in the credentialSchema
object of a verifiable credential, and
- that the value of the $id
is a dereferenceable URL [[URL]].
+ that the value of the $id
is a dereferenceable URL.