-
Notifications
You must be signed in to change notification settings - Fork 44
/
Credential.yml
112 lines (112 loc) · 3.63 KB
/
Credential.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
openapi: 3.0.0
info:
version: "0.0.3-unstable"
title: VC API
description: This is an Experimental Open API Specification for the [VC Data Model](https://www.w3.org/TR/vc-data-model/).
license:
name: W3C Software and Document License
url: http://www.w3.org/Consortium/Legal/copyright-software.
contact:
name: GitHub Source Code
url: https://github.com/w3c-ccg/vc-api
paths:
components:
schemas:
Credential:
type: object
description: A JSON-LD Verifiable Credential without a proof.
properties:
"@context":
type: array
description: The JSON-LD context of the credential.
items:
type: string
"id":
type: string
description: The ID of the credential. This property MAY be empty. The issuer SHOULD NOT auto-generate the id property if not provided, as a Verifiable Credential does not require the id property to be valid, and there are use cases for which the id property cannot be set.
"type":
type: array
description: The JSON-LD type of the credential.
items:
type: string
"issuer":
$ref: "./Issuer.yml#/components/schemas/Issuer"
"issuanceDate":
type: string
description: The issuanceDate
"expirationDate":
type: string
description: The expirationDate
"credentialSubject":
type: object
description: The subject
example:
{
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
],
"id": "http://example.gov/credentials/3732",
"type": ["VerifiableCredential", "UniversityDegreeCredential"],
"issuer": "did:example:123",
"issuanceDate": "2020-03-16T22:37:26.544Z",
"credentialSubject":
{
"id": "did:example:123",
"degree":
{
"type": "BachelorDegree",
"name": "Bachelor of Science and Arts",
},
},
}
UnsecuredCredential:
type: object
description: A W3C Verifiable Credential without a proof.
properties:
"@context":
type: array
description: The JSON-LD context of the credential.
items:
type: string
"id":
type: string
description: The ID of the credential.
"type":
type: array
description: The JSON-LD type of the credential.
items:
type: string
"issuer":
$ref: "./Issuer.yml#/components/schemas/IssuerRequest"
"issuanceDate":
type: string
description: The issuanceDate
"expirationDate":
type: string
description: The expirationDate
"credentialSubject":
type: object
description: The subject
example:
{
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
],
"id": "http://example.gov/credentials/3732",
"type": ["VerifiableCredential", "UniversityDegreeCredential"],
"issuer": "did:example:123",
"issuanceDate": "2020-03-16T22:37:26.544Z",
"credentialSubject":
{
"id": "did:example:123",
"degree":
{
"type": "BachelorDegree",
"name": "Bachelor of Science and Arts",
},
},
}