open-attestation
open-attestation copied to clipboard
Transform v3 schema to a more compatible W3C compliant schema
Current Behavior
V3 schema and W3C have some differences which forces us to have a function to map an OA document to a W3C valid document.
The problem is that if we release V3 like this, we will have to support both document, which will be harder to handle.
Expected behavior
V3 schema MUST be W3C compatible
Proposal
-
reference
is not a mandatory field -
name
is not a mandatory field -
validFrom
is not a mandatory field -
attachments
to be renamed toevidence
-
evidence
may have anid
-
identityProof
must be in proof object (issuer can be a string, and in that case it may cause trouble) -
identityProof
to be renamed toidentity
(being inproof
property, the nameidentityProof
sounds a bit redundant) -
issuer
can be a string
Leaving this here for future reference on having multiple issuers of an OA v3 document: https://github.com/w3c/vc-data-model/issues/741
...
"issuer": {
"id": "... url to a 'joint partnership' page, or a urn id that's a hash of the participants...",
"name": "University of A, The Royal College of B",
"participant": [
"https://universityA.edu",
"did:web:royalcollegeofb.edu"
]
}
...