vc-data-model icon indicating copy to clipboard operation
vc-data-model copied to clipboard

Inconsistency between spec and schema

Open robdefeo opened this issue 1 year ago • 0 comments

As per schema https://github.com/w3c/vc-data-model/blob/0e6d623d15fb6a3ffadf1249580b5ba55d7894e4/schema/verifiable-credential/verifiable-credential-schema.json#L210C6-L225, credentialSchema does not allow an array. It differs from other fields such as refreshService or termsOfUse where both an array or object are allowed.

    "credentialSchema": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/type"
        }
      },
      "required": [
        "id",
        "type"
      ],
      "additionalProperties": true
    },

However as per the spec in example 22 and https://www.w3.org/TR/vc-data-model-2.0/#data-schemas it states

The value of the credentialSchema property MUST be one or more data schemas...

Please clarify which is correct, the schema.json or the written document.

robdefeo avatar May 13 '24 15:05 robdefeo