OpenID4VCI icon indicating copy to clipboard operation
OpenID4VCI copied to clipboard

JSON schema for Issuer metadata?

Open Sakurann opened this issue 1 year ago • 5 comments

should we add JSON schema for the issuer metadata in the appendix?

I started one for non-credential format specific parts. OID4VCI_metadata_json_schema.json

Sakurann avatar Feb 13 '24 03:02 Sakurann

I strongly oppose adding JSON schema declarations for any of the data structures we already normatively define in prose. The prose will remain the normative definition, regardless of whether JSON schema is added.

The JSON schema is duplicative and in practice, becomes inconsistent with the prose over time. It imposes a burden on people writing the prose to also try to keep the JSON schema consistent.

Also, JSON schema is under development and not an RFC. We should steer clear of it.

selfissued avatar Feb 13 '24 05:02 selfissued

Irrespective of what @selfissued says, W3C VC issuers are most likely to add the controlling JSON schema directly into the VCs that they issue since this is a standardised property of W3C VCs and the schema specification is already at CR level. So whether the schema is in the issuer's metadata or not, it will be transferred to the holder in the actual VC. So in my opinion it would be better to forewarn the holder by publishing the schema in the issuer's metadata.

David-Chadwick avatar Feb 13 '24 12:02 David-Chadwick

@David-Chadwick your comment doesn't appear to be related to the subject of this ticket, which is about whether we create a scheme for the issuer metadata or not. Credential schemas is a completely different subject.

jogu avatar Feb 13 '24 12:02 jogu

@jogu Apologies. I misread the title as wanting to add JSON schema (for the credential) to the issuer's metadata.

David-Chadwick avatar Feb 13 '24 12:02 David-Chadwick

@selfissued The majority of those arguments also apply to providing examples in specifications though, and examples are highly valuable. We should examine the pros/cons rather than just considering the cons.

JSON schema can be highly valuable as they provide a tool that can help prevent people accidentally publishing non-compliant metadata, sending bad requests or responses, etc (by incorporating validation against schema into their unit/system tests in CI etc). Some of the VCI metadata is relatively complex, increasing the value of a JSON schema.

The eykc-ida WG does provide a JSON schema. They use it in their CI to validate their examples against the schema. It's also used in the conformance tests to validate requests/responses. My understanding is that their schemas are non-normative and technically not part of the specification (i.e. the WG is able to fix bugs or publish schemas for newer versions of the JSON schema spec without needing to go through the errata/similar process). If we reach a consensus to have a schema, I believe we should learn from what ekyc has done.

jogu avatar Feb 13 '24 13:02 jogu