Skip to content

Add support for credentialId #361

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

Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion components/Credential.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ components:
type: string
"id":
type: string
description: The ID of the credential.
description: The ID of the credential. This property MAY be empty. The issuer SHOULD NOT auto-generate the id property since the client wanted to issue a VC without the id.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: The ID of the credential. This property MAY be empty. The issuer SHOULD NOT auto-generate the id property since the client wanted to issue a VC without the id.
description: The ID of the credential. This property MAY be empty. The issuer SHOULD NOT auto-generate the id property since the client wanted to issue a VC without an ID.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outdated - see newest version of Credential.yml.

"type":
type: array
description: The JSON-LD type of the credential.
Expand Down
3 changes: 3 additions & 0 deletions components/IssueCredentialOptions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ components:
type:
type: string
description: The type of credential status to issue the credential with
credentialId:
type: string
description: A URI that can be used to identify the credential, that will be used in APIs to refer to the issued verifiable credential. If not provided, the value will be auto-populated from credential.id. If credentialId is not provided and credential.id is not provided, it is not possible to refer to this credential once issued or deal with duplicate errors. credentialId SHOULD NOT be set if the credential.id property is set. This property should not be used as a replacement for credential.id, rather as a means of identifying a credential without the id property set. The issuer SHOULD NOT auto-generate a credentialId if one is not supplied because doing so could create a partitioning error if the result is never received by the client.
example:
{
"created": "2020-04-02T18:48:36Z",
Expand Down
27 changes: 27 additions & 0 deletions components/IssueCredentialSuccess.yml
Original file line number Diff line number Diff line change
@@ -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:
IssueCredentialSuccess:
type: object
description: The format returned from a successful issue request.
properties:
verifiableCredential:
type: object
description: A JSON-LD Verifiable Credential with a proof.
allOf:
- $ref: "./Credential.yml#/components/schemas/Credential"
- type: object
properties:
proof:
$ref: "./DataIntegrityProof.yml#/components/schemas/DataIntegrityProof"
4 changes: 2 additions & 2 deletions holder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ paths:
- networkAuth: []
- oAuth2: []
- zCap: []
summary: Gets a credential or verifiable credential by ID
summary: Gets a credential or verifiable credential by ID. To get a credential that does not have credential.id set but has an associated credentialId value, pass credentialId instead.
operationId: getCredential
parameters:
- $ref: "./components/parameters/path/ObjectId.yml"
Expand Down Expand Up @@ -55,7 +55,7 @@ paths:
- networkAuth: []
- oAuth2: []
- zCap: []
summary: Deletes a credential or verifiable credential by ID
summary: Deletes a credential or verifiable credential by ID. To delete a credential that does not have credential.id set but has an associated credentialId value, pass credentialId instead.
operationId: deleteCredential
parameters:
- $ref: "./components/parameters/path/ObjectId.yml"
Expand Down
4 changes: 2 additions & 2 deletions issuer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ components:
IssueCredentialResponse:
type: object
properties:
verifiableCredential:
$ref: "./components/VerifiableCredential.yml#/components/schemas/VerifiableCredential"
IssueCredentialSuccess:
$ref: "./components/IssueCredentialSuccess.yml#/components/schemas/IssueCredentialSuccess"
UpdateCredentialStatus:
type: object
description: Request for updating the status of an issued credential.
Expand Down