Created
February 9, 2023 09:08
-
-
Save tejash-jl/bef28169b671e89be5150a8559315196 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.1 | |
info: | |
title: Sunbird RC VC | |
description: Sunbird RC VC | |
termsOfService: https://sunbirdrc.dev/ | |
contact: | |
email: sunbird@example.com | |
license: | |
name: Apache 2.0 | |
url: https://www.apache.org/licenses/LICENSE-2.0.html | |
version: 1.0.0 | |
servers: | |
- url: https://sunbirdrc.dev/api/v1 | |
security: | |
- Authorization: [] | |
tags: | |
- name: Credential Schemas | |
- name: Rendering Templates | |
- name: Issuing | |
description: Issuing api | |
- name: Verifying | |
description: The following APIs are defined for verifying a Verifiable Credential | |
paths: | |
/credential-schema: | |
post: | |
tags: | |
- Credential Schemas | |
summary: Create credential schema | |
operationId: createCredentialSchema | |
requestBody: | |
description: Payload | |
content: | |
'appliation/json': | |
schema: | |
$ref: '#/components/schemas/credentialSchemaRequest' | |
required: true | |
responses: | |
201: | |
description: Credential Schema successfully created! | |
content: | |
'application/json': | |
schema: | |
$ref: '#/components/schemas/credentialSchemaResponse' | |
400: | |
description: Invalid Input | |
content: {} | |
500: | |
description: error | |
content: {} | |
get: | |
tags: | |
- Credential Schemas | |
summary: Get credential schema by tags | |
operationId: getCredentialSchemas | |
parameters: | |
- in: query | |
name: tags | |
schema: | |
type: string | |
example: tag1,tag2 | |
responses: | |
201: | |
description: Credential Schemas | |
content: | |
'application/json': | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/credentialSchemaResponse' | |
400: | |
description: Invalid Input | |
content: {} | |
500: | |
description: error | |
content: {} | |
/credential-schema/{id}: | |
get: | |
tags: | |
- Credential Schemas | |
summary: Get credential schema by id | |
operationId: getCredentialSchema | |
parameters: | |
- name: id | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
200: | |
description: Response | |
content: | |
'application/json': | |
schema: | |
$ref: '#/components/schemas/credentialSchemaResponse' | |
400: | |
description: Invalid Input | |
content: {} | |
500: | |
description: error | |
content: {} | |
put: | |
tags: | |
- Credential Schemas | |
summary: Update credential schema by id | |
description: Create a new version of credential schema | |
operationId: updateCredentialSchema | |
parameters: | |
- name: id | |
in: path | |
required: true | |
schema: | |
type: string | |
requestBody: | |
description: Payload | |
content: | |
'appliation/json': | |
schema: | |
$ref: '#/components/schemas/credentialSchemaRequest' | |
required: true | |
responses: | |
200: | |
description: Credential Schema successfully updated! | |
content: | |
'application/json': | |
schema: | |
$ref: '#/components/schemas/credentialSchemaResponse' | |
400: | |
description: Invalid Input | |
content: {} | |
500: | |
description: error | |
content: {} | |
/template: | |
post: | |
tags: | |
- Rendering Templates | |
summary: Create redenring templates | |
operationId: createRenderingTemplates | |
requestBody: | |
description: Payload | |
content: | |
'appliation/json': | |
schema: | |
$ref: '#/components/schemas/renderingTemplateRequest' | |
required: true | |
responses: | |
201: | |
description: Rendering template successfully created! | |
content: | |
'application/json': | |
schema: | |
$ref: '#/components/schemas/renderingTemplateResponse' | |
400: | |
description: Invalid Input | |
content: {} | |
500: | |
description: error | |
content: {} | |
get: | |
tags: | |
- Rendering Templates | |
summary: Get rendering templates by schema id | |
operationId: getRenderingTemplatesBySchemaId | |
parameters: | |
- name: schemaId | |
in: query | |
required: true | |
schema: | |
type: string | |
responses: | |
200: | |
description: Response | |
content: | |
'application/json': | |
schema: | |
$ref: '#/components/schemas/renderingTemplateResponse' | |
400: | |
description: Invalid Input | |
content: {} | |
500: | |
description: error | |
content: {} | |
/template/{id}: | |
get: | |
tags: | |
- Rendering Templates | |
summary: Get rendering templates by id | |
operationId: getRenderingTemplates | |
parameters: | |
- name: id | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
200: | |
description: Response | |
content: | |
'application/json': | |
schema: | |
$ref: '#/components/schemas/renderingTemplateResponse' | |
400: | |
description: Invalid Input | |
content: {} | |
500: | |
description: error | |
content: {} | |
put: | |
tags: | |
- Rendering Templates | |
summary: Update rendering templates by id | |
description: Create a new version of template | |
operationId: updateRenderingTemplates | |
parameters: | |
- name: id | |
in: path | |
required: true | |
schema: | |
type: string | |
requestBody: | |
description: Payload | |
content: | |
'appliation/json': | |
schema: | |
$ref: '#/components/schemas/renderingTemplateRequest' | |
required: true | |
responses: | |
200: | |
description: Rendering template successfully updated! | |
content: | |
'application/json': | |
schema: | |
$ref: '#/components/schemas/renderingTemplateResponse' | |
400: | |
description: Invalid Input | |
content: {} | |
500: | |
description: error | |
content: {} | |
delete: | |
tags: | |
- Rendering Templates | |
summary: Delete rendering templates by id | |
operationId: deleteRenderingTemplates | |
parameters: | |
- name: id | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
200: | |
description: Credential Schema successfully deleted! | |
400: | |
description: Invalid Input | |
content: {} | |
500: | |
description: error | |
content: {} | |
/credentials/issue: | |
post: | |
tags: | |
- Issuing | |
summary: Credential issue API | |
operationId: credentialIssue | |
requestBody: | |
description: Credential payload | |
content: | |
'appliation/json': | |
schema: | |
$ref: '#/components/schemas/credentialRequest' | |
required: true | |
responses: | |
201: | |
description: Credential successfully issued! | |
content: | |
'application/json': | |
schema: | |
$ref: '#/components/schemas/credentialResponse' | |
400: | |
description: Invalid Input | |
content: {} | |
500: | |
description: error | |
content: {} | |
x-codegen-request-body-name: body | |
/credentials/{id}: | |
get: | |
tags: | |
- Issuing | |
summary: Get credentials by id | |
operationId: getCredentialsById | |
parameters: | |
- name: id | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: templateId | |
in: header | |
required: false | |
schema: | |
type: string | |
- name: Accept | |
in: header | |
required: true | |
schema: | |
type: string | |
enum: | |
- application/json | |
- application/vc+ld+json | |
- text/html | |
- image/svg+xml | |
- text/plain | |
- image/jpeg | |
responses: | |
200: | |
description: OK | |
content: | |
'appliation/json': | |
schema: | |
$ref: '#/components/schemas/verifiableCredentialType' | |
401: | |
description: Not Authorized | |
content: {} | |
404: | |
description: Not Found | |
content: {} | |
500: | |
description: Error | |
content: {} | |
/credentials/search: | |
post: | |
tags: | |
- Issuing | |
summary: Search credentials by issuer and subject | |
operationId: searchCredentials | |
requestBody: | |
description: Search payload | |
content: | |
'appliation/json': | |
schema: | |
type: object | |
properties: | |
issuer: | |
type: object | |
subject: | |
type: object | |
required: true | |
responses: | |
200: | |
description: OK | |
content: | |
'appliation/json': | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/verifiableCredentialType' | |
401: | |
description: Not Authorized | |
content: {} | |
404: | |
description: Not Found | |
content: {} | |
500: | |
description: Error | |
content: {} | |
/credentials/verify: | |
post: | |
tags: | |
- Verifying | |
summary: Verifies a verifiableCredential and returns a verificationResult in | |
the response body. | |
description: Verifies a verifiableCredential and returns a verificationResult | |
in the response body. | |
requestBody: | |
description: Credential payload | |
content: | |
'appliation/json': | |
schema: | |
$ref: '#/components/schemas/verifyRequest' | |
required: true | |
responses: | |
200: | |
description: OK | |
content: | |
'appliation/json': | |
schema: | |
$ref: '#/components/schemas/verifyResponse' | |
components: | |
schemas: | |
renderingTemplateResponse: | |
allOf: | |
- $ref: '#/components/schemas/renderingTemplateRequest' | |
- type: object | |
properties: | |
templateId: | |
type: string | |
renderingTemplateRequest: | |
type: object | |
properties: | |
template: | |
type: string | |
type: | |
type: string | |
enum: | |
- Handlebar | |
schema: | |
type: string | |
example: schemaID | |
credentialSchemaRequest: | |
type: object | |
properties: | |
name: | |
type: string | |
schema: | |
type: object | |
example: '{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Email","type":"object","properties":{"emailAddress":{"type":"string","format":"email"}},"required":["emailAddress"],"additionalProperties":false}' | |
tags: | |
type: array | |
items: | |
type: string | |
credentialSchemaResponse: | |
type: object | |
properties: | |
type: | |
type: string | |
id: | |
type: string | |
pattern: "^\\d+\\.\\d+$" | |
example: "did:example:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1" | |
version: | |
type: string | |
name: | |
type: string | |
author: | |
type: string | |
authored: | |
type: string | |
schema: | |
type: object | |
example: '{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Email","type":"object","properties":{"emailAddress":{"type":"string","format":"email"}},"required":["emailAddress"],"additionalProperties":false}' | |
proof: | |
type: object | |
tags: | |
type: array | |
items: | |
type: string | |
verifyResponse: | |
type: object | |
properties: | |
checks: | |
type: array | |
items: | |
type: string | |
warnings: | |
type: array | |
items: | |
type: string | |
errors: | |
type: array | |
items: | |
type: string | |
verifyRequest: | |
type: object | |
properties: | |
verifiableCredential: | |
$ref: '#/components/schemas/verifiableCredentialType' | |
options: | |
type: object | |
properties: | |
challenge: | |
type: string | |
domain: | |
type: string | |
credentialUpdateRequest: | |
type: object | |
properties: | |
credentialId: | |
type: string | |
credentialStatus: | |
type: array | |
items: | |
type: object | |
properties: | |
type: | |
type: string | |
status: | |
type: string | |
credentialResponse: | |
type: object | |
properties: | |
verifiableCredential: | |
$ref: '#/components/schemas/verifiableCredentialType' | |
credentialRequest: | |
type: object | |
properties: | |
credential: | |
$ref: '#/components/schemas/verifiableCredentialType' | |
options: | |
$ref: '#/components/schemas/credentialOptions' | |
credentialSchema: | |
type: string | |
credentialOptions: | |
type: object | |
properties: | |
created: | |
type: string | |
challenge: | |
type: string | |
domain: | |
type: string | |
credentialStatus: | |
type: object | |
properties: | |
type: | |
type: string | |
verifiableCredentialType: | |
type: object | |
properties: | |
context: | |
type: array | |
items: | |
type: string | |
id: | |
type: string | |
type: | |
type: string | |
issuer: | |
type: object | |
properties: {} | |
issuanceDate: | |
type: string | |
format: date-time | |
expirationDate: | |
type: string | |
format: date-time | |
credentialSubject: | |
type: object | |
properties: {} | |
proof: | |
type: object | |
properties: | |
type: | |
type: string | |
created: | |
type: string | |
challenge: | |
type: string | |
domain: | |
type: string | |
nonce: | |
type: string | |
verificationMethod: | |
type: string | |
proofPurpose: | |
type: string | |
jws: | |
type: string | |
proofValue: | |
type: string | |
securitySchemes: | |
Authorization: | |
type: apiKey | |
name: Token | |
in: header |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment