Open OR13 opened 4 years ago
As is mentioned here: https://github.com/w3c-ccg/did-spec/pull/270
You can also consider overriding the documentLoader... I like this less than defining and publishing your own contexts, but its probably a better intermediate step if you are not really sure what you need.
I created this Github Repo + Website to demonstrate a transparent and secure way of hosting contexts and documentation, for anyone who is blocked by W3C PRs:
https://github.com/transmute-industries/context
I have added examples for linking to ReSpec and Markdown.
If you use JSON-LD (if you have a DID Document with a context field), you should make sure you don't have any broken links, and consider self hosting your context and documentation instead of ignoring broken links.
... You may not be aware of this, but when your DID Document is flattened, a data structure like this is formed:
If you don't add a context that knows about your key types, you will end up with:
This can cause lots of problems, including missing the whole point of JSON-LD, which is to provide links to documentation around the property values, such as:
https://w3id.org/security#publicKey
So while its easy to add properties to a DID Document (its json after all), doing so without defining them can cause issues for interoperability, and its also not sufficient to just create a new context, because the properties defined in the context need to be documented.
For this reason, I recommend self hosting the context and documentation, while waiting for approval from W3C.