w3c / vc-data-model

W3C Verifiable Credentials v2.0 Specification
https://w3c.github.io/vc-data-model/
Other
298 stars 106 forks source link

Example 21 contains an undefined term #1564

Closed filip26 closed 1 month ago

filip26 commented 1 month ago

see Example 21

assertion is an undefined term. Possible solutions:

filip26 commented 1 month ago

the same for Example 20

msporny commented 1 month ago

The example uses the https://www.w3.org/ns/credentials/examples/v2 context, which includes an @vocab statement. That makes assertion defined. Yes, it's a bit sloppy, but that's what the examples context is there for -- to make the content valid so we can demonstrate an example.

I suggest we keep the example as-is, as it is what we intended. Would you be ok with that, @filip26?

filip26 commented 1 month ago

@msporny It's a presentation, the main @context is erased in v20 for verifiableCredential.

Easiest fix is to replace assertion with description for 21, and replace favoriteCheese in example 20 with something else, .e.g. @id name, as those props are not important for the examples. I can open PR if this 'fix' is OK.

I've found another issues like those, e.g. non-dereferenceable contexts in examples. Do you prefer to have it reported, or is there some plan to fix all the examples in once?

filip26 commented 1 month ago

or move examples context to credential scoped context, it could be a nice example that there can be more contexts embedded .

davidlehn commented 1 month ago

I'd add the examples context to the inner credential. A move wouldn't work since the presentation uses ExamplePresentation which needs to be handled as well.

msporny commented 1 month ago

Fixed in 05c8f8e2193e0112482c362114a751e57f9437f6. Closing.