Skip to content

Commit

Permalink
VDRv2: Fix OpenAPI DID document service API specs (#2657)
Browse files Browse the repository at this point in the history
  • Loading branch information
reinkrul authored Dec 8, 2023
1 parent e3dafa9 commit 4c9ae31
Show file tree
Hide file tree
Showing 2 changed files with 177 additions and 81 deletions.
38 changes: 20 additions & 18 deletions docs/_static/vdr/v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,26 +102,26 @@ paths:
* 400 - Returned in case of malformed DID or service
* 404 - Corresponding DID document could not be found
* 500 - An error occurred while processing the request
parameters:
- name: service
in: body
description: Service to be added to the DID document.
required: true
schema:
$ref: '#/components/schemas/Service'
operationId: addService
tags:
- DID
requestBody:
description: Service to be added to the DID document.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Service'
responses:
"200":
description: "New service has been added successfully. Returns the service."
content:
application/json:
schema:
$ref: '#/components/schemas/VerificationMethod'
$ref: '#/components/schemas/Service'
default:
$ref: '../common/error_response.yaml'
/internal/vdr/v2/did/{did}/service/{id}:
/internal/vdr/v2/did/{did}/service/{serviceId}:
parameters:
- name: did
in: path
Expand All @@ -130,11 +130,13 @@ paths:
example: did:web:example.com:iam:013c6fda-73e8-45ee-9220-48652dba854b
schema:
type: string
- name: id
- name: serviceId
in: path
description: URL encoded id identifying the service.
description: URL encoded ID identifying the service.
required: true
example: "did:web:example.com:iam:013c6fda-73e8-45ee-9220-48652dba854b#3106f751-59e3-440f-b57b-39a96a2da6c6"
example:
- "did:web:example.com:iam:013c6fda-73e8-45ee-9220-48652dba854b#3106f751-59e3-440f-b57b-39a96a2da6c6"
- "#3106f751-59e3-440f-b57b-39a96a2da6c6"
schema:
type: string
delete:
Expand Down Expand Up @@ -166,13 +168,13 @@ paths:
tags:
- DID
operationId: updateService
parameters:
- name: service
in: body
description: Service to be added to the DID document.
required: true
requestBody:
description: New version of the service.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Service'
$ref: '#/components/schemas/Service'
responses:
"200":
description: "Service has been updated successfully. Returns the service."
Expand Down
Loading

0 comments on commit 4c9ae31

Please sign in to comment.