Skip to content

Commit

Permalink
Merge pull request #594 from w3c-ccg/trace-presentation-example
Browse files Browse the repository at this point in the history
OAS /presentations example
  • Loading branch information
nissimsan committed Sep 29, 2023
2 parents a8b4f70 + 3ec621b commit 0d9c51c
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/openapi/resources/presentations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ post:
content:
application/json:
schema:
$ref: '../schemas/Presentation.yml'
$ref: '../schemas/TraceablePresentation.yml'
responses:
'200':
description: Expected response to a valid request
Expand Down
9 changes: 9 additions & 0 deletions docs/openapi/schemas/Holder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: Holder
type: object
properties:
id:
type: string
example:
{
"id": "did:web:sender.example.com"
}
38 changes: 20 additions & 18 deletions docs/openapi/schemas/TraceablePresentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ allOf:
- $ref: "./VerifiablePresentation.yml"
- type: object
properties:
holder:
$ref: "./Holder.yml"
workflow:
$ref: "./Workflow.yml"
example:
Expand All @@ -13,35 +15,35 @@ example:
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/traceability/v1"
],
"holder": "did:web:vc.mesur.io:v1",
"id": "urn:uuid:738c4139-4dea-412e-94b7-c31fd079247a",
"type": [
"VerifiablePresentation",
"TraceablePresentation"
],
"id": "urn:uuid:3978344f-8596-4c3a-a978-8fcaba3903c5",
"holder":{
"id": "did:web:sender.example.com"
},
"workflow": {
"definition": [
"https://w3id.org/traceability#us-cbp-entry"
],
"instance": [
"urn:uuid:f5fb6ce4-b0b1-41b8-89b0-331ni58b7ee0"
],
},
"verifiableCredential": [
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/vc/status-list/2021/v1",
"https://w3id.org/traceability/v1"
],
"credentialStatus": {
"id": "https://vc.mesur.io/v1/credentials/status#9",
"statusListCredential": "https://vc.mesur.io/v1/credentials/status",
"statusListIndex": 9,
"statusPurpose": "revocation",
"type": "StatusList2021Entry"
},
"id": "urn:uuid:07aa969e-b40d-4c1b-ab46-ded252003ded",
"type": ["VerifiableCredential"],
"issuer": "did:key:z6MktiSzqF9kqwdU8VkdBKx56EYzXfpgnNPUAGznpicNiWfn",
"issuanceDate": "2010-01-01T19:23:24Z",
"credentialSubject": {
"id": "did:example:123"
},
"id": "urn:uuid:2569b762-e23c-475d-8f38-66ce813b4d17",
"issuanceDate": "2023-06-19T23:16:57.945Z",
"issuer": "did:web:vc.mesur.io:v1",
"type": [
"VerifiableCredential"
]
"id": "urn:uuid:55a0a7e6-6140-47ab-8c6d-n155f403710c"
}
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion docs/openapi/schemas/Workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ example:
"workflow":
{
"instance": ["urn:uuid:f5fb6ce4-b0b1-41b8-89b0-331ni58b7ee0"],
"definition": ["urn:uuid:n1552885-cc91-4bb3-91f1-5466a0be084e"],
"definition": ["https://w3id.org/traceability#us-cbp-entry"],
},
}
2 changes: 1 addition & 1 deletion tests/conformance_suite.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -17875,4 +17875,4 @@
"type": "string"
}
]
}
}

0 comments on commit 0d9c51c

Please sign in to comment.