Skip to content
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

Support JSON Schema for VCs #27

Closed
clehner opened this issue Aug 28, 2020 · 1 comment
Closed

Support JSON Schema for VCs #27

clehner opened this issue Aug 28, 2020 · 1 comment

Comments

@clehner
Copy link
Contributor

clehner commented Aug 28, 2020

A credential's credentialSchema may specify a URI for a JSON Schema file for validating the credential. (https://w3c.github.io/vc-data-model/#proofs-signatures)

A Rust library for JSON Schema is jsonschema.

jsonschema uses HTTP client library reqwest which pulls in a lot of dependencies (#18). Also, the requests are blocking and responses are not cached (Stranger6667/jsonschema#75). But it looks like the resolver is not used internally to validation but only if the caller calls it. So this might not be a problem us, especially if reqwest is made optional (Stranger6667/jsonschema#137), as we can do our own HTTP resolution (edit: maybe just using reqwest as well), e.g. alongside resolution for JSON-LD Context documents.

Another library is schemafy (mentioned in #21 (comment)) which generates types from schemas at compile time. But it doesn't have full support for the latest JSON Schema drafts. Its use may be limited here since I think we want to be able to validate credentials against arbitrary schemas at runtime.

@wyc
Copy link
Contributor

wyc commented Aug 28, 2020

Adding context here from the CCG ecosystem: w3c-ccg/community#132

Check out the Workday spec draft, maybe a later version here: https://w3c-ccg.github.io/vc-json-schemas/

Note that CCG-hosted specs are not official standards or recommendations, but are a good focal point to consider due to industry and implementer participation, with the possibility of being adopted as a standard at places like W3C and IETF.

@wyc wyc closed this as completed Nov 23, 2020
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

2 participants