diff --git a/README.md b/README.md index 5d2745a..f566253 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ https://w3c.github.io/vc-json-schema/ We encourage contributions meeting the [Contribution Guidelines](CONTRIBUTING.md). While we prefer the creation of issues and Pull Requests in the GitHub repository, discussions may also occur on the [public-credentials](http://lists.w3.org/Archives/Public/public-credentials/) mailing list. +### Test Suite + +A [docker](https://www.docker.com/)-based test suite for the specification can [be found here](https://github.com/w3c/vc-json-schema-test-suite). All impelementers are encouraged to add to the test suite. + ### Building To build, we use [respec](https://respec.org/). @@ -21,3 +25,6 @@ Next open up `out.html` in a web browser and review the document. ### Other useful links * [Public group email archive](https://lists.w3.org/Archives/Public/public-credentials/) +* [VC Data Model](https://www.w3.org/TR/vc-data-model/) +* [JSON Schema](https://json-schema.org/) +* [Test Suite](https://github.com/w3c/vc-json-schema-test-suite) \ No newline at end of file diff --git a/index.html b/index.html index 84caaf3..d03a681 100644 --- a/index.html +++ b/index.html @@ -24,6 +24,7 @@ github: "https://github.com/w3c/vc-json-schema/", includePermalinks: false, edDraftURI: "https://w3c.github.io/vc-json-schema/", + testSuiteURI: "https://w3c.github.io/vc-json-schema-test-suite/", editors: [{ name: "Gabe Cohen", url: "https://github.com/decentralgabe", @@ -200,6 +201,11 @@
+ 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:
@@ -273,7 +279,7 @@
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 Schema
- 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 @@ -314,7 +314,7 @@
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.- 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 only. 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"]
+ }
+ }
+ }
+
+ }
+ }
+
+
+ A stable JSON Schema specification is in the works. When it's released, we intend to update this table to require the stable version. -
+
It is RECOMMENDED that the value of the $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.