Closed kdimak closed 3 years ago
The cardinality of type
should reflect (not necessarily equal!) that of @context
:
Since this document includes an additional context ("...examples/v1"), and since VerifiableCredential
is already defined in the standard context for VCs, then it is expected that type
be an array and have one more element for a type defined in "...examples/v1".
That said, I'm not sure this test case is set up properly for implementers. How can an implementation reasonably guess the correct type based on the given context and the claims in the VC?
How can an implementation reasonably guess the correct type based on the given context and the claims in the VC?
See: https://github.com/w3c/vc-test-suite/issues/96#issuecomment-537992894
I agree with @clehner on this. The VC in https://github.com/w3c/vc-test-suite/blob/gh-pages/test/vc-data-model-1.0/input/example-3-bad-cardinality.jsonld is valid per the data model and therefore it should not be used for a "negative" test in https://github.com/w3c/vc-test-suite/blob/gh-pages/test/vc-data-model-1.0/10-basic.js#L89.
Could you please explain the meaning of
type
bad cardinality check frombasic
group? It's defined at example-3-bad-cardinality.jsonld as following:From the other hand, the same
type
definition can be found in several other test cases, e.g. inexample-016-jwt.jsonld
which should be processed with no error.