-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Picking on GS1 here, but really this applies to any credential with multiple contexts.
Here is the problem:
We need to validate @context before doing JSON-LD processing.
We have to write a separate validation case for each possible expected context value, this causes the verifiers to have to do lots of context schema validation for GS1 specifically, because they ship so many separate context files.
In addition to that, GS1 does not use https://w3id.org/traceability/v1 so we have lost our ability to assert simple things like:
first context is https://www.w3.org/2018/credentials/v2
second context is https://w3id.org/traceability/v1
additional contexts must match this allow list, etc...
instead, best we can do is the following:
first context is https://www.w3.org/2018/credentials/v2
additional contexts from an allow list, which includes https://w3id.org/traceability/v1 and all GS1 contexts known today.
It would be nicer if https://w3id.org/traceability/v1 bundled GS1 contexts... (all of them), so that we could simply do this:
first context is https://www.w3.org/2018/credentials/v2
second context is https://w3id.org/traceability/v1
additional contexts false.
^ this would be safest option.