Skip to content

Commit ad1d7cb

Browse files
committed
Add more details to OpenAPI definitions
1 parent cd96763 commit ad1d7cb

File tree

1 file changed

+87
-17
lines changed

1 file changed

+87
-17
lines changed

openapi/openapi.yaml

Lines changed: 87 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ paths:
4242
example3:
4343
value: did:ebsi:z25ZZFS7FweHsm9MX2Qvc6gc
4444
description: A DID using the `ebsi` method.
45-
example4:
46-
value: did:indy:sovrin:builder:VbPQNHsvoLZdaNU7fTBeFx#key-1
47-
description: A DID URL with a fragment.
48-
example5:
49-
value: did:ebsi:z25ZZFS7FweHsm9MX2Qvc6gc#keys-1
50-
description: A DID URL with a fragment.
5145
- in: header
5246
required: false
5347
name: Accept
@@ -68,9 +62,9 @@ paths:
6862
- in: query
6963
name: options
7064
schema:
71-
type: object
72-
additionalProperties:
73-
type: string
65+
oneOf:
66+
- $ref: "#/components/schemas/ResolutionOptions"
67+
- $ref: "#/components/schemas/DereferencingOptions"
7468
description: The options for resolving the DID or dereferencing the DID URL.
7569
style: form
7670
explode: true
@@ -208,27 +202,103 @@ paths:
208202
humanReadable: false
209203
components:
210204
schemas:
205+
ResolutionOptions:
206+
description: The DID resolution options. See https://www.w3.org/TR/did-resolution/#did-resolution-options
207+
type: object
208+
properties:
209+
expandRelativeUrls:
210+
type: boolean
211+
versionId:
212+
type: string
213+
versionTime:
214+
type: string
215+
format: date-time
216+
additionalProperties: { }
217+
DereferencingOptions:
218+
description: The DID URL dereferencing options. See https://www.w3.org/TR/did-resolution/#did-url-dereferencing-options
219+
type: object
220+
properties:
221+
verificationRelationship:
222+
type: string
223+
additionalProperties: { }
211224
ResolutionResult:
212225
description: The DID resolution result.
213226
type: object
214227
properties:
215228
didDocument:
216229
type: object
217230
didResolutionMetadata:
218-
type: object
219-
additionalProperties: { }
231+
$ref: "#/components/schemas/DidResolutionMetadata"
220232
didDocumentMetadata:
221-
type: object
222-
additionalProperties: { }
233+
$ref: "#/components/schemas/DidDocumentMetadata"
234+
DidResolutionMetadata:
235+
type: object
236+
properties:
237+
contentType:
238+
type: string
239+
error:
240+
$ref: "#/components/schemas/RFC9457ProblemDetails"
241+
additionalProperties: { }
242+
DidDocumentMetadata:
243+
type: object
244+
properties:
245+
created:
246+
type: string
247+
format: date-time
248+
updated:
249+
type: string
250+
format: date-time
251+
deactivated:
252+
type: string
253+
nextUpdate:
254+
type: string
255+
format: date-time
256+
versionId:
257+
type: string
258+
nextVersionId:
259+
type: string
260+
equivalentId:
261+
type: array
262+
items:
263+
type: string
264+
canonicalId:
265+
type: string
266+
additionalProperties: { }
223267
DereferencingResult:
224268
description: The DID URL dereferencing result.
225269
type: object
226270
properties:
227271
content:
228272
type: object
229273
dereferencingMetadata:
230-
type: object
231-
additionalProperties: { }
274+
$ref: "#/components/schemas/DereferencingMetadata"
232275
contentMetadata:
233-
type: object
234-
additionalProperties: { }
276+
$ref: "#/components/schemas/ContentMetadata"
277+
DereferencingMetadata:
278+
type: object
279+
properties:
280+
contentType:
281+
type: string
282+
error:
283+
$ref: "#/components/schemas/RFC9457ProblemDetails"
284+
additionalProperties: { }
285+
ContentMetadata:
286+
type: object
287+
additionalProperties: { }
288+
RFC9457ProblemDetails:
289+
type: object
290+
required:
291+
- type
292+
- title
293+
properties:
294+
type:
295+
type: string
296+
status:
297+
type: integer
298+
title:
299+
type: string
300+
detail:
301+
type: string
302+
instance:
303+
type: string
304+
additionalProperties: { }

0 commit comments

Comments
 (0)