Skip to content

Commit

Permalink
fix: make credential mapper a bit more resilient
Browse files Browse the repository at this point in the history
  • Loading branch information
nklomp committed May 4, 2023
1 parent 7248fae commit ce5b487
Showing 1 changed file with 90 additions and 20 deletions.
110 changes: 90 additions & 20 deletions packages/vc-handler-ld-local/plugin.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"description": "Use this purpose for the verification method in the DID when doing a check (defaults to CredentialIssuancePurpose)"
}
},
"required": ["credential"],
"required": [
"credential"
],
"description": "Encapsulates the parameters required to create a\n {@link https://www.w3.org/TR/vc-data-model/#credentials | W3C Verifiable Credential }"
},
"CredentialPayload": {
Expand Down Expand Up @@ -68,7 +70,9 @@
"type": "string"
}
},
"required": ["issuer"],
"required": [
"issuer"
],
"description": "Used as input when creating Verifiable Credentials"
},
"IssuerType": {
Expand All @@ -80,7 +84,9 @@
"type": "string"
}
},
"required": ["id"]
"required": [
"id"
]
},
{
"type": "string"
Expand Down Expand Up @@ -111,7 +117,10 @@
"type": "string"
}
},
"required": ["id", "type"],
"required": [
"id",
"type"
],
"description": "Used for the discovery of information about the current status of a verifiable credential, such as whether it is suspended or revoked. The precise contents of the credential status information is determined by the specific `credentialStatus` type definition, and varies depending on factors such as whether it is simple to implement or if it is privacy-enhancing.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#status | Credential Status }"
},
"IAuthenticationProofPurpose": {
Expand Down Expand Up @@ -309,7 +318,13 @@
]
}
},
"required": ["@context", "credentialSubject", "issuanceDate", "issuer", "proof"]
"required": [
"@context",
"credentialSubject",
"issuanceDate",
"issuer",
"proof"
]
},
"CredentialStatusSP": {
"type": "object",
Expand All @@ -327,7 +342,10 @@
"type": "string"
}
},
"required": ["id", "type"]
"required": [
"id",
"type"
]
},
"CredentialProofSP": {
"type": "object",
Expand Down Expand Up @@ -380,7 +398,12 @@
}
}
},
"required": ["type", "created", "proofPurpose", "verificationMethod"],
"required": [
"type",
"created",
"proofPurpose",
"verificationMethod"
],
"additionalProperties": {
"anyOf": [
{
Expand Down Expand Up @@ -459,7 +482,9 @@
]
}
},
"required": ["presentation"],
"required": [
"presentation"
],
"description": "Encapsulates the parameters required to create a\n {@link https://www.w3.org/TR/vc-data-model/#presentations | W3C Verifiable Presentation }"
},
"PresentationPayload": {
Expand Down Expand Up @@ -502,7 +527,9 @@
"type": "string"
}
},
"required": ["holder"],
"required": [
"holder"
],
"description": "Used as input when creating Verifiable Presentations"
},
"W3CVerifiableCredential": {
Expand Down Expand Up @@ -567,7 +594,13 @@
"type": "string"
}
},
"required": ["@context", "credentialSubject", "issuanceDate", "issuer", "proof"],
"required": [
"@context",
"credentialSubject",
"issuanceDate",
"issuer",
"proof"
],
"description": "Represents a signed Verifiable Credential payload (includes proof), using a JSON representation. See {@link https://www.w3.org/TR/vc-data-model/#credentials | VC data model }"
},
"CompactJWT": {
Expand Down Expand Up @@ -647,7 +680,13 @@
]
}
},
"required": ["@context", "holder", "proof", "type", "verifiableCredential"]
"required": [
"@context",
"holder",
"proof",
"type",
"verifiableCredential"
]
},
"W3CVerifiableCredentialSP": {
"anyOf": [
Expand Down Expand Up @@ -681,7 +720,11 @@
"description": "List of descriptors of how the claims are being mapped to presentation definition"
}
},
"required": ["id", "definition_id", "descriptor_map"],
"required": [
"id",
"definition_id",
"descriptor_map"
],
"description": "It expresses how the inputs are presented as proofs to a Verifier."
},
"Descriptor": {
Expand All @@ -703,7 +746,11 @@
"description": "The Proof or JWT algorith that the proof is in"
}
},
"required": ["id", "path", "format"],
"required": [
"id",
"path",
"format"
],
"description": "descriptor map laying out the structure of the presentation submission."
},
"IVerifyCredentialLDArgs": {
Expand Down Expand Up @@ -747,11 +794,18 @@
"$ref": "#/components/schemas/interface-ib.es5.d.ts-10057-11521-ib.es5.d.ts-0-217681"
}
},
"required": ["prototype", "length", "arguments", "caller"],
"required": [
"prototype",
"length",
"arguments",
"caller"
],
"description": "Check status function, to check verifiableCredentials that have a credentialStatus property"
}
},
"required": ["credential"],
"required": [
"credential"
],
"description": "Encapsulates the parameters required to verify a\n {@link https://www.w3.org/TR/vc-data-model/#credentials | W3C Verifiable Credential }"
},
"interface-ib.es5.d.ts-10057-11521-ib.es5.d.ts-0-217681": {
Expand All @@ -766,7 +820,12 @@
"$ref": "#/components/schemas/interface-ib.es5.d.ts-10057-11521-ib.es5.d.ts-0-217681"
}
},
"required": ["prototype", "length", "arguments", "caller"]
"required": [
"prototype",
"length",
"arguments",
"caller"
]
},
"IVerifyPresentationLDArgs": {
"type": "object",
Expand Down Expand Up @@ -817,11 +876,18 @@
"$ref": "#/components/schemas/interface-ib.es5.d.ts-10057-11521-ib.es5.d.ts-0-217681"
}
},
"required": ["prototype", "length", "arguments", "caller"],
"required": [
"prototype",
"length",
"arguments",
"caller"
],
"description": "Check status function, to check verifiableCredentials that have a credentialStatus property"
}
},
"required": ["presentation"],
"required": [
"presentation"
],
"description": "Encapsulates the parameters required to verify a\n {@link https://www.w3.org/TR/vc-data-model/#presentations | W3C Verifiable Presentation }"
},
"VerifiablePresentation": {
Expand Down Expand Up @@ -881,7 +947,11 @@
"type": "string"
}
},
"required": ["@context", "holder", "proof"],
"required": [
"@context",
"holder",
"proof"
],
"description": "Represents a signed Verifiable Presentation (includes proof), using a JSON representation. See {@link https://www.w3.org/TR/vc-data-model/#presentations | VP data model }"
}
},
Expand Down Expand Up @@ -925,4 +995,4 @@
}
}
}
}
}

0 comments on commit ce5b487

Please sign in to comment.