Skip to content

"bad type cardinality" test #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kdimak opened this issue Oct 3, 2019 · 3 comments
Closed

"bad type cardinality" test #97

kdimak opened this issue Oct 3, 2019 · 3 comments

Comments

@kdimak
Copy link

kdimak commented Oct 3, 2019

Could you please explain the meaning of type bad cardinality check from basic group? It's defined at example-3-bad-cardinality.jsonld as following:

{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://www.w3.org/2018/credentials/examples/v1"
  ],
  "id": "http://example.edu/credentials/3732",
  "type": "VerifiableCredential",
  "issuer": "https://example.edu/issuers/14",
  "issuanceDate": "2010-01-01T19:23:24Z",
  "credentialSubject": {
    "id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
    "degree": {
      "type": "BachelorDegree",
      "name": "Bachelor of Science in Mechanical Engineering"
    }
  },
  "proof": {
    "type": "RsaSignature2018"
  }
}

From the other hand, the same type definition can be found in several other test cases, e.g. in example-016-jwt.jsonld which should be processed with no error.

@llorllale
Copy link

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?

@dlongley
Copy link
Contributor

dlongley commented Oct 3, 2019

How can an implementation reasonably guess the correct type based on the given context and the claims in the VC?

See: #96 (comment)

@peacekeeper
Copy link
Contributor

peacekeeper commented Mar 10, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants