From 4d7f7155e59fcd5fdad16b80e35e3dbaafae68ff Mon Sep 17 00:00:00 2001 From: gabe Date: Tue, 5 Sep 2023 13:44:39 -0700 Subject: [PATCH 1/5] update readme, update term dfn --- README.md | 7 ++++++ index.html | 67 +++++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 63 insertions(+), 11 deletions(-) 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..5946390 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", @@ -273,7 +274,7 @@

JsonSchemaCredential

The credentialSubject property MUST contain two properties:
  • @@ -291,12 +292,6 @@

    JsonSchemaCredential

  • - -

    - 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 @@

    JsonSchemaCredential

    }

    -

    - Add language about JsonSchemaCredential credentials having a credentialSchema property - and the risks of nesting. -

    +
    +

    jsonSchema

    +

    + 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"]
    +                          }
    +                        }
    +                     }
    +                     
    +                   }
    +                 }
    +                 
    +

    +
    From 1c4bd15c4d6c340e682cb01117fc6fe5414ef1d7 Mon Sep 17 00:00:00 2001 From: Gabe <7622243+decentralgabe@users.noreply.github.com> Date: Wed, 6 Sep 2023 10:04:32 -0500 Subject: [PATCH 2/5] Update index.html Co-authored-by: Ivan Herman --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 5946390..1e8c0b5 100644 --- a/index.html +++ b/index.html @@ -409,7 +409,7 @@

    JsonSchemaCredential

    jsonSchema

    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 Date: Wed, 6 Sep 2023 08:46:51 -0700 Subject: [PATCH 3/5] add note --- index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 1e8c0b5..d1d94bc 100644 --- a/index.html +++ b/index.html @@ -201,6 +201,11 @@

    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 @@

    JSON Schema Specifications

    A stable JSON Schema specification is in the works. When it's released, we intend to update this table to require the stable version. -

    +

    Reserved Keywords

    From d1e1f8ca824bfdbb1c3adb3d90e60c8bf33413d4 Mon Sep 17 00:00:00 2001 From: Gabe <7622243+decentralgabe@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:33:47 -0500 Subject: [PATCH 4/5] Update index.html Co-authored-by: Ivan Herman --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index d1d94bc..4f26f47 100644 --- a/index.html +++ b/index.html @@ -418,7 +418,7 @@

    jsonSchema

    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 Date: Wed, 6 Sep 2023 10:34:47 -0700 Subject: [PATCH 5/5] term links --- index.html | 4 ++-- terms.html | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 4f26f47..d03a681 100644 --- a/index.html +++ b/index.html @@ -314,7 +314,7 @@

    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

    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.

    diff --git a/terms.html b/terms.html index d8d2286..d7631fa 100644 --- a/terms.html +++ b/terms.html @@ -94,11 +94,6 @@
    subject
    A thing about which claims are made. -
    -
    user agent
    -
    -A program, such as a browser or other Web client, that mediates the -communication between holders, issuers, and verifiers.
    validation