From 8845768614f1d59cf1fcfa91d0ed8962c43af64e Mon Sep 17 00:00:00 2001 From: pstlouis Date: Tue, 10 Sep 2024 14:40:50 -0400 Subject: [PATCH 01/14] add ProblemDetails object, modify verify credential options and response Signed-off-by: pstlouis --- components/ProblemDetail.yml | 27 +++++++++ components/VerifyCredentialOptions.yml | 10 +++- components/VerifyCredentialResult.yml | 77 ++++++++++++++++++++++---- 3 files changed, 102 insertions(+), 12 deletions(-) create mode 100644 components/ProblemDetail.yml diff --git a/components/ProblemDetail.yml b/components/ProblemDetail.yml new file mode 100644 index 0000000..c692fc3 --- /dev/null +++ b/components/ProblemDetail.yml @@ -0,0 +1,27 @@ +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: + ProblemDetail: + type: + type: string + description: URL identifying the type of problem. + code: + type: integer + description: Integer that identifies the type of the problem. + title: + type: string + description: Short but specific human-readable string for the problem. + detail: + type: string + description: Longer human-readable string for the problem. \ No newline at end of file diff --git a/components/VerifyCredentialOptions.yml b/components/VerifyCredentialOptions.yml index 69bc7eb..421205a 100644 --- a/components/VerifyCredentialOptions.yml +++ b/components/VerifyCredentialOptions.yml @@ -17,10 +17,18 @@ components: additionalProperties: false description: Options for specifying how a credential is verified properties: + returnResults: + type: boolean + description: Include results for each verification steps taken in the response, such as verifying individual proofs, statuses and schemas. + returnProblemDetails: + type: boolean + description: Include ProblemDetails errors and warnings in the response. returnCredential: type: boolean description: Should the verified credential be returned in the response? If true, then the verified credential should be returned in the form in which it was verified. If false or not provided, then the verified credential should not be returned. example: { - "returnCredential": true + "returnProblemDetails": true, + "returnCredential": true, + "returnResults": true } \ No newline at end of file diff --git a/components/VerifyCredentialResult.yml b/components/VerifyCredentialResult.yml index 2cd4af8..0d52b60 100644 --- a/components/VerifyCredentialResult.yml +++ b/components/VerifyCredentialResult.yml @@ -17,22 +17,77 @@ components: additionalProperties: false description: Object summarizing a verification properties: - checks: - type: array - description: The checks performed - items: - type: string + verified: + type: bool + description: Overall verification assertion of the payload. This is set to True if no errors were detected during the verification process, otherwise False. See error handling section for more guidance around errors, warnings, validation and verification. + results: + type: object + additionalProperties: false + description: Verification results to be included as a more verbose output. + properties: + validityPeriod: + type: object + description: Results from validating the validFrom and validUntil values if present in the VerifiableCredential. + properties: + valid: + type: bool + description: Results from validating the validFrom and validUntil values. + validFrom: + type: string + description: The validFrom value. + validUntil: + type: string + description: The validUntil value. + credentialSchema: + type: array + description: Results from validating the credentialSchema objects if any. + items: + type: object + description: Results from validating a credentialSchema object. + properties: + valid: + type: bool + description: Results from validating the credentialSchema object. + input: + type: object + description: The credentialSchema object. + credentialStatus: + type: array + description: Results from validating the credentialStatus objects if any. + items: + type: object + description: Results from validating a credentialStatus object. + properties: + valid: + type: bool + description: Results from validating the credentialStatus object. + input: + type: object + description: The credentialStatus object. + proof: + type: array + description: Results from validating the proof objects if any. + items: + type: object + description: Results from validating a proof object. + properties: + valid: + type: bool + description: Results from validating the proof object. + input: + type: object + description: The proof object. warnings: type: array - description: Warnings + description: Array consisting of ProblemDetails warning objects. items: - type: string + type: object errors: type: array - description: Errors + description: Array consisting of ProblemDetails error objects. items: - type: string + type: object credential: type: object - description: The verified credential - example: { "checks": ["proof"], "warnings": [], "errors": [] } + description: The verified credential used as the verification payload. + example: { "verified": True, "results": {"credentialSchema": [], "credentialStatus": [], "proof": []}, "warnings": [], "errors": [] } From 3812669872072fe4dded4bd0d21ef5e332cd63e2 Mon Sep 17 00:00:00 2001 From: pstlouis Date: Tue, 10 Sep 2024 14:43:54 -0400 Subject: [PATCH 02/14] fix typo Signed-off-by: pstlouis --- components/ProblemDetail.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ProblemDetail.yml b/components/ProblemDetail.yml index c692fc3..758d50d 100644 --- a/components/ProblemDetail.yml +++ b/components/ProblemDetail.yml @@ -12,7 +12,7 @@ info: paths: components: schemas: - ProblemDetail: + ProblemDetails: type: type: string description: URL identifying the type of problem. From da8e436078130f6c9f718a921510146e16a9c055 Mon Sep 17 00:00:00 2001 From: pstlouis Date: Tue, 10 Sep 2024 15:14:04 -0400 Subject: [PATCH 03/14] fix linting issue bool to boolean Signed-off-by: pstlouis --- components/VerifyCredentialResult.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/VerifyCredentialResult.yml b/components/VerifyCredentialResult.yml index 0d52b60..30155ed 100644 --- a/components/VerifyCredentialResult.yml +++ b/components/VerifyCredentialResult.yml @@ -18,7 +18,7 @@ components: description: Object summarizing a verification properties: verified: - type: bool + type: boolean description: Overall verification assertion of the payload. This is set to True if no errors were detected during the verification process, otherwise False. See error handling section for more guidance around errors, warnings, validation and verification. results: type: object @@ -30,7 +30,7 @@ components: description: Results from validating the validFrom and validUntil values if present in the VerifiableCredential. properties: valid: - type: bool + type: boolean description: Results from validating the validFrom and validUntil values. validFrom: type: string @@ -46,7 +46,7 @@ components: description: Results from validating a credentialSchema object. properties: valid: - type: bool + type: boolean description: Results from validating the credentialSchema object. input: type: object @@ -59,7 +59,7 @@ components: description: Results from validating a credentialStatus object. properties: valid: - type: bool + type: boolean description: Results from validating the credentialStatus object. input: type: object @@ -72,7 +72,7 @@ components: description: Results from validating a proof object. properties: valid: - type: bool + type: boolean description: Results from validating the proof object. input: type: object From a109d8e5407b0142b1778f4a4f2267e7abc20e02 Mon Sep 17 00:00:00 2001 From: pstlouis Date: Tue, 10 Sep 2024 15:18:56 -0400 Subject: [PATCH 04/14] add ProblemDetails example Signed-off-by: pstlouis --- components/ProblemDetail.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/ProblemDetail.yml b/components/ProblemDetail.yml index 758d50d..65519fe 100644 --- a/components/ProblemDetail.yml +++ b/components/ProblemDetail.yml @@ -24,4 +24,10 @@ components: description: Short but specific human-readable string for the problem. detail: type: string - description: Longer human-readable string for the problem. \ No newline at end of file + description: Longer human-readable string for the problem. + example: { + "type": "https://www.w3.org/TR/vc-data-model#PARSING_ERROR", + "code": -64, + "title": "PARSING_ERROR", + "detail": "There was an error while parsing input.", + } From 8bf68489fb5a295d46853c30b79e4a1483e0b202 Mon Sep 17 00:00:00 2001 From: pstlouis Date: Tue, 10 Sep 2024 16:02:32 -0400 Subject: [PATCH 05/14] improve validity fields results Signed-off-by: pstlouis --- .../{ProblemDetail.yml => ProblemDetails.yml} | 4 - components/VerifyCredentialResult.yml | 81 ++++++++++++++----- 2 files changed, 59 insertions(+), 26 deletions(-) rename components/{ProblemDetail.yml => ProblemDetails.yml} (88%) diff --git a/components/ProblemDetail.yml b/components/ProblemDetails.yml similarity index 88% rename from components/ProblemDetail.yml rename to components/ProblemDetails.yml index 65519fe..4ff5a13 100644 --- a/components/ProblemDetail.yml +++ b/components/ProblemDetails.yml @@ -16,9 +16,6 @@ components: type: type: string description: URL identifying the type of problem. - code: - type: integer - description: Integer that identifies the type of the problem. title: type: string description: Short but specific human-readable string for the problem. @@ -27,7 +24,6 @@ components: description: Longer human-readable string for the problem. example: { "type": "https://www.w3.org/TR/vc-data-model#PARSING_ERROR", - "code": -64, "title": "PARSING_ERROR", "detail": "There was an error while parsing input.", } diff --git a/components/VerifyCredentialResult.yml b/components/VerifyCredentialResult.yml index 30155ed..647f5f2 100644 --- a/components/VerifyCredentialResult.yml +++ b/components/VerifyCredentialResult.yml @@ -15,27 +15,53 @@ components: VerificationResult: type: object additionalProperties: false - description: Object summarizing a verification + description: Object to report the result of a verification process on a VerifiableCredential. properties: verified: type: boolean - description: Overall verification assertion of the payload. This is set to True if no errors were detected during the verification process, otherwise False. See error handling section for more guidance around errors, warnings, validation and verification. + description: Overall verification assertion of the VerifiableCredential. This is set to True if no errors were detected during the verification process, otherwise False. See error handling section for more guidance around errors, warnings, validation and verification steps. + credential: + type: object + description: The VerifiableCredential used as the verification input. + warnings: + type: array + description: Array consisting of ProblemDetails warning objects. + items: + type: object + errors: + type: array + description: Array consisting of ProblemDetails error objects. + items: + type: object results: type: object additionalProperties: false - description: Verification results to be included as a more verbose output. + description: Verification results to be included as a more verbose output. Keys are mapped to properties from the Verifiable Credential Data Model which are subject to validations. properties: - validityPeriod: + validFrom: type: object - description: Results from validating the validFrom and validUntil values if present in the VerifiableCredential. + description: Results from validating the validFrom property if present in the VerifiableCredential. properties: valid: type: boolean - description: Results from validating the validFrom and validUntil values. - validFrom: + description: Validation result. + details: + type: string + description: Optional information to provide in the response. + input: type: string description: The validFrom value. - validUntil: + validUntil: + type: object + description: Results from validating the validUntil property if present in the VerifiableCredential. + properties: + valid: + type: boolean + description: Validation result. + details: + type: string + description: Optional information to provide in the response. + input: type: string description: The validUntil value. credentialSchema: @@ -48,6 +74,9 @@ components: valid: type: boolean description: Results from validating the credentialSchema object. + details: + type: string + description: Optional information to provide in the response. input: type: object description: The credentialSchema object. @@ -58,9 +87,15 @@ components: type: object description: Results from validating a credentialStatus object. properties: + value: + type: integer + description: Value of the statusEntry Bit. valid: type: boolean description: Results from validating the credentialStatus object. + details: + type: string + description: Optional information to provide in the response. input: type: object description: The credentialStatus object. @@ -74,20 +109,22 @@ components: valid: type: boolean description: Results from validating the proof object. + details: + type: string + description: Optional information to provide in the response. input: type: object description: The proof object. - warnings: - type: array - description: Array consisting of ProblemDetails warning objects. - items: - type: object - errors: - type: array - description: Array consisting of ProblemDetails error objects. - items: - type: object - credential: - type: object - description: The verified credential used as the verification payload. - example: { "verified": True, "results": {"credentialSchema": [], "credentialStatus": [], "proof": []}, "warnings": [], "errors": [] } + example: { + "verified": True, + "credential": {}, + "warnings": [], + "errors": [], + "results": { + "validFrom": [], + "validUntil": [], + "credentialSchema": [], + "credentialStatus": [], + "proof": [] + } + } From 0a321b8e82edf276863cee721507ce8fff5eac5f Mon Sep 17 00:00:00 2001 From: Patrick St-Louis <43082425+PatStLouis@users.noreply.github.com> Date: Tue, 17 Sep 2024 14:26:12 -0400 Subject: [PATCH 06/14] Apply suggestions from code review An issue was also mentioned about the error type `https://www.w3.org/TR/vc-data-model#PARSING_ERROR` not resulting in any meaningful destination/description. Co-authored-by: Ted Thibodeau Jr --- components/VerifyCredentialResult.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/components/VerifyCredentialResult.yml b/components/VerifyCredentialResult.yml index 647f5f2..8b1c294 100644 --- a/components/VerifyCredentialResult.yml +++ b/components/VerifyCredentialResult.yml @@ -19,7 +19,7 @@ components: properties: verified: type: boolean - description: Overall verification assertion of the VerifiableCredential. This is set to True if no errors were detected during the verification process, otherwise False. See error handling section for more guidance around errors, warnings, validation and verification steps. + description: Overall verification assertion of the VerifiableCredential. This is set to `True` if no errors were detected during the verification process; otherwise, `False`. See error handling section for more guidance around errors, warnings, and validation and verification steps. credential: type: object description: The VerifiableCredential used as the verification input. @@ -40,7 +40,7 @@ components: properties: validFrom: type: object - description: Results from validating the validFrom property if present in the VerifiableCredential. + description: Results of validating the validFrom property, if present in the VerifiableCredential. properties: valid: type: boolean @@ -53,7 +53,7 @@ components: description: The validFrom value. validUntil: type: object - description: Results from validating the validUntil property if present in the VerifiableCredential. + description: Results of validating the validUntil property, if present in the VerifiableCredential. properties: valid: type: boolean @@ -73,7 +73,7 @@ components: properties: valid: type: boolean - description: Results from validating the credentialSchema object. + description: Results of validating the credentialSchema object. details: type: string description: Optional information to provide in the response. @@ -85,14 +85,14 @@ components: description: Results from validating the credentialStatus objects if any. items: type: object - description: Results from validating a credentialStatus object. + description: Results of validating a credentialStatus object. properties: value: type: integer description: Value of the statusEntry Bit. valid: type: boolean - description: Results from validating the credentialStatus object. + description: Results of validating the credentialStatus object. details: type: string description: Optional information to provide in the response. @@ -108,7 +108,7 @@ components: properties: valid: type: boolean - description: Results from validating the proof object. + description: Results of validating the proof object. details: type: string description: Optional information to provide in the response. From 7d0214d28c5f26d15eb82d627af13e9ee67d4105 Mon Sep 17 00:00:00 2001 From: Patrick St-Louis <43082425+PatStLouis@users.noreply.github.com> Date: Tue, 24 Sep 2024 13:00:20 -0400 Subject: [PATCH 07/14] Replace occurences of warnings/errors with `problemDetails` Since warning and errors are designed to be an array of ProblemDetails objects, it would simplify to combine these 2 properties into a single problemDetails array in some cases. Co-authored-by: Manu Sporny --- components/VerifyCredentialResult.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/components/VerifyCredentialResult.yml b/components/VerifyCredentialResult.yml index 8b1c294..2d652d9 100644 --- a/components/VerifyCredentialResult.yml +++ b/components/VerifyCredentialResult.yml @@ -71,12 +71,9 @@ components: type: object description: Results from validating a credentialSchema object. properties: - valid: - type: boolean - description: Results of validating the credentialSchema object. - details: - type: string - description: Optional information to provide in the response. + problemDetails: + type: [ProblemDetails] + description: Array of problem details objects input: type: object description: The credentialSchema object. @@ -118,8 +115,7 @@ components: example: { "verified": True, "credential": {}, - "warnings": [], - "errors": [], + "problemDetails": [], "results": { "validFrom": [], "validUntil": [], From 6199f521afc60b97321baba47ce8f3e177e7f51a Mon Sep 17 00:00:00 2001 From: Patrick St-Louis <43082425+PatStLouis@users.noreply.github.com> Date: Tue, 24 Sep 2024 13:01:04 -0400 Subject: [PATCH 08/14] Apply linting suggestions from code review Co-authored-by: Dave Longley --- components/VerifyCredentialResult.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/components/VerifyCredentialResult.yml b/components/VerifyCredentialResult.yml index 2d652d9..71ddc3d 100644 --- a/components/VerifyCredentialResult.yml +++ b/components/VerifyCredentialResult.yml @@ -45,9 +45,9 @@ components: valid: type: boolean description: Validation result. - details: - type: string - description: Optional information to provide in the response. + details: + type: string + description: Optional information to provide in the response. input: type: string description: The validFrom value. @@ -58,9 +58,9 @@ components: valid: type: boolean description: Validation result. - details: - type: string - description: Optional information to provide in the response. + details: + type: string + description: Optional information to provide in the response. input: type: string description: The validUntil value. @@ -122,5 +122,5 @@ components: "credentialSchema": [], "credentialStatus": [], "proof": [] - } + } } From 338586d38f9130744eb2699dc00e61a1ee42e254 Mon Sep 17 00:00:00 2001 From: pstlouis Date: Tue, 24 Sep 2024 14:49:51 -0400 Subject: [PATCH 09/14] Add a warning about the ProblemDetails type URL pending VCDM 2.0 becoming a global standard. Signed-off-by: pstlouis --- index.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.html b/index.html index c4245c6..0e3eb12 100644 --- a/index.html +++ b/index.html @@ -1071,6 +1071,11 @@

Relationship between verification, validation and error handling

Types of ProblemDetails

An implementer can refer to the [[VC-DATA-MODEL-2.0]] and the [[VC-BITSTRING-STATUS-LIST]] for currently defined ProblemDetails types. +

+ The example `type` URLs will work in the future after VCDM v2.0 becomes a global standard. + To ensure the error links to the appropriate location, you can replace the base url from + `https://www.w3.org/TR/vc-data-model` to `www.w3.org/TR/vc-data-model-2.0` for the time being. +

           {

From 6f2112820f1ff0600e0860d3a1cba05ef0453c27 Mon Sep 17 00:00:00 2001
From: pstlouis 
Date: Tue, 24 Sep 2024 14:52:14 -0400
Subject: [PATCH 10/14] replace occurence of the property details for message
 in the responses to disambiguate form the problemDetails object

Signed-off-by: pstlouis 
---
 components/VerifyCredentialResult.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/components/VerifyCredentialResult.yml b/components/VerifyCredentialResult.yml
index 71ddc3d..480da29 100644
--- a/components/VerifyCredentialResult.yml
+++ b/components/VerifyCredentialResult.yml
@@ -45,7 +45,7 @@ components:
                 valid:
                   type: boolean
                   description: Validation result.
-                details:
+                message:
                   type: string
                   description: Optional information to provide in the response.
                 input:
@@ -58,7 +58,7 @@ components:
                 valid:
                   type: boolean
                   description: Validation result.
-                details:
+                message:
                   type: string
                   description: Optional information to provide in the response.
                 input:
@@ -90,7 +90,7 @@ components:
                   valid:
                     type: boolean
                     description: Results of validating the credentialStatus object.
-                  details:
+                  message:
                     type: string
                     description: Optional information to provide in the response.
                   input:
@@ -106,7 +106,7 @@ components:
                   valid:
                     type: boolean
                     description: Results of validating the proof object.
-                  details:
+                  message:
                     type: string
                     description: Optional information to provide in the response.
                   input:

From 7e7c69edc239d35bdd5b84555b680d769d576efd Mon Sep 17 00:00:00 2001
From: pstlouis 
Date: Tue, 1 Oct 2024 14:59:10 -0400
Subject: [PATCH 11/14] fix linting and add problem detail object reference

Signed-off-by: pstlouis 
---
 components/VerifyCredentialResult.yml | 31 ++++++---------------------
 1 file changed, 7 insertions(+), 24 deletions(-)

diff --git a/components/VerifyCredentialResult.yml b/components/VerifyCredentialResult.yml
index 480da29..8227373 100644
--- a/components/VerifyCredentialResult.yml
+++ b/components/VerifyCredentialResult.yml
@@ -23,16 +23,11 @@ components:
         credential:
           type: object
           description: The VerifiableCredential used as the verification input.
-        warnings:
+        problemDetails:
           type: array
-          description: Array consisting of ProblemDetails warning objects.
-          items:
-            type: object
-        errors:
-          type: array
-          description: Array consisting of ProblemDetails error objects.
-          items:
-            type: object
+          description: Array consisting of ProblemDetails objects.
+          items: 
+            $ref: "./components/ProblemDetails.yml#/components/schemas/ProblemDetails"
         results:
           type: object
           additionalProperties: false
@@ -45,9 +40,6 @@ components:
                 valid:
                   type: boolean
                   description: Validation result.
-                message:
-                  type: string
-                  description: Optional information to provide in the response.
                 input:
                   type: string
                   description: The validFrom value.
@@ -58,9 +50,6 @@ components:
                 valid:
                   type: boolean
                   description: Validation result.
-                message:
-                  type: string
-                  description: Optional information to provide in the response.
                 input:
                   type: string
                   description: The validUntil value.
@@ -71,9 +60,9 @@ components:
                 type: object
                 description: Results from validating a credentialSchema object.
                 properties:
-                  problemDetails:
-                    type: [ProblemDetails]
-                    description: Array of problem details objects
+                  valid:
+                    type: boolean
+                    description: Results of validating the credentialSchema object.
                   input:
                     type: object
                     description: The credentialSchema object.
@@ -90,9 +79,6 @@ components:
                   valid:
                     type: boolean
                     description: Results of validating the credentialStatus object.
-                  message:
-                    type: string
-                    description: Optional information to provide in the response.
                   input:
                     type: object
                     description: The credentialStatus object.
@@ -106,9 +92,6 @@ components:
                   valid:
                     type: boolean
                     description: Results of validating the proof object.
-                  message:
-                    type: string
-                    description: Optional information to provide in the response.
                   input:
                     type: object
                     description: The proof object.

From b93933e7df742b403a0e9dac0c831545154cd519 Mon Sep 17 00:00:00 2001
From: Patrick St-Louis <43082425+PatStLouis@users.noreply.github.com>
Date: Tue, 1 Oct 2024 15:00:01 -0400
Subject: [PATCH 12/14] Apply suggestion

Co-authored-by: Ted Thibodeau Jr 
---
 index.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.html b/index.html
index 0e3eb12..c3487c7 100644
--- a/index.html
+++ b/index.html
@@ -1073,8 +1073,8 @@ 

Types of ProblemDetails

An implementer can refer to the [[VC-DATA-MODEL-2.0]] and the [[VC-BITSTRING-STATUS-LIST]] for currently defined ProblemDetails types.

The example `type` URLs will work in the future after VCDM v2.0 becomes a global standard. - To ensure the error links to the appropriate location, you can replace the base url from - `https://www.w3.org/TR/vc-data-model` to `www.w3.org/TR/vc-data-model-2.0` for the time being. + To ensure the error links to the appropriate location, you can replace the base URL of + `https://www.w3.org/TR/vc-data-model` with `www.w3.org/TR/vc-data-model-2.0` for the time being.


From 1ba37972f49bd93bf71525068318363a8c0c6e99 Mon Sep 17 00:00:00 2001
From: pstlouis 
Date: Tue, 8 Oct 2024 14:34:22 -0400
Subject: [PATCH 13/14] fix related object path for ProblemDetails

Signed-off-by: pstlouis 
---
 components/VerifyCredentialResult.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/VerifyCredentialResult.yml b/components/VerifyCredentialResult.yml
index 8227373..e8ebc92 100644
--- a/components/VerifyCredentialResult.yml
+++ b/components/VerifyCredentialResult.yml
@@ -27,7 +27,7 @@ components:
           type: array
           description: Array consisting of ProblemDetails objects.
           items: 
-            $ref: "./components/ProblemDetails.yml#/components/schemas/ProblemDetails"
+            $ref: "./ProblemDetails.yml#/schemas/ProblemDetails"
         results:
           type: object
           additionalProperties: false

From d969201d239790aec78cbaf8d56eda9dd5008192 Mon Sep 17 00:00:00 2001
From: pstlouis 
Date: Tue, 8 Oct 2024 15:05:04 -0400
Subject: [PATCH 14/14] Apply some linting fix to the ProblemDetails schema

Signed-off-by: pstlouis 
---
 components/ProblemDetails.yml         | 20 +++++++++++---------
 components/VerifyCredentialResult.yml | 11 ++++++++---
 2 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/components/ProblemDetails.yml b/components/ProblemDetails.yml
index 4ff5a13..712d13d 100644
--- a/components/ProblemDetails.yml
+++ b/components/ProblemDetails.yml
@@ -13,15 +13,17 @@ paths:
 components:
   schemas:
     ProblemDetails:
-      type:
-        type: string
-        description: URL identifying the type of problem.
-      title:
-        type: string
-        description: Short but specific human-readable string for the problem.
-      detail:
-        type: string
-        description: Longer human-readable string for the problem.
+      type: object
+      properties:
+        type:
+          type: string
+          description: URL identifying the type of problem.
+        title:
+          type: string
+          description: Short but specific human-readable string for the problem.
+        detail:
+          type: string
+          description: Longer human-readable string for the problem.
       example: { 
         "type": "https://www.w3.org/TR/vc-data-model#PARSING_ERROR", 
         "title": "PARSING_ERROR", 
diff --git a/components/VerifyCredentialResult.yml b/components/VerifyCredentialResult.yml
index e8ebc92..410886b 100644
--- a/components/VerifyCredentialResult.yml
+++ b/components/VerifyCredentialResult.yml
@@ -27,7 +27,7 @@ components:
           type: array
           description: Array consisting of ProblemDetails objects.
           items: 
-            $ref: "./ProblemDetails.yml#/schemas/ProblemDetails"
+            $ref: "./ProblemDetails.yml#/components/schemas/ProblemDetails"
         results:
           type: object
           additionalProperties: false
@@ -96,9 +96,14 @@ components:
                     type: object
                     description: The proof object.
       example: { 
-        "verified": True, 
+        "verified": false, 
         "credential": {},
-        "problemDetails": [], 
+        "problemDetails": [
+          {
+            "title": "PARSING_ERROR",
+            "type": "https://www.w3.org/TR/vc-data-model#PARSING_ERROR "
+          }
+        ], 
         "results": {
           "validFrom": [], 
           "validUntil": [],