Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

414 problem details response #418

Merged
merged 15 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions components/ProblemDetails.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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:
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.
example: {
"type": "https://www.w3.org/TR/vc-data-model#PARSING_ERROR",
PatStLouis marked this conversation as resolved.
Show resolved Hide resolved
"title": "PARSING_ERROR",
"detail": "There was an error while parsing input.",
}
10 changes: 9 additions & 1 deletion components/VerifyCredentialOptions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
118 changes: 105 additions & 13 deletions components/VerifyCredentialResult.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,116 @@ 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:
checks:
type: array
description: The checks performed
items:
type: string
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, and validation and verification steps.
credential:
type: object
description: The VerifiableCredential used as the verification input.
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
credential:
type: object
results:
type: object
description: The verified credential
example: { "checks": ["proof"], "warnings": [], "errors": [] }
additionalProperties: false
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:
validFrom:
type: object
description: Results of validating the validFrom property, if present in the VerifiableCredential.
properties:
valid:
type: boolean
description: Validation result.
details:
type: string
description: Optional information to provide in the response.
PatStLouis marked this conversation as resolved.
Show resolved Hide resolved
input:
type: string
description: The validFrom value.
validUntil:
type: object
description: Results of 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.
PatStLouis marked this conversation as resolved.
Show resolved Hide resolved
input:
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: boolean
description: Results of validating the credentialSchema object.
details:
type: string
description: Optional information to provide in the response.
PatStLouis marked this conversation as resolved.
Show resolved Hide resolved
input:
type: object
description: The credentialSchema object.
credentialStatus:
type: array
description: Results from validating the credentialStatus objects if any.
items:
type: object
description: Results of validating a credentialStatus object.
properties:
value:
type: integer
description: Value of the statusEntry Bit.
valid:
type: boolean
description: Results of validating the credentialStatus object.
details:
type: string
description: Optional information to provide in the response.
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: boolean
description: Results of validating the proof object.
details:
type: string
PatStLouis marked this conversation as resolved.
Show resolved Hide resolved
description: Optional information to provide in the response.
input:
type: object
description: The proof object.
example: {
"verified": True,
"credential": {},
"warnings": [],
"errors": [],
PatStLouis marked this conversation as resolved.
Show resolved Hide resolved
"results": {
"validFrom": [],
"validUntil": [],
"credentialSchema": [],
"credentialStatus": [],
"proof": []
}
PatStLouis marked this conversation as resolved.
Show resolved Hide resolved
}
Loading