From 01fc091c7a39a029c463a36ac22870b7bc2014f8 Mon Sep 17 00:00:00 2001 From: jrhender Date: Tue, 2 Apr 2024 21:05:16 +0100 Subject: [PATCH 1/3] add returnPresentation option to presentations/verify --- ...nResult.yml => VerifyCredentialResult.yml} | 0 components/VerifyPresentationOptions.yml | 6 ++- components/VerifyPresentationResult.yml | 38 +++++++++++++++++++ verifier.yml | 4 +- 4 files changed, 45 insertions(+), 3 deletions(-) rename components/{VerificationResult.yml => VerifyCredentialResult.yml} (100%) create mode 100644 components/VerifyPresentationResult.yml diff --git a/components/VerificationResult.yml b/components/VerifyCredentialResult.yml similarity index 100% rename from components/VerificationResult.yml rename to components/VerifyCredentialResult.yml diff --git a/components/VerifyPresentationOptions.yml b/components/VerifyPresentationOptions.yml index bdc6e01..7cfeb07 100644 --- a/components/VerifyPresentationOptions.yml +++ b/components/VerifyPresentationOptions.yml @@ -23,8 +23,12 @@ components: domain: type: string description: The intended domain of validity for the proof. For example website.example + returnPresentation: + type: boolean + description: Should the verified presentation be returned in the response? If true, then the verified presentation should be returned in the form in which it was verified. If false or not provided, then the verified presentation should not be returned. example: { "domain": "example.com", - "challenge": "d436f0c8-fbd9-4e48-bbb2-55fc5d0920a8" + "challenge": "d436f0c8-fbd9-4e48-bbb2-55fc5d0920a8", + "returnCredential": true } diff --git a/components/VerifyPresentationResult.yml b/components/VerifyPresentationResult.yml new file mode 100644 index 0000000..94b1998 --- /dev/null +++ b/components/VerifyPresentationResult.yml @@ -0,0 +1,38 @@ +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: + VerificationResult: + type: object + additionalProperties: false + description: Object summarizing a verification + properties: + checks: + type: array + description: The checks performed + items: + type: string + warnings: + type: array + description: Warnings + items: + type: string + errors: + type: array + description: Errors + items: + type: string + verifiedPresentation: + type: object + description: The verified presentation + example: { "checks": ["proof"], "warnings": [], "errors": [] } diff --git a/verifier.yml b/verifier.yml index a36d697..9075ca6 100644 --- a/verifier.yml +++ b/verifier.yml @@ -107,7 +107,7 @@ components: options: $ref: "./components/VerifyCredentialOptions.yml#/components/schemas/VerifyCredentialOptions" VerifyCredentialResponse: - $ref: "./components/VerificationResult.yml#/components/schemas/VerificationResult" + $ref: "./components/VerifyCredentialResult.yml#/components/schemas/VerificationResult" VerifyPresentationRequest: type: object properties: @@ -121,6 +121,6 @@ components: presentation: $ref: "./components/Presentation.yml#/components/schemas/Presentation" VerifyPresentationResponse: - $ref: "./components/VerificationResult.yml#/components/schemas/VerificationResult" + $ref: "./components/VerifyPresentationResult.yml#/components/schemas/VerificationResult" CreateChallengeResponse: $ref: "./components/Challenge.yml#/components/schemas/CreateChallengeResult" From 103ceea38d06445f08f97035d15269e20c34564a Mon Sep 17 00:00:00 2001 From: Manu Sporny Date: Tue, 16 Apr 2024 15:12:12 -0400 Subject: [PATCH 2/3] Fix bug in returnPresentation example. --- components/VerifyPresentationOptions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/VerifyPresentationOptions.yml b/components/VerifyPresentationOptions.yml index 7cfeb07..b8ad951 100644 --- a/components/VerifyPresentationOptions.yml +++ b/components/VerifyPresentationOptions.yml @@ -30,5 +30,5 @@ components: { "domain": "example.com", "challenge": "d436f0c8-fbd9-4e48-bbb2-55fc5d0920a8", - "returnCredential": true + "returnPresentation": true } From 64174c3c81018737e1ea0ca355d28ca81afda690 Mon Sep 17 00:00:00 2001 From: Manu Sporny Date: Tue, 16 Apr 2024 15:18:07 -0400 Subject: [PATCH 3/3] Rename "verifiablePresentation" to "presentation". --- components/VerifyPresentationResult.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/VerifyPresentationResult.yml b/components/VerifyPresentationResult.yml index 94b1998..325ea29 100644 --- a/components/VerifyPresentationResult.yml +++ b/components/VerifyPresentationResult.yml @@ -32,7 +32,7 @@ components: description: Errors items: type: string - verifiedPresentation: + presentation: type: object description: The verified presentation example: { "checks": ["proof"], "warnings": [], "errors": [] }