Skip to content

Commit f67d066

Browse files
Update identity-api.yaml
1 parent c377055 commit f67d066

File tree

1 file changed

+56
-85
lines changed

1 file changed

+56
-85
lines changed

api-documentation/identity-api.yaml

Lines changed: 56 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
openapi: 3.0.0
33
info:
4-
title: Sunbird RC - Identity APIs
4+
title: Sunbird RC - Identity APIs
55
description: Identity APIs
66
termsOfService: https://sunbirdrc.dev/
77
contact:
@@ -11,16 +11,16 @@ info:
1111
url: https://www.apache.org/licenses/LICENSE-2.0.html
1212
version: 1.0.0
1313
servers:
14-
- url: https://sunbirdrc.dev/api/v1
14+
- url: https://sunbirdrc.dev/api/v1
1515
security:
16-
- Authorization: []
16+
- Authorization: []
1717
tags:
18-
- name: Health
19-
description: Health Check API
20-
- name: Identity
21-
description: The following APIs are defined for generating and resolving a DID
22-
- name: Utils
23-
description: Some common utilities
18+
- name: Health
19+
description: Health Check API
20+
- name: Identity
21+
description: The following APIs are defined for generating and resolving a DID
22+
- name: Utils
23+
description: Some common utilities
2424
paths:
2525
/health:
2626
get:
@@ -29,7 +29,7 @@ paths:
2929
operationId: AppController_checkHealth
3030
parameters: []
3131
responses:
32-
'200':
32+
"200":
3333
description: The Health Check is successful
3434
content:
3535
application/json:
@@ -75,7 +75,7 @@ paths:
7575
type: string
7676
additionalProperties:
7777
type: string
78-
'503':
78+
"503":
7979
description: The Health Check is not successful
8080
content:
8181
application/json:
@@ -141,19 +141,19 @@ paths:
141141
schema:
142142
type: array
143143
items:
144-
$ref: '#/components/schemas/GenerateDidDTO'
144+
$ref: "#/components/schemas/GenerateDidDTO"
145145
responses:
146-
'200':
146+
"200":
147147
content:
148148
application/json:
149149
schema:
150150
type: array
151151
items:
152-
$ref: '#/components/schemas/DidResponseDTO'
152+
$ref: "#/components/schemas/DidResponseDTO"
153153
description: DID Generated
154-
'400':
154+
"400":
155155
description: Bad request
156-
/did/resolve/{id}:
156+
"/did/resolve/{id}":
157157
get:
158158
tags:
159159
- Identity
@@ -167,15 +167,15 @@ paths:
167167
schema:
168168
type: string
169169
responses:
170-
'200':
170+
"200":
171171
content:
172-
application/json:
173-
schema:
174-
$ref: '#/components/schemas/DidResponseDTO'
172+
application/json:
173+
schema:
174+
$ref: "#/components/schemas/DidResponseDTO"
175175
description: DID resolved
176-
'400':
176+
"400":
177177
description: Bad Request
178-
'404':
178+
"404":
179179
description: DID not found
180180
/utils/sign:
181181
post:
@@ -189,17 +189,17 @@ paths:
189189
content:
190190
application/json:
191191
schema:
192-
$ref: '#/components/schemas/SignJsonDTO'
192+
$ref: "#/components/schemas/SignJsonDTO"
193193
responses:
194-
'200':
194+
"200":
195195
content:
196196
application/json:
197197
schema:
198-
$ref: '#/components/schemas/SignedVCDTO'
198+
$ref: "#/components/schemas/SignedVCDTO"
199199
description: VC Signed
200-
'400':
200+
"400":
201201
description: Bad Request
202-
'500':
202+
"500":
203203
description: Internal Server Error
204204
/utils/verify:
205205
post:
@@ -213,15 +213,15 @@ paths:
213213
content:
214214
application/json:
215215
schema:
216-
$ref: '#/components/schemas/VerifyJsonDTO'
216+
$ref: "#/components/schemas/VerifyJsonDTO"
217217
responses:
218-
'201':
218+
"201":
219219
content:
220220
application/json:
221221
schema:
222222
type: boolean
223223
example: true
224-
description: ''
224+
description: ""
225225
components:
226226
schemas:
227227
GenerateDidDTO:
@@ -247,24 +247,16 @@ components:
247247
serviceEndpoint:
248248
type: object
249249
additionalProperties: true
250-
example: '{
251-
"id": "IdentityHub",
252-
"type": "IdentityHub",
253-
"serviceEndpoint": {
254-
"@context": "schema.identity.foundation/hub",
255-
"@type": "UserServiceEndpoint",
256-
"instance": [
257-
"did:test:hub.id"
258-
]
259-
}
260-
}'
250+
example: '{ "id": "IdentityHub", "type": "IdentityHub", "serviceEndpoint": {
251+
"@context": "schema.identity.foundation/hub", "@type":
252+
"UserServiceEndpoint", "instance": [ "did:test:hub.id" ] } }'
261253
method:
262254
type: string
263255
description: The method of DID.
264256
required:
265-
- alsoKnownAs
266-
- services
267-
- method
257+
- alsoKnownAs
258+
- services
259+
- method
268260
SignJsonDTO:
269261
type: object
270262
properties:
@@ -274,42 +266,27 @@ components:
274266
payload:
275267
type: string
276268
description: JSON string of the unsigned VC.
277-
example: '{
278-
"@context": [
279-
"https://www.w3.org/2018/credentials/v1",
280-
"https://www.w3.org/2018/credentials/examples/v1"
281-
],
282-
"id": "did:ulp:b4a191af-d86e-453c-9d0e-dd4771067235",
283-
"type": [
284-
"VerifiableCredential",
285-
"UniversityDegreeCredential"
286-
],
287-
"issuer": "did:rcw:6b9d7b31-bc7f-454a-be30-b6c7447b1cff",
288-
"expirationDate": "2023-02-08T11:56:27.259Z",
289-
"credentialSubject": {
290-
"id": "did:rcw:6b9d7b31-bc7f-454a-be30-b6c7447b1cff",
291-
"grade": "9.23",
292-
"programme": "B.Tech",
293-
"certifyingInstitute": "IIIT Sonepat",
294-
"evaluatingInstitute": "NIT Kurukshetra"
295-
},
296-
"options": {
297-
"created": "2020-04-02T18:48:36Z",
298-
"credentialStatus": {
299-
"type": "RevocationList2020Status"
300-
}
301-
}
302-
}'
269+
example: '{ "@context": [ "https://www.w3.org/2018/credentials/v1",
270+
"https://www.w3.org/2018/credentials/examples/v1" ], "id":
271+
"did:ulp:b4a191af-d86e-453c-9d0e-dd4771067235", "type": [
272+
"VerifiableCredential", "UniversityDegreeCredential" ], "issuer":
273+
"did:rcw:6b9d7b31-bc7f-454a-be30-b6c7447b1cff", "expirationDate":
274+
"2023-02-08T11:56:27.259Z", "credentialSubject": { "id":
275+
"did:rcw:6b9d7b31-bc7f-454a-be30-b6c7447b1cff", "grade": "9.23",
276+
"programme": "B.Tech", "certifyingInstitute": "IIIT Sonepat",
277+
"evaluatingInstitute": "NIT Kurukshetra" }, "options": { "created":
278+
"2020-04-02T18:48:36Z", "credentialStatus": { "type":
279+
"RevocationList2020Status" } } }'
303280
required:
304-
- DID
305-
- payload
281+
- DID
282+
- payload
306283
VerifyJsonDTO:
307284
type: object
308285
properties:
309286
DID:
310287
type: string
311288
required:
312-
- DID
289+
- DID
313290
DidResponseDTO:
314291
type: object
315292
properties:
@@ -336,17 +313,9 @@ components:
336313
serviceEndpoint:
337314
type: object
338315
additionalProperties: true
339-
example: '{
340-
"id": "IdentityHub",
341-
"type": "IdentityHub",
342-
"serviceEndpoint": {
343-
"@context": "schema.identity.foundation/hub",
344-
"@type": "UserServiceEndpoint",
345-
"instance": [
346-
"did:test:hub.id"
347-
]
348-
}
349-
}'
316+
example: '{ "id": "IdentityHub", "type": "IdentityHub", "serviceEndpoint": {
317+
"@context": "schema.identity.foundation/hub", "@type":
318+
"UserServiceEndpoint", "instance": [ "did:test:hub.id" ] } }'
350319
verificationMethod:
351320
type: object
352321
properties:
@@ -371,7 +340,9 @@ components:
371340
publicKey:
372341
type: object
373342
description: Public Key of issuer
374-
example: '{"kty": "EC","crv": "secp256k1","x": "1iTtnvgP141NM-4qC6BgmkeTAjV7u-gZWni71G7cAKo","y": "VSGqq6yS0w7riXXRqFxXwKvHgIpQaUNMlFQKh-xgKMI"}'
343+
example: '{"kty": "EC","crv": "secp256k1","x":
344+
"1iTtnvgP141NM-4qC6BgmkeTAjV7u-gZWni71G7cAKo","y":
345+
"VSGqq6yS0w7riXXRqFxXwKvHgIpQaUNMlFQKh-xgKMI"}'
375346
signed:
376347
type: string
377348
description: Signed VC

0 commit comments

Comments
 (0)