From 7190ed17880dcd6aeba46a79211c5b6dba1eae08 Mon Sep 17 00:00:00 2001 From: andreibogus Date: Mon, 22 Apr 2024 09:28:21 +0200 Subject: [PATCH 1/5] fix: adjust api docs for 'api/token' endpoint --- .../apidocs/SecureTokenControllerApiDoc.java | 8 ++++++-- .../controller/SecureTokenController.java | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/eclipse/tractusx/managedidentitywallets/apidocs/SecureTokenControllerApiDoc.java b/src/main/java/org/eclipse/tractusx/managedidentitywallets/apidocs/SecureTokenControllerApiDoc.java index 587a8352c..6219ce535 100644 --- a/src/main/java/org/eclipse/tractusx/managedidentitywallets/apidocs/SecureTokenControllerApiDoc.java +++ b/src/main/java/org/eclipse/tractusx/managedidentitywallets/apidocs/SecureTokenControllerApiDoc.java @@ -130,7 +130,11 @@ public class SecureTokenControllerApiDoc { }) }) }) - @Operation(summary = "Create and Sign Access Tokens", description = "The endpoint for creating and signing access tokens which are to be used during a verifiable presentation flow.") - public @interface PostSecureTokenDoc { + @Operation(summary = "Create and Sign Access Tokens", description = "The endpoint for creating and signing access tokens which are to be used during a verifiable presentation flow.", method = "tokenJson") + public @interface PostSecureTokenDocJson { + } + + @Operation(summary = "Create and Sign Access Tokens", description = "The endpoint for creating and signing access tokens which are to be used during a verifiable presentation flow.", method = "tokenFormUrlencoded") + public @interface PostSecureTokenDocFormUrlencoded { } } diff --git a/src/main/java/org/eclipse/tractusx/managedidentitywallets/controller/SecureTokenController.java b/src/main/java/org/eclipse/tractusx/managedidentitywallets/controller/SecureTokenController.java index 1027d6f48..42ca8b94e 100644 --- a/src/main/java/org/eclipse/tractusx/managedidentitywallets/controller/SecureTokenController.java +++ b/src/main/java/org/eclipse/tractusx/managedidentitywallets/controller/SecureTokenController.java @@ -82,8 +82,8 @@ void initBinder(WebDataBinder webDataBinder) { @SneakyThrows @PostMapping(path = "/api/token", consumes = { MediaType.APPLICATION_JSON_VALUE }, produces = { MediaType.APPLICATION_JSON_VALUE }) - @SecureTokenControllerApiDoc.PostSecureTokenDoc - public ResponseEntity token( + @SecureTokenControllerApiDoc.PostSecureTokenDocJson + public ResponseEntity tokenJson( @Valid @RequestBody SecureTokenRequest secureTokenRequest ) { return processTokenRequest(secureTokenRequest); @@ -91,8 +91,8 @@ public ResponseEntity token( @SneakyThrows @PostMapping(path = "/api/token", consumes = { MediaType.APPLICATION_FORM_URLENCODED_VALUE }, produces = { MediaType.APPLICATION_JSON_VALUE }) - @SecureTokenControllerApiDoc.PostSecureTokenDoc - public ResponseEntity token( + @SecureTokenControllerApiDoc.PostSecureTokenDocFormUrlencoded + public ResponseEntity tokenFormUrlencoded( @Valid @RequestBody MultiValueMap requestParameters ) { final SecureTokenRequest secureTokenRequest = getSecureTokenRequest(requestParameters); From ff2012c0f7543b1446657d8f5bfc1a05ad8777f0 Mon Sep 17 00:00:00 2001 From: aleksandra-bel Date: Wed, 24 Apr 2024 10:55:19 +0200 Subject: [PATCH 2/5] chore: regenerate openapi_v001.json --- docs/openapi_v001.json | 6335 ++++++++++++++++++++++++---------------- 1 file changed, 3890 insertions(+), 2445 deletions(-) diff --git a/docs/openapi_v001.json b/docs/openapi_v001.json index 857db03b7..2eecd955f 100644 --- a/docs/openapi_v001.json +++ b/docs/openapi_v001.json @@ -1,2536 +1,3981 @@ { - "openapi": "3.0.3", - "info": { - "title": "Managed Identity Wallets API", - "version": "0.0.1", - "description": "Managed Identity Wallets API", - "termsOfService": "https://www.eclipse.org/legal/termsofuse.php", - "contact": { - "name": "Eclipse Tractus-X", - "url": "https://projects.eclipse.org/projects/automotive.tractusx", - "email": "tractusx-dev@eclipse.org" - }, - "license": { - "name": "Apache 2.0", - "url": "https://github.com/eclipse-tractusx/managed-identity-wallets/blob/develop/LICENSE" - } + "openapi": "3.0.1", + "info": { + "title": "Managed Identity Wallets API", + "description": "Managed Identity Wallets API", + "termsOfService": "https://www.eclipse.org/legal/termsofuse.php", + "contact": { + "name": "Eclipse Tractus-X", + "url": "https://projects.eclipse.org/projects/automotive.tractusx", + "email": "tractusx-dev@eclipse.org" }, - "servers": [], - "paths": { - "/api/wallets": { - "get": { - "tags": [ - "Wallets" - ], - "summary": "List of wallets", - "description": "Permission: **view_wallets**\n\nRetrieve list of registered wallets", - "parameters": [], - "responses": { - "200": { - "description": "List of wallets", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/WalletDto" - }, - "type": "array", - "maxItems": 100 - } - } - } - }, - "403": { - "description": "The request could not be completed due to a forbidden access.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "401": { - "description": "The request could not be completed due to a failed authorization.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" + "license": { + "name": "Apache 2.0", + "url": "https://github.com/eclipse-tractusx/managed-identity-wallets/blob/develop/LICENSE" + }, + "version": "0.0.1" + }, + "servers": [ + { + "url": "http://localhost:8000", + "description": "Generated server url" + } + ], + "security": [ + { + "Authenticate using access_token": [] + }, + { + "sts_token": [] + } + ], + "paths": { + "/api/wallets": { + "get": { + "tags": [ + "Wallets" + ], + "summary": "List of wallets", + "description": "Permission: **view_wallets** \n\n Retrieve list of registered wallets", + "operationId": "getWallets", + "parameters": [ + { + "name": "pageNumber", + "in": "query", + "description": "Page number, Page number start with zero", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "name": "size", + "in": "query", + "description": "Number of records per page", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 2147483647 + } + }, + { + "name": "sortColumn", + "in": "query", + "description": "Sort column name", + "required": false, + "schema": { + "type": "string", + "default": "createdAt" + }, + "examples": { + "Creation date": { + "description": "Creation date", + "value": "createdAt" + }, + "Wallet BPN": { + "description": "Wallet BPN", + "value": "bpn" + }, + "Wallet did": { + "description": "Wallet did", + "value": "did" + }, + "Wallet name": { + "description": "Wallet name", + "value": "name" + } + } + }, + { + "name": "sortTpe", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "default": "desc" + }, + "examples": { + "Ascending order": { + "description": "Ascending order", + "value": "asc" + }, + "Descending order": { + "description": "Descending order", + "value": "desc" + } + } + } + ], + "responses": { + "200": { + "description": "Wallet list", + "content": { + "application/json": { + "examples": { + "Wallet list": { + "description": "Wallet list", + "value": { + "content": [ + { + "name": "companyA", + "did": "did:web:localhost:BPNL000000000001", + "bpn": "BPNL000000000001", + "algorithm": "ED25519", + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://w3c.github.io/vc-jws-2020/contexts/v1" + ], + "id": "did:web:localhost:BPNL000000000001", + "verificationMethod": [ + { + "controller": "did:web:localhost:BPNL000000000001", + "id": "did:web:localhost:BPNL000000000001#", + "publicKeyJwk": { + "crv": "Ed25519", + "kty": "OKP", + "x": "mhph0ZSVk7cDVmazbaaC3jBDpphW4eNygAK9gHPlMow" }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } + "type": "JsonWebKey2020" + } + ] + } + } + ], + "pageable": { + "sort": { + "empty": false, + "sorted": true, + "unsorted": false + }, + "offset": 0, + "pageNumber": 0, + "pageSize": 1, + "paged": true, + "unpaged": false + }, + "totalElements": 3, + "totalPages": 3, + "last": false, + "size": 1, + "number": 0, + "sort": { + "empty": false, + "sorted": true, + "unsorted": false + }, + "first": true, + "numberOfElements": 1, + "empty": false } - }, - "deprecated": false + } + } + } } - }, - "/api/wallet": { - "post": { - "tags": [ - "Wallets" - ], - "summary": "Create wallet", - "description": "Permission: **add_wallets**\n\nCreate a wallet and store it ", - "parameters": [], - "requestBody": { - "description": "wallet to create", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WalletCreateDto" - }, - "examples": { - "demo": { - "value": { - "bpn": "name", - "name": "bpn" - } - } - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Wallet was successfully created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WalletDto" - }, - "examples": { - "demo": { - "value": { - "name": "name", - "bpn": "bpn", - "did": "did", - "createdAt": "2023-02-13T15:06:06.539270", - "vcs": [] - } - } - } - } - } - }, - "400": { - "description": "The input does not comply to the syntax requirements", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "403": { - "description": "The request could not be completed due to a forbidden access.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "401": { - "description": "The request could not be completed due to a failed authorization.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } + }, + "400": { + "description": "The input does not comply to the syntax requirements", + "content": { + "application/json": { + "examples": { + "Response in case of invalid data provided": { + "description": "Response in case of invalid data provided", + "value": { + "type": "about:blank", + "title": "title", + "status": 400, + "detail": "details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689760833962, + "errors": {} + } } - }, - "deprecated": false + } + } + } + } + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden access" + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } } + } }, - "/api/wallet/{identifier}": { - "get": { - "tags": [ - "Wallets" - ], - "summary": "Retrieve wallet by identifier", - "description": "Permission: **view_wallets** OR **view_wallet** (The BPN of Wallet to retrieve must equal the BPN of caller)\n\nRetrieve single wallet by identifier, with or without its credentials", - "parameters": [ - { - "name": "identifier", - "in": "path", - "schema": { - "type": "string" - }, - "required": true, - "deprecated": false, - "examples": { - "did": { - "value": "did:example:0123" + "security": [ + { + "Authenticate using access_token": [] + } + ] + }, + "post": { + "tags": [ + "Wallets" + ], + "summary": "Create Wallet", + "description": "Permission: **add_wallets** (The BPN of the base wallet must equal BPN of caller)\n\n Create a wallet and store it", + "operationId": "createWallet", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWalletRequest" + }, + "examples": { + "Create wallet with BPN": { + "description": "Create wallet with BPN", + "value": { + "businessPartnerNumber": "BPNL000000000001", + "companyName": "companyA", + "didUrl": "portal.com:BPNL000000000001" + } + } + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "examples": { + "Success response": { + "description": "Success response", + "value": { + "name": "companyA", + "did": "did:web:localhost:BPNL000000000001", + "bpn": "BPNL000000000501", + "algorithm": "ED25519", + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://w3c.github.io/vc-jws-2020/contexts/v1" + ], + "id": "did:web:localhost:BPNL000000000001", + "verificationMethod": [ + { + "controller": "did:web:localhost:BPNL000000000001", + "id": "did:web:localhost:BPNL000000000001#key-1", + "publicKeyJwk": { + "crv": "Ed25519", + "kty": "OKP", + "x": "0Ap6FsX5UuRBIoOzxWtcFA2ymnqXw0U08Ino_mIuYM4" }, - "bpn": { - "value": "bpn123" - } - } - }, - { - "name": "withCredentials", - "in": "query", - "schema": { - "type": "boolean" - }, - "required": true, - "deprecated": false, - "examples": { - "withCredentials": { - "value": "false" - } - } + "type": "JsonWebKey2020" + }, + { + "controller": "did:web:localhost:BPNL000000000001", + "id": "did:web:localhost:BPNL000000000001#key-2", + "publicKeyJwk": { + "crv": "secp256k1", + "kty": "EC", + "x": "f9PkTOpsbcgKe_-s6bNCve3-aB1VZAFsCub8C5bhDn0", + "y": "xH1d7jCFavolGVZtaWcZZGP2nLuEsamDCotD56llxUk" + }, + "type": "JsonWebKey2020" + } + ] + } } - ], - "responses": { - "200": { - "description": "The wallet", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WalletDto" - }, - "examples": { - "demo": { - "value": { - "name": "name", - "bpn": "bpn", - "did": "did", - "createdAt": "2023-02-13T15:06:06.539342", - "vcs": [] - } - } - } - } - } - }, - "400": { - "description": "The input does not comply to the syntax requirements", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "404": { - "description": "The required entity does not exists", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "403": { - "description": "The request could not be completed due to a forbidden access.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "401": { - "description": "The request could not be completed due to a failed authorization.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } + } + } + } + } + }, + "400": { + "description": "The input does not comply to the syntax requirements", + "content": { + "application/json": { + "examples": { + "Response in case of invalid data provided": { + "description": "Response in case of invalid data provided", + "value": { + "type": "about:blank", + "title": "Invalid data provided", + "status": 400, + "detail": "details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689760833962, + "errors": { + "filed": "filed error message" + } + } } - }, - "deprecated": false + } + } + } } + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden access" + }, + "409": { + "description": "The request could not be completed due to a conflict.", + "content": { + "application/json": { + "examples": { + "Wallet already exist": { + "description": "Wallet already exist", + "value": { + "type": "about:blank", + "title": "Wallet is already exists for bpn BPNL000000000001", + "status": 409, + "detail": "Wallet is already exists for bpn BPNL000000000001", + "instance": "/api/wallets", + "properties": { + "timestamp": 1689762639948 + } + } + } + } + } + } + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + } }, - "/api/wallet/{identifier}/credentials": { - "post": { - "tags": [ - "Wallets" + "security": [ + { + "Authenticate using access_token": [] + } + ] + } + }, + "/api/wallets/{identifier}/credentials": { + "post": { + "tags": [ + "Wallets" + ], + "summary": "Store Verifiable Credential", + "description": "Permission: **update_wallets** OR **update_wallet** (The BPN of wallet to extract credentials from must equal BPN of caller) \n\n Store a verifiable credential in the wallet of the given identifier", + "operationId": "storeCredential", + "parameters": [ + { + "name": "identifier", + "in": "path", + "description": "Did or BPN", + "required": true, + "schema": { + "type": "string" + }, + "examples": { + "bpn": { + "description": "bpn", + "value": "BPNL000000000000" + }, + "did": { + "description": "did", + "value": "did:web:localhost:BPNL000000000000" + } + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "example": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#" ], - "summary": "Store Verifiable Credential", - "description": "Permission: **update_wallets** OR **update_wallet** (The BPN of wallet to extract credentials from must equal BPN of caller)\n\nStore a verifiable credential in the wallet of the given identifier", - "parameters": [ - { - "name": "identifier", - "in": "path", - "schema": { - "type": "string" - }, - "required": true, - "deprecated": false, - "examples": { - "did": { - "value": "did:exp:123" - }, - "bpn": { - "value": "BPN123" - } - } - } + "id": "did:web:localhost.in#123456789", + "type": [ + "VerifiableCredential", + "LegalParticipant" ], - "requestBody": { - "description": "The verifiable credential to be stored", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IssuedVerifiableCredentialRequestDto" - }, - "examples": { - "demo": { - "value": { - "id": "http://example.edu/credentials/3732", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "type": [ - "University-Degree-Credential, VerifiableCredential" - ], - "issuer": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "issuanceDate": "2019-06-16T18:56:59Z", - "expirationDate": "2019-06-17T18:56:59Z", - "credentialSubject": { - "college": "Test-University" - }, - "credentialStatus": { - "id": "http://example.edu/api/credentials/status/test#3", - "type": "StatusList2021Entry", - "statusPurpose": "revocation", - "statusListIndex": "3", - "statusListCredential": "http://example.edu/api/credentials/status/test" - }, - "proof": { - "type": "Ed25519Signature2018", - "created": "2021-11-17T22:20:27Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:example:76e12ec712ebc6f1c221ebfeb1f#key-1", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" - } - } - } - } - } - }, - "required": true + "issuer": "did:web:localhost.in", + "issuanceDate": "2023-05-04T07:36:03.633Z", + "credentialSubject": { + "id": "https://localhost/.well-known/participant.json", + "type": "gx:LegalParticipant", + "gx:legalName": "Sample Company", + "gx:legalRegistrationNumber": { + "gx:taxID": "113123123" + }, + "gx:headquarterAddress": { + "gx:countrySubdivisionCode": "BE-BRU" + }, + "gx:legalAddress": { + "gx:countrySubdivisionCode": "BE-BRU" + }, + "gx-terms-and-conditions:gaiaxTermsAndConditions": "70c1d713215f95191a11d38fe2341faed27d19e083917bc8732ca4fea4976700" }, - "responses": { - "201": { - "description": "Success message", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessResponse" - }, - "examples": { - "demo": { - "value": { - "message": "Credential with id http://example.edu/credentials/3732has been successfully stored" - } - } - } - } - } - }, - "422": { - "description": "The input can not be processed due to semantic mismatches", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "404": { - "description": "The required entity does not exists", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "403": { - "description": "The request could not be completed due to a forbidden access.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "401": { - "description": "The request could not be completed due to a failed authorization.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } + "proof": { + "type": "JsonWebSignature2020", + "created": "2023-05-04T07:36:04.079Z", + "proofPurpose": "assertionMethod", + "verificationMethod": "did:web:localhost", + "jws": "eyJhbGciOiJQUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..iHki8WC3nPfcSRkC_AV4tXh0ikfT7BLPTGc_0ecI8zontTmJLqwcpPfAt0PFsoo3SkZgc6j636z55jj5tagBc-OKoiDu7diWryNAnL9ASsmWJyrPhOKVARs6x6PxVaTFBuyCfAHZeipxmkcYfNB_jooIXO2HuRcL2odhsQHELkGc5IDD-aBMWyNpfVAaYQ-cCzvDflZQlsowziUKfMkBfwpwgMdXFIgKWYdDIRvzA-U-XiC11-6QV7tPeKsMguEU0F5bh8cCEm2rooqXtENcsM_7cqFdQoOyblJyM-agoz2LUTj9QIdn9_gnNkGN-2U7_qBJWmHkK1Hm_mHqcNeeQw" + } + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Success Response", + "content": { + "application/json": { + "examples": { + "Success Response": { + "description": "Success Response", + "value": { + "message": "Credential with id did:web:localhost#123456789 has been successfully stored" } + } + } + } + } + }, + "400": { + "description": "The input does not comply to the syntax requirements", + "content": { + "application/json": { + "examples": { + "Response in case of invalid data provided": { + "description": "Response in case of invalid data provided", + "value": { + "type": "about:blank", + "title": "title", + "status": 400, + "detail": "details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689760833962, + "errors": {} + } + } + } + } + } + } + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden access" + }, + "404": { + "description": "Wallet not found with provided identifier", + "content": { + "application/json": { + "examples": { + "Wallet not found with provided identifier": { + "description": "Wallet not found with provided identifier", + "value": { + "type": "about:blank", + "title": "Wallet not found for identifier did:web:localhost:BPNL000000044001", + "status": 404, + "detail": "Wallet not found for identifier did:web:localhost:BPNL000000044001", + "instance": "/api/wallets/did%3Aweb%3Alocalhost%3ABPNL0000000/credentials", + "properties": { + "timestamp": 1689765541959 + } + } + } + } + } + } + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + } + }, + "security": [ + { + "Authenticate using access_token": [] + } + ] + } + }, + "/api/token": { + "post": { + "tags": [ + "STS" + ], + "summary": "Create and Sign Access Tokens", + "description": "The endpoint for creating and signing access tokens which are to be used during a verifiable presentation flow.", + "operationId": "token_1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecureTokenRequest" + }, + "examples": { + "Request Secure Token using Scopes": { + "description": "Request Secure Token using Scopes", + "value": { + "audience": "BPNL000000000009", + "client_id": "your_client_id", + "client_secret": "your_client_secret", + "grant_type": "client_credentials", + "bearer_access_scope": "org.eclipse.tractusx.vc.type:ValidCredentialType:read" + } }, - "deprecated": false + "Request Secure Token using Access Token": { + "description": "Request Secure Token using Access Token", + "value": { + "audience": "BPNL000000000009", + "client_id": "your_client_id", + "client_secret": "your_client_secret", + "grant_type": "client_credentials", + "access_token": "a_jwt_token" + } + } + } } + }, + "required": true }, - "/api/didDocuments/{identifier}": { - "get": { - "tags": [ - "DIDDocument" - ], - "summary": "Resolve DID Document", - "description": "Resolve the DID document for a given DID or BPN", - "parameters": [ - { - "name": "identifier", - "in": "path", - "schema": { - "type": "string" - }, - "required": true, - "deprecated": false, - "examples": { - "did": { - "value": "did:exp:123" - }, - "bpn": { - "value": "BPN123" - } - } + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "examples": { + "Success response": { + "description": "Success response", + "value": { + "token": "a_jwt_token", + "expiresAt": 1706888709315 } - ], - "responses": { - "200": { - "description": "The resolved DID Document", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DidDocumentDto" - }, - "examples": { - "demo": { - "value": { - "id": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "@context": [ - "https://www.w3.org/ns/did/v1" - ], - "controller": [ - "123", - "1231" - ], - "verificationMethod": [ - { - "id": "did:example:76e12ec712ebc6f1c221ebfeb1f#key-1", - "type": "Ed25519VerificationKey2018", - "controller": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "publicKeyBase58": "FyfKP2HvTKqDZQzvyL38yXH7bExmwofxHf2NR5BrcGf1" - } - ], - "service": [ - { - "id": "did:example:123#edv", - "type": "ServiceEndpointProxyService", - "serviceEndpoint": "https://myservice.com/myendpoint" - } - ] - } - } - } - } - } - }, - "404": { - "description": "The required entity does not exists", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "400": { - "description": "The input does not comply to the syntax requirements", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "examples": { + "Unknown BPN": { + "description": "Unknown BPN", + "value": { + "error": "UnknownBusinessPartnerNumber", + "errorDescription": "The provided BPN 'BPNL000000000001' is unknown" } - }, - "deprecated": false + }, + "Wrong Grant Type": { + "description": "Wrong Grant Type", + "value": { + "error": "UnsupportedGrantTypeException", + "errorDescription": "The provided 'grant_type' is not valid. Use 'client_credentials'." + } + }, + "Invalid idp Token Response": { + "description": "Invalid idp Token Response", + "value": { + "error": "InvalidIdpTokenResponse", + "errorDescription": "The idp response cannot be null. Possible causes for this are: the 'clientId' is invalid, or the 'client' is not enabled." + } + }, + "Invalid Secure Token Request": { + "description": "Invalid Secure Token Request", + "value": { + "error": "InvalidSecureTokenRequest", + "errorDescription": "The provided data could not be used to create and sign a token." + } + } + } + } + } + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } } + } }, - "/api/credentials": { - "get": { - "tags": [ - "VerifiableCredentials" - ], - "summary": "Query Verifiable Credentials", - "description": "Permission: **view_wallets** OR **view_wallet** (The BPN of holderIdentifier must equal BPN of caller)\n\nSearch verifiable credentials with filter criteria", - "parameters": [ - { - "name": "holderIdentifier", - "in": "query", - "schema": { - "type": "string" - }, - "required": false, - "deprecated": false, - "examples": { - "holderIdentifierDid": { - "value": "did:example:4567" - }, - "holderIdentifierBPN": { - "value": "BPN4567" - } - } - }, - { - "name": "credentialId", - "in": "query", - "schema": { - "type": "string" - }, - "required": false, - "deprecated": false, - "examples": { - "id": { - "value": "http://example.edu/credentials/3732" - } - } - }, - { - "name": "issuerIdentifier", - "in": "query", - "schema": { - "type": "string" - }, - "required": false, - "deprecated": false, - "examples": { - "issuerIdentifierDid": { - "value": "did:example:0123" - }, - "issuerIdentifierBPN": { - "value": "BPN0123" - } - } - }, - { - "name": "type", - "in": "query", - "schema": { - "items": { - "type": "string" - }, - "type": "array", - "maxItems": 100 - }, - "required": false, - "deprecated": false, - "examples": { - "type": { - "value": "['University-Degree-Credential']" - } - } + "security": [] + } + }, + "/api/presentations": { + "post": { + "tags": [ + "Verifiable Presentations - Generation" + ], + "summary": "Create Verifiable Presentation", + "description": "Permission: **update_wallets** OR **update_wallet** (The BPN of the issuer of the Verifiable Presentation must equal to BPN of caller) \n\n Create a verifiable presentation from a list of verifiable credentials, signed by the holder", + "operationId": "createPresentation", + "parameters": [ + { + "name": "audience", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "asJwt", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "example": { + "verifiableCredentials": [ + { + "id": "did:web:localhost:BPNL000000000000#f73e3631-ba87-4a03-bea3-b28700056879", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "type": [ + "VerifiableCredential", + "BpnCredential" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "expirationDate": "2024-12-31T18:30:00Z", + "issuanceDate": "2023-07-19T09:11:34Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BpnCredential" + } + ], + "proof": { + "created": "2023-07-19T09:11:39Z", + "jws": "eyJhbGciOiJFZERTQSJ9..fdn2qU85auOltdHDLdHI7sJVV1ZPdftpiXd_ndXN0dFgSDWiIrScdD03wtvKLq_H-shQWfh2RYeMmrlEzAhfDw", + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#" } - ], - "responses": { - "200": { - "description": "The list of verifiable credentials matching the query, empty if no match found", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/VerifiableCredentialDto" - }, - "type": "array", - "maxItems": 100 - } - } - } - }, - "403": { - "description": "The request could not be completed due to a forbidden access.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "401": { - "description": "The request could not be completed due to a failed authorization.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Verifiable Presentation", + "content": { + "application/json": { + "examples": { + "VP as Json-LD": { + "description": "VP as Json-LD", + "value": { + "vp": { + "@context": [ + "https://www.w3.org/2018/credentials/v1" + ], + "id": "did:web:localhost:BPNL000000000000#b2e69e47-95f3-48ff-af30-eaaab36431d5", + "type": [ + "VerifiablePresentation" + ], + "verifiableCredential": [ + { + "id": "did:web:localhost:BPNL000000000000#f73e3631-ba87-4a03-bea3-b28700056879", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "type": [ + "VerifiableCredential", + "BpnCredential" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "expirationDate": "2024-12-31T18:30:00Z", + "issuanceDate": "2023-07-19T09:11:34Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BpnCredential" + } + ], + "proof": { + "created": "2023-07-19T09:11:39Z", + "jws": "eyJhbGciOiJFZERTQSJ9..fdn2qU85auOltdHDLdHI7sJVV1ZPdftpiXd_ndXN0dFgSDWiIrScdD03wtvKLq_H-shQWfh2RYeMmrlEzAhfDw", + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#" + } + } + ] + } } - }, - "deprecated": false - }, - "post": { - "tags": [ - "VerifiableCredentials" - ], - "summary": "Issue Verifiable Credential", - "description": "Permission: **update_wallets** OR **update_wallet** (The BPN of the issuer of the Verifiable Credential must equal BPN of caller)\n\nIssue a verifiable credential with a given issuer DID", - "parameters": [], - "requestBody": { - "description": "The verifiable credential input data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifiableCredentialRequestDto" - }, - "examples": { - "demo": { - "value": { - "id": "http://example.edu/credentials/3732", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "type": [ - "University-Degree-Credential, VerifiableCredential" - ], - "issuerIdentifier": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "issuanceDate": "2019-06-16T18:56:59Z", - "expirationDate": "2019-06-17T18:56:59Z", - "credentialSubject": { - "college": "Test-University" - }, - "holderIdentifier": "did:example:492edf208", - "isRevocable": true - } - } - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "The created Verifiable Credential", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifiableCredentialDto" - }, - "examples": { - "demo": { - "value": { - "id": "http://example.edu/credentials/3732", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "type": [ - "University-Degree-Credential, VerifiableCredential" - ], - "issuer": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "issuanceDate": "2019-06-16T18:56:59Z", - "expirationDate": "2019-06-17T18:56:59Z", - "credentialSubject": { - "college": "Test-University" - }, - "credentialStatus": { - "id": "https://example.com/credentials/status/3#94567", - "type": "StatusList2021Entry", - "statusPurpose": "revocation", - "statusListIndex": "94567", - "statusListCredential": "https://example.com/credentials/status/3" - }, - "proof": { - "type": "Ed25519Signature2018", - "created": "2021-11-17T22:20:27Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:example:76e12ec712ebc6f1c221ebfeb1f#key-1", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" - } - } - } - } - } - } - }, - "422": { - "description": "The input can not be processed due to semantic mismatches", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "400": { - "description": "The input does not comply to the syntax requirements", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "403": { - "description": "The request could not be completed due to a forbidden access.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "401": { - "description": "The request could not be completed due to a failed authorization.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } + }, + "VP as JWT": { + "description": "VP as JWT", + "value": { + "vp": "eyJraWQiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIiwidHlwIjoiSldUIiwiYWxnIjoiRWREU0EifQ.eyJzdWIiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIiwiYXVkIjoic21hcnQiLCJpc3MiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIiwidnAiOnsiaWQiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIzM4ZTU2ZTg1LTNkODQtNGEyNS1iZjg1LWFiMjRlYzY4MmMwOSIsInR5cGUiOlsiVmVyaWZpYWJsZVByZXNlbnRhdGlvbiJdLCJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ2ZXJpZmlhYmxlQ3JlZGVudGlhbCI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSIsImh0dHBzOi8vY2F0ZW5heC1uZy5naXRodWIuaW8vcHJvZHVjdC1jb3JlLXNjaGVtYXMvYnVzaW5lc3NQYXJ0bmVyRGF0YS5qc29uIiwiaHR0cHM6Ly93M2lkLm9yZy9zZWN1cml0eS9zdWl0ZXMvandzLTIwMjAvdjEiXSwidHlwZSI6WyJWZXJpZmlhYmxlQ3JlZGVudGlhbCIsIkJwbkNyZWRlbnRpYWwiXSwiaWQiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwI2Y3M2UzNjMxLWJhODctNGEwMy1iZWEzLWIyODcwMDA1Njg3OSIsImlzc3VlciI6ImRpZDp3ZWI6bG9jYWxob3N0OkJQTkwwMDAwMDAwMDAwMDAiLCJpc3N1YW5jZURhdGUiOiIyMDIzLTA3LTE5VDA5OjExOjM0WiIsImV4cGlyYXRpb25EYXRlIjoiMjAyNC0xMi0zMVQxODozMDowMFoiLCJjcmVkZW50aWFsU3ViamVjdCI6eyJpZCI6ImRpZDp3ZWI6bG9jYWxob3N0OkJQTkwwMDAwMDAwMDAwMDAiLCJicG4iOiJCUE5MMDAwMDAwMDAwMDAwIiwidHlwZSI6IkJwbkNyZWRlbnRpYWwifSwicHJvb2YiOnsicHJvb2ZQdXJwb3NlIjoicHJvb2ZQdXJwb3NlIiwidHlwZSI6Ikpzb25XZWJTaWduYXR1cmUyMDIwIiwidmVyaWZpY2F0aW9uTWV0aG9kIjoiZGlkOndlYjpsb2NhbGhvc3Q6QlBOTDAwMDAwMDAwMDAwMCMiLCJjcmVhdGVkIjoiMjAyMy0wNy0xOVQwOToxMTozOVoiLCJqd3MiOiJleUpoYkdjaU9pSkZaRVJUUVNKOS4uZmRuMnFVODVhdU9sdGRIRExkSEk3c0pWVjFaUGRmdHBpWGRfbmRYTjBkRmdTRFdpSXJTY2REMDN3dHZLTHFfSC1zaFFXZmgyUlllTW1ybEV6QWhmRHcifX19LCJleHAiOjE2ODk4MzQ4MDUsImp0aSI6ImIwODYzOWZiLWQ5MWEtNGUwZS1iNmY4LTYzYjdhMzQ1ZTRhZiJ9.80x0AB-OauefdeZfx1cwhitdVKRvCRFeFzYwU73DL7y4w34vu6BdfHWLBGjkwELxkQEoFfiTPOqtuyqhtsyDBg" } - }, - "deprecated": false + } + } + } + } + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden access" + }, + "404": { + "description": "Wallet not found with provided identifier", + "content": { + "application/json": { + "examples": { + "Wallet not found with provided identifier": { + "description": "Wallet not found with provided identifier", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 404, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } } + } }, - "/api/credentials/issuer": { - "post": { - "tags": [ - "VerifiableCredentials" - ], - "summary": "Issue a Verifiable Credential with base wallet issuer", - "description": "Permission: **update_wallets** OR **update_wallet** (The BPN of base wallet must equal BPN of caller)\n\nIssue a verifiable credential by base wallet", - "parameters": [], - "requestBody": { - "description": "The verifiable credential input", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifiableCredentialRequestWithoutIssuerDto" - }, - "examples": { - "demo": { - "value": { - "id": "http://example.edu/credentials/3732", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "type": [ - "University-Degree-Credential, VerifiableCredential" - ], - "issuanceDate": "2019-06-16T18:56:59Z", - "expirationDate": "2019-06-17T18:56:59Z", - "credentialSubject": { - "college": "Test-University" - }, - "holderIdentifier": "did:example:492edf208" - } - } - } - } - }, - "required": true + "security": [ + { + "Authenticate using access_token": [] + } + ] + } + }, + "/api/presentations/validation": { + "post": { + "tags": [ + "Verifiable Presentations - Validation" + ], + "summary": "Validate Verifiable Presentation", + "description": "Permission: **view_wallets** OR **view_wallet** \n\n Validate Verifiable Presentation with all included credentials", + "operationId": "validatePresentation", + "parameters": [ + { + "name": "audience", + "in": "query", + "description": "Audience to validate in VP (Only supported in case of JWT formatted VP)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "asJwt", + "in": "query", + "description": "Pass true in case of VP is in JWT format", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "withCredentialExpiryDate", + "in": "query", + "description": "Check expiry of VC(Only supported in case of JWT formatted VP)", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "examples": { + "VP as JWT": { + "description": "VP as JWT", + "value": { + "vp": "eyJraWQiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIiwidHlwIjoiSldUIiwiYWxnIjoiRWREU0EifQ.eyJzdWIiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIiwiYXVkIjoic21hcnQiLCJpc3MiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIiwidnAiOnsiaWQiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIzZmZWRmYWRmLWYxNTItNGNjZS05MWQ1LWNjMjhhNzhlMTExMyIsInR5cGUiOlsiVmVyaWZpYWJsZVByZXNlbnRhdGlvbiJdLCJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ2ZXJpZmlhYmxlQ3JlZGVudGlhbCI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSIsImh0dHBzOi8vY2F0ZW5heC1uZy5naXRodWIuaW8vcHJvZHVjdC1jb3JlLXNjaGVtYXMvYnVzaW5lc3NQYXJ0bmVyRGF0YS5qc29uIiwiaHR0cHM6Ly93M2lkLm9yZy9zZWN1cml0eS9zdWl0ZXMvandzLTIwMjAvdjEiXSwidHlwZSI6WyJWZXJpZmlhYmxlQ3JlZGVudGlhbCIsIkJwbkNyZWRlbnRpYWwiXSwiaWQiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwI2Y3M2UzNjMxLWJhODctNGEwMy1iZWEzLWIyODcwMDA1Njg3OSIsImlzc3VlciI6ImRpZDp3ZWI6bG9jYWxob3N0OkJQTkwwMDAwMDAwMDAwMDAiLCJpc3N1YW5jZURhdGUiOiIyMDIzLTA3LTE5VDA5OjExOjM0WiIsImV4cGlyYXRpb25EYXRlIjoiMjAyNC0xMi0zMVQxODozMDowMFoiLCJjcmVkZW50aWFsU3ViamVjdCI6eyJpZCI6ImRpZDp3ZWI6bG9jYWxob3N0OkJQTkwwMDAwMDAwMDAwMDAiLCJicG4iOiJCUE5MMDAwMDAwMDAwMDAwIiwidHlwZSI6IkJwbkNyZWRlbnRpYWwifSwicHJvb2YiOnsicHJvb2ZQdXJwb3NlIjoicHJvb2ZQdXJwb3NlIiwidHlwZSI6Ikpzb25XZWJTaWduYXR1cmUyMDIwIiwidmVyaWZpY2F0aW9uTWV0aG9kIjoiZGlkOndlYjpsb2NhbGhvc3Q6QlBOTDAwMDAwMDAwMDAwMCMiLCJjcmVhdGVkIjoiMjAyMy0wNy0xOVQwOToxMTozOVoiLCJqd3MiOiJleUpoYkdjaU9pSkZaRVJUUVNKOS4uZmRuMnFVODVhdU9sdGRIRExkSEk3c0pWVjFaUGRmdHBpWGRfbmRYTjBkRmdTRFdpSXJTY2REMDN3dHZLTHFfSC1zaFFXZmgyUlllTW1ybEV6QWhmRHcifX19LCJleHAiOjE2ODk3NTg1NDQsImp0aSI6IjdlNWE4MzQ4LTgwZjUtNGIzMS1iMDNlLTBiOTJmNzc4ZTVjZiJ9.c7FS-CLwm3vxfO9847M5sqcVxv3QbwwSmSsFWcGif7MOesjt1pdnARlQ4pvHzgsFj1UqBEvHwZQvyYyPCQg_Cw" + } }, - "responses": { - "201": { - "description": "The created Verifiable Credential", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifiableCredentialDto" - }, - "examples": { - "demo": { - "value": { - "id": "http://example.edu/credentials/3732", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "type": [ - "University-Degree-Credential, VerifiableCredential" - ], - "issuer": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "issuanceDate": "2019-06-16T18:56:59Z", - "expirationDate": "2019-06-17T18:56:59Z", - "credentialSubject": { - "college": "Test-University" - }, - "credentialStatus": { - "id": "https://example.com/credentials/status/3#94567", - "type": "StatusList2021Entry", - "statusPurpose": "revocation", - "statusListIndex": "94567", - "statusListCredential": "https://example.com/credentials/status/3" - }, - "proof": { - "type": "Ed25519Signature2018", - "created": "2021-11-17T22:20:27Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:example:76e12ec712ebc6f1c221ebfeb1f#key-1", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" - } - } - } - } - } - } - }, - "422": { - "description": "The input can not be processed due to semantic mismatches", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "400": { - "description": "The input does not comply to the syntax requirements", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "403": { - "description": "The request could not be completed due to a forbidden access.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "401": { - "description": "The request could not be completed due to a failed authorization.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } + "VP as json-ld": { + "description": "VP as json-ld", + "value": { + "vp": { + "id": "b9d97cef-758d-4a7c-843d-86f17632b08a", + "type": [ + "VerifiablePresentation" + ], + "@context": [ + "https://www.w3.org/2018/credentials/v1" + ], + "verifiableCredential": [ + { + "id": "did:web:localhost:BPNL000000000000#f73e3631-ba87-4a03-bea3-b28700056879", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "type": [ + "VerifiableCredential", + "BpnCredential" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "expirationDate": "2024-12-31T18:30:00Z", + "issuanceDate": "2023-07-19T09:11:34Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BpnCredential" + } + ], + "proof": { + "created": "2023-07-19T09:11:39Z", + "jws": "eyJhbGciOiJFZERTQSJ9..fdn2qU85auOltdHDLdHI7sJVV1ZPdftpiXd_ndXN0dFgSDWiIrScdD03wtvKLq_H-shQWfh2RYeMmrlEzAhfDw", + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#" + } + } + ] } - }, - "deprecated": false + } + } + } } + }, + "required": true }, - "/api/credentials/issuer/membership": { - "post": { - "tags": [ - "VerifiableCredentials" - ], - "summary": "Issue a Membership Verifiable Credential with base wallet issuer", - "description": "Permission: **update_wallets** OR **update_wallet** (The BPN of base wallet must equal BPN of caller)\n\nIssue a verifiable credential by base wallet", - "parameters": [], - "requestBody": { - "description": "The bpn of the holders wallet", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateMembershipVCDto" - }, - "examples": { - "demo": { - "value": { - "bpn": "bpn" - } - } - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "The created Verifiable Credential", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifiableCredentialDto" - }, - "examples": { - "demo": { - "value": { - "id": "http://example.edu/credentials/3732", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "type": [ - "MembershipCredential, VerifiableCredential" - ], - "issuer": "did:web:miw.de/bpn0000000000", - "issuanceDate": "2021-06-16T18:56:59Z", - "credentialSubject": { - "type": "MembershipCredential", - "memberOf": "Catena-X", - "status": "Active", - "startTime": "2021-06-16T18:56:59Z" - }, - "holderIdentifier": "bpn", - "proof": { - "type": "Ed25519Signature2018", - "created": "2021-11-17T22:20:27Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:web:miw.de/bpn0000000000#key-0", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" - } - } - } - } - } - } - }, - "422": { - "description": "The input can not be processed due to semantic mismatches", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "400": { - "description": "The input does not comply to the syntax requirements", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "403": { - "description": "The request could not be completed due to a forbidden access.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "401": { - "description": "The request could not be completed due to a failed authorization.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } + "responses": { + "200": { + "description": "Verifiable presentation validate", + "content": { + "application/json": { + "examples": { + "VP as JWT": { + "description": "VP as JWT", + "value": { + "valid": true, + "validateJWTExpiryDate": true, + "validateAudience": true, + "vp": "eyJraWQiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIiwidHlwIjoiSldUIiwiYWxnIjoiRWREU0EifQ.eyJzdWIiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIiwiYXVkIjoic21hcnQiLCJpc3MiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIiwidnAiOnsiaWQiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIzM4ZTU2ZTg1LTNkODQtNGEyNS1iZjg1LWFiMjRlYzY4MmMwOSIsInR5cGUiOlsiVmVyaWZpYWJsZVByZXNlbnRhdGlvbiJdLCJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ2ZXJpZmlhYmxlQ3JlZGVudGlhbCI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSIsImh0dHBzOi8vY2F0ZW5heC1uZy5naXRodWIuaW8vcHJvZHVjdC1jb3JlLXNjaGVtYXMvYnVzaW5lc3NQYXJ0bmVyRGF0YS5qc29uIiwiaHR0cHM6Ly93M2lkLm9yZy9zZWN1cml0eS9zdWl0ZXMvandzLTIwMjAvdjEiXSwidHlwZSI6WyJWZXJpZmlhYmxlQ3JlZGVudGlhbCIsIkJwbkNyZWRlbnRpYWwiXSwiaWQiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwI2Y3M2UzNjMxLWJhODctNGEwMy1iZWEzLWIyODcwMDA1Njg3OSIsImlzc3VlciI6ImRpZDp3ZWI6bG9jYWxob3N0OkJQTkwwMDAwMDAwMDAwMDAiLCJpc3N1YW5jZURhdGUiOiIyMDIzLTA3LTE5VDA5OjExOjM0WiIsImV4cGlyYXRpb25EYXRlIjoiMjAyNC0xMi0zMVQxODozMDowMFoiLCJjcmVkZW50aWFsU3ViamVjdCI6eyJpZCI6ImRpZDp3ZWI6bG9jYWxob3N0OkJQTkwwMDAwMDAwMDAwMDAiLCJicG4iOiJCUE5MMDAwMDAwMDAwMDAwIiwidHlwZSI6IkJwbkNyZWRlbnRpYWwifSwicHJvb2YiOnsicHJvb2ZQdXJwb3NlIjoicHJvb2ZQdXJwb3NlIiwidHlwZSI6Ikpzb25XZWJTaWduYXR1cmUyMDIwIiwidmVyaWZpY2F0aW9uTWV0aG9kIjoiZGlkOndlYjpsb2NhbGhvc3Q6QlBOTDAwMDAwMDAwMDAwMCMiLCJjcmVhdGVkIjoiMjAyMy0wNy0xOVQwOToxMTozOVoiLCJqd3MiOiJleUpoYkdjaU9pSkZaRVJUUVNKOS4uZmRuMnFVODVhdU9sdGRIRExkSEk3c0pWVjFaUGRmdHBpWGRfbmRYTjBkRmdTRFdpSXJTY2REMDN3dHZLTHFfSC1zaFFXZmgyUlllTW1ybEV6QWhmRHcifX19LCJleHAiOjE2ODk4MzQ4MDUsImp0aSI6ImIwODYzOWZiLWQ5MWEtNGUwZS1iNmY4LTYzYjdhMzQ1ZTRhZiJ9.80x0AB-OauefdeZfx1cwhitdVKRvCRFeFzYwU73DL7y4w34vu6BdfHWLBGjkwELxkQEoFfiTPOqtuyqhtsyDBg", + "validateExpiryDate": true } - }, - "deprecated": false + } + } + } } + }, + "400": { + "description": "The input does not comply to the syntax requirements", + "content": { + "application/json": { + "examples": { + "Validation of VP in form of JSON-LD is not supported": { + "description": "Validation of VP in form of JSON-LD is not supported", + "value": { + "type": "about:blank", + "title": "Validation of VP in form of JSON-LD is not supported", + "status": 400, + "detail": "Validation of VP in form of JSON-LD is not supported", + "instance": "/api/presentations/validation", + "properties": { + "timestamp": 1689835085703 + } + } + }, + "Response in case of invalid data provided": { + "description": "Response in case of invalid data provided", + "value": { + "type": "about:blank", + "title": "Invalid data provided", + "status": 400, + "detail": "details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689760833962, + "errors": { + "filed": "filed error message" + } + } + } + } + } + } + } + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden access" + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + } }, - "/api/credentials/validation": { - "post": { - "tags": [ - "VerifiableCredentials" - ], - "summary": "Validate Verifiable Credential", - "description": "Permission: **view_wallets** OR **view_wallet**\n\nValidate Verifiable Credentials", - "parameters": [ - { - "name": "withDateValidation", - "in": "query", - "schema": { - "type": "boolean", - "default": false, - "nullable": true - }, - "required": false, - "deprecated": false, - "examples": { - "withDateValidation": { - "value": "false" - } - } - }, - { - "name": "withRevocationValidation", - "in": "query", - "schema": { - "type": "boolean", - "default": true + "security": [ + { + "Authenticate using access_token": [] + } + ] + } + }, + "/api/credentials": { + "get": { + "tags": [ + "Verifiable Credential - Holder" + ], + "summary": "Query Verifiable Credentials", + "description": "Permission: **view_wallets** OR **view_wallet** (The BPN of holderIdentifier must equal BPN of caller)\n\n Search verifiable credentials with filter criteria", + "operationId": "getCredentials", + "parameters": [ + { + "name": "credentialId", + "in": "query", + "description": "Credential Id", + "required": false, + "schema": { + "type": "string" + }, + "examples": { + "Credential Id": { + "description": "Credential Id", + "value": "did:web:localhost:BPNL000000000000#12528899-160a-48bd-ba15-f396c3959ae9" + } + } + }, + { + "name": "issuerIdentifier", + "in": "query", + "description": "Issuer identifier(did of BPN)", + "required": false, + "schema": { + "type": "string" + }, + "examples": { + "bpn": { + "description": "bpn", + "value": "BPNL000000000000" + }, + "did": { + "description": "did", + "value": "did:web:localhost:BPNL000000000000" + } + } + }, + { + "name": "type", + "in": "query", + "description": "Type of VC", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "SummaryCredential": { + "description": "SummaryCredential", + "value": "SummaryCredential" + }, + "BpnCredential": { + "description": "BpnCredential", + "value": "BpnCredential" + } + } + }, + { + "name": "sortColumn", + "in": "query", + "description": "Sort column name", + "required": false, + "schema": { + "type": "string", + "default": "createdAt" + }, + "examples": { + "creation date": { + "description": "creation date", + "value": "createdAt" + }, + "Self issued credential": { + "description": "Self issued credential", + "value": "selfIssued" + }, + "Stored credential": { + "description": "Stored credential", + "value": "stored" + }, + "Issuer did": { + "description": "Issuer did", + "value": "issuerDid" + }, + "Credential type": { + "description": "Credential type", + "value": "type" + }, + "Credential id": { + "description": "Credential id", + "value": "credentialId" + } + } + }, + { + "name": "sortTpe", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "default": "desc" + }, + "examples": { + "Ascending order": { + "description": "Ascending order", + "value": "asc" + }, + "Descending order": { + "description": "Descending order", + "value": "desc" + } + } + }, + { + "name": "pageNumber", + "in": "query", + "description": "Page number, Page number start with zero", + "required": false, + "schema": { + "maximum": 2147483647, + "minimum": 0, + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "name": "size", + "in": "query", + "description": "Number of records per page", + "required": false, + "schema": { + "maximum": 2147483647, + "minimum": 0, + "type": "integer", + "format": "int32", + "default": 2147483647 + } + }, + { + "name": "asJwt", + "in": "query", + "description": "Specifies whether the VC (Verifiable Credential) should be created as a JWT (JSON Web Token). If set to true, the VC will be generated in JWT formatSetting this parameter to false will result in the VC being created as JSON-LD Defaults to false if not specified.", + "required": false, + "schema": { + "type": "boolean", + "default": false + }, + "examples": { + "Create VC as JWT": { + "description": "Create VC as JWT", + "value": true + }, + "Do not create VC as JWT": { + "description": "Do not create VC as JWT", + "value": false + } + } + } + ], + "responses": { + "200": { + "description": "Credential list", + "content": { + "application/json": { + "examples": { + "Credential list": { + "description": "Credential list", + "value": { + "content": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/SummaryVC.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#954d43de-ebed-481d-9e35-e3bbb311b8f5", + "type": [ + "VerifiableCredential", + "SummaryCredential" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-14T11:05:48Z", + "expirationDate": "2023-09-30T18:30:00Z", + "credentialSubject": [ + { + "contractTemplate": "https://public.catena-x.org/contracts/", + "holderIdentifier": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "items": [ + "BpnCredential" + ], + "type": "SummaryCredential" + } + ], + "proof": { + "created": "2023-07-14T11:05:50Z", + "jws": "eyJhbGciOiJFZERTQSJ9..4xwFUCtP0xXVEo5_lXd90Vv-TWO2FijZut-HZ5cozAQseexj8EpTkK1erhFbf2Ua1kb8pi_H5At5HiPkTxSIAQ", + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#" + } + } + ], + "pageable": { + "sort": { + "empty": false, + "sorted": true, + "unsorted": false }, - "required": false, - "deprecated": false, - "examples": { - "withRevocationValidation": { - "value": "false" - } - } + "offset": 0, + "pageNumber": 0, + "pageSize": 2147483647, + "paged": true, + "unpaged": false + }, + "totalElements": 1, + "totalPages": 1, + "last": true, + "size": 2147483647, + "number": 0, + "sort": { + "empty": false, + "sorted": true, + "unsorted": false + }, + "first": true, + "numberOfElements": 1, + "empty": false + } + } + } + } + } + }, + "400": { + "description": "The input does not comply to the syntax requirements", + "content": { + "application/json": { + "examples": { + "Response in case of invalid data provided": { + "description": "Response in case of invalid data provided", + "value": { + "type": "about:blank", + "title": "title", + "status": 400, + "detail": "details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689760833962, + "errors": {} + } + } + } + } + } + } + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden access" + }, + "404": { + "description": "Wallet not found with caller BPN", + "content": { + "application/json": { + "examples": { + "Wallet not found with caller BPN": { + "description": "Wallet not found with caller BPN", + "value": { + "type": "about:blank", + "title": "Wallet not found for identifier did:web:localhost:BPNL0000000", + "status": 404, + "detail": "Wallet not found for identifier did:web:localhost:BPNL0000000", + "instance": "/api/wallets/did%3Aweb%3Alocalhost%3ABPNL0000000/credentials", + "properties": { + "timestamp": 1689765541959 + } } + } + } + } + } + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + } + }, + "security": [ + { + "Authenticate using access_token": [] + } + ] + }, + "post": { + "tags": [ + "Verifiable Credential - Holder" + ], + "summary": "Issue Verifiable Credential", + "description": "Permission: **update_wallets** OR **update_wallet** (The BPN of the issuer of the Verifiable Credential must equal BPN of caller)\nIssue a verifiable credential with a given issuer DID", + "operationId": "issueCredential", + "parameters": [ + { + "name": "asJwt", + "in": "query", + "description": "Specifies whether the VC (Verifiable Credential) should be created as a JWT (JSON Web Token). If set to true, the VC will be generated in JWT formatSetting this parameter to false will result in the VC being created as JSON-LD Defaults to false if not specified.", + "required": false, + "schema": { + "type": "boolean", + "default": false + }, + "examples": { + "Create VC as JWT": { + "description": "Create VC as JWT", + "value": true + }, + "Do not create VC as JWT": { + "description": "Do not create VC as JWT", + "value": false + } + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "example": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" ], - "requestBody": { - "description": "The verifiable credential to validate", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifiableCredentialDto" - }, - "examples": { - "demo": { - "value": { - "id": "http://example.edu/credentials/3732", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "type": [ - "University-Degree-Credential, VerifiableCredential" - ], - "issuer": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "issuanceDate": "2019-06-16T18:56:59Z", - "expirationDate": "2019-06-17T18:56:59Z", - "credentialSubject": { - "college": "Test-University" - }, - "proof": { - "type": "Ed25519Signature2018", - "created": "2021-11-17T22:20:27Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:example:76e12ec712ebc6f1c221ebfeb1f#key-1", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" - } - } - } - } - } + "id": "did:web:localhost:BPNL000000000000#f73e3631-ba87-4a03-bea3-b28700056879", + "type": [ + "VerifiableCredential", + "BankDetails" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "expirationDate": "2024-12-31T18:30:00Z", + "issuanceDate": "2023-07-19T09:11:34Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BankDetails", + "accountNumber": "123456789", + "bankName": "Dummy Bank" + } + ] + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Success Response", + "content": { + "application/json": { + "examples": { + "Success Response": { + "description": "Success Response", + "value": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#319a2641-9407-4c39-bf51-a4a109b59604", + "type": [ + "VerifiableCredential", + "BankDetails" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T13:41:52Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "bankName": "Dummy Bank", + "id": "did:web:localhost:BPNL000000000000", + "type": "BankDetails", + "accountNumber": "123456789" + } + ], + "proof": { + "proofPurpose": "proofPurpose", + "verificationMethod": "did:web:localhost:BPNL000000000000#", + "type": "JsonWebSignature2020", + "created": "2023-07-19T13:41:54Z", + "jws": "eyJhbGciOiJFZERTQSJ9..fdqaAsPhQ5xZhQiRvWliDVXX-R9NzCvFXGUAOyQ8yE1hmf_4cvxS7JFuEojjsi3V-n66iiRCUFEXsnv56XPgDA" + } } - }, - "responses": { - "200": { - "description": "The verification value", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifyResponse" - }, - "examples": { - "demo": { - "value": { - "valid": true, - "vp": { - "@context": [ - "https://www.w3.org/2018/credentials/v1" - ], - "type": [ - "VerifiablePresentation" - ], - "holder": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "verifiableCredential": [ - { - "id": "http://example.edu/credentials/3732", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "type": [ - "University-Degree-Credential, VerifiableCredential" - ], - "issuer": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "issuanceDate": "2019-06-16T18:56:59Z", - "expirationDate": "2019-06-17T18:56:59Z", - "credentialSubject": { - "college": "Test-University" - }, - "proof": { - "type": "Ed25519Signature2018", - "created": "2021-11-17T22:20:27Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:example:76e12ec712ebc6f1c221ebfeb1f#key-1", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" - } - } - ], - "proof": { - "type": "Ed25519Signature2018", - "created": "2021-11-17T22:20:27Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:example:76e12ec712ebc6f1c221ebfeb1f#key-1", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" - } - } - } - } - } - } - } - }, - "422": { - "description": "The input can not be processed due to semantic mismatches", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "400": { - "description": "The input does not comply to the syntax requirements", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "403": { - "description": "The request could not be completed due to a forbidden access.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "401": { - "description": "The request could not be completed due to a failed authorization.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } + } + } + } + } + }, + "400": { + "description": "The input does not comply to the syntax requirements", + "content": { + "application/json": { + "examples": { + "Response in case of invalid data provided": { + "description": "Response in case of invalid data provided", + "value": { + "type": "about:blank", + "title": "Invalid data provided", + "status": 400, + "detail": "details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689760833962, + "errors": { + "filed": "filed error message" + } + } + } + } + } + } + } + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden access" + }, + "404": { + "description": "Wallet not found with caller BPN", + "content": { + "application/json": { + "examples": { + "Wallet not found with caller BPN": { + "description": "Wallet not found with caller BPN", + "value": { + "type": "about:blank", + "title": "Wallet not found for identifier did:web:localhost:BPNL0000000501", + "status": 404, + "detail": "Wallet not found for identifier did:web:localhost:BPNL0000000501", + "instance": "/api/wallets/did%3Aweb%3Alocalhost%3ABPNL0000000501", + "properties": { + "timestamp": 1689764377224 + } + } + } + } + } + } + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + } + }, + "security": [ + { + "Authenticate using access_token": [] + } + ] + } + }, + "/api/credentials/validation": { + "post": { + "tags": [ + "Verifiable Credential - Validation" + ], + "summary": "Validate Verifiable Credentials", + "description": "Permission: **view_wallets** OR **view_wallet** \n\n Validate Verifiable Credentials", + "operationId": "credentialsValidation", + "parameters": [ + { + "name": "withCredentialExpiryDate", + "in": "query", + "description": "Check expiry of VC", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CredentialVerificationRequest" + }, + "examples": { + "Validate credential in JSON-LD format": { + "description": "Validate credential in JSON-LD format", + "value": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#f73e3631-ba87-4a03-bea3-b28700056879", + "type": [ + "VerifiableCredential", + "BpnCredential" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T09:11:34Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BpnCredential" + } + ], + "proof": { + "created": "2023-07-19T09:11:39Z", + "jws": "eyJhbGciOiJFZERTQSJ9..fdn2qU85auOltdHDLdHI7sJVV1ZPdftpiXd_ndXN0dFgSDWiIrScdD03wtvKLq_H-shQWfh2RYeMmrlEzAhfDw", + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#" } + } }, - "deprecated": false + "Validate credential in JWT format": { + "description": "Validate credential in JWT format", + "value": { + "jwt": "eyJraWQiOiJkaWQ6d2ViOmFmODgtMjAzLTEyOS0yMTMtMTA3Lm5ncm9rLWZyZWUuYXBwOkJQTkwwMDAwMDAwMDAwMDAjOGYyZWU5ZDItYTM2Yy00MTM4LWJlMWYtYjZmZWZiNmY4MDI0IiwidHlwIjoiSldUIiwiYWxnIjoiRWREU0EifQ.eyJpc3MiOiJkaWQ6d2ViOmFmODgtMjAzLTEyOS0yMTMtMTA3Lm5ncm9rLWZyZWUuYXBwOkJQTkwwMDAwMDAwMDAwMDAiLCJzdWIiOiJkaWQ6d2ViOmFmODgtMjAzLTEyOS0yMTMtMTA3Lm5ncm9rLWZyZWUuYXBwOkJQTkwwMDAwMDAwMDAwMTEiLCJleHAiOjE3MzU2Njk4MDAsInZjIjp7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy8yMDE4L2NyZWRlbnRpYWxzL3YxIiwiaHR0cHM6Ly9jb2Zpbml0eS14LmdpdGh1Yi5pby9zY2hlbWEtcmVnaXN0cnkvdjEuMS9Vc2VDYXNlVkMuanNvbiIsImh0dHBzOi8vdzNpZC5vcmcvc2VjdXJpdHkvc3VpdGVzL2p3cy0yMDIwL3YxIl0sImlkIjoiZGlkOndlYjphZjg4LTIwMy0xMjktMjEzLTEwNy5uZ3Jvay1mcmVlLmFwcDpCUE5MMDAwMDAwMDAwMDAwI2Q4Y2ZjZDBiLWY0NGQtNDVkMC05OGEzLTA4ZDZkNmU5Y2E5NSIsInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiLCJVc2VDYXNlRnJhbWV3b3JrQ29uZGl0aW9uIl0sImlzc3VlciI6ImRpZDp3ZWI6YWY4OC0yMDMtMTI5LTIxMy0xMDcubmdyb2stZnJlZS5hcHA6QlBOTDAwMDAwMDAwMDAwMCIsImNyZWRlbnRpYWxTdWJqZWN0IjpbeyJob2xkZXJJZGVudGlmaWVyIjoiQlBOTDAwMDAwMDAwMDAxMSIsImlkIjoiZGlkOndlYjphZjg4LTIwMy0xMjktMjEzLTEwNy5uZ3Jvay1mcmVlLmFwcDpCUE5MMDAwMDAwMDAwMDExIiwidHlwZSI6IkJlaGF2aW9yVHdpbkNyZWRlbnRpYWwiLCJjb250cmFjdFRlbXBsYXRlIjoiaHR0cHM6Ly9wdWJsaWMuY2F0ZW5hLXgub3JnL2NvbnRyYWN0cy90cmFjZWFiaWx0eS52MS5wZGYiLCJjb250cmFjdFZlcnNpb24iOiIxLjAuMCJ9XSwiY3JlZGVudGlhbFN0YXR1cyI6bnVsbCwiaXNzdWFuY2VEYXRlIjoiMjAyNC0wMi0wOFQxNDowMjo1M1oiLCJleHBpcmF0aW9uRGF0ZSI6IjIwMjQtMTItMzFUMTg6MzA6MDBaIn0sImp0aSI6IjliYWFhMjIzLTAxMjctNDEyZS05NjZhLTA3ZTJmZGU4NGNlNCJ9.X3rkj8Gv4OD5nEaeFG5pSA-dogbcYA91YEPmHiKT4FhAiIr7QAdSEULGXHYOn8-eK0jSDHNdAxNYIK1UwYRsCA" + } + } + } } + }, + "required": true }, - "/api/presentations": { - "post": { - "tags": [ - "VerifiablePresentations" - ], - "summary": "Create Verifiable Presentation", - "description": "Permission: **update_wallets** OR **update_wallet** (The BPN of the issuer of the Verifiable Presentation must equal to BPN of caller)\n\nCreate a verifiable presentation from a list of verifiable credentials, signed by the holder", - "parameters": [ - { - "name": "asJwt", - "in": "query", - "schema": { - "type": "boolean", - "default": true - }, - "required": false, - "deprecated": false, - "examples": { - "asJwt": { - "value": "false" - } - } - }, - { - "name": "withCredentialsDateValidation", - "in": "query", - "schema": { - "type": "boolean", - "default": true - }, - "required": false, - "deprecated": false, - "examples": { - "withCredentialsDateValidation": { - "value": "false" - } - } - }, - { - "name": "withCredentialsValidation", - "in": "query", - "schema": { - "type": "boolean", - "default": true + "responses": { + "200": { + "description": "Validate Verifiable Credentials", + "content": { + "application/json": { + "examples": { + "Verifiable Credentials without check expiry": { + "description": "Verifiable Credentials without check expiry", + "value": { + "valid": true, + "vc": { + "issuanceDate": "2023-07-19T09:11:34Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BpnCredential" + } + ], + "id": "did:web:localhost:BPNL000000000000#f73e3631-ba87-4a03-bea3-b28700056879", + "proof": { + "created": "2023-07-19T09:11:39Z", + "jws": "eyJhbGciOiJFZERTQSJ9..fdn2qU85auOltdHDLdHI7sJVV1ZPdftpiXd_ndXN0dFgSDWiIrScdD03wtvKLq_H-shQWfh2RYeMmrlEzAhfDw", + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#" }, - "required": false, - "deprecated": false, - "examples": { - "withCredentialsValidation": { - "value": "false" - } - } - }, - { - "name": "withRevocationValidation", - "in": "query", - "schema": { - "type": "boolean", - "default": true + "type": [ + "VerifiableCredential", + "BpnCredential" + ], + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "expirationDate": "2024-12-31T18:30:00Z" + } + } + }, + "Verifiable Credentials with check expiry": { + "description": "Verifiable Credentials with check expiry", + "value": { + "valid": true, + "validateExpiryDate": true, + "vc": { + "issuanceDate": "2023-07-19T09:11:34Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BpnCredential" + } + ], + "id": "did:web:localhost:BPNL000000000000#f73e3631-ba87-4a03-bea3-b28700056879", + "proof": { + "created": "2023-07-19T09:11:39Z", + "jws": "eyJhbGciOiJFZERTQSJ9..fdn2qU85auOltdHDLdHI7sJVV1ZPdftpiXd_ndXN0dFgSDWiIrScdD03wtvKLq_H-shQWfh2RYeMmrlEzAhfDw", + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#" }, - "required": false, - "deprecated": false, - "examples": { - "withRevocationValidation": { - "value": "false" - } - } + "type": [ + "VerifiableCredential", + "BpnCredential" + ], + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "expirationDate": "2024-12-31T18:30:00Z" + } } - ], - "requestBody": { - "description": "The verifiable presentation input data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifiablePresentationRequestDto" - }, - "examples": { - "demo": { - "value": { - "holderIdentifier": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "verifiableCredentials": [ - { - "id": "http://example.edu/credentials/333", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "type": [ - "University-Degree-Credential, VerifiableCredential" - ], - "issuer": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "issuanceDate": "2019-06-16T18:56:59Z", - "expirationDate": "2019-06-17T18:56:59Z", - "credentialSubject": { - "college": "Test-University" - }, - "proof": { - "type": "Ed25519Signature2018", - "created": "2021-11-17T22:20:27Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:example:76e12ec712ebc6f1c221ebfeb1f#keys-1", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" - } - } - ] - } - } - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "The created verifiable presentation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifiablePresentationDto" - }, - "examples": { - "demo": { - "value": { - "@context": [ - "https://www.w3.org/2018/credentials/v1" - ], - "type": [ - "VerifiablePresentation" - ], - "holder": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "verifiableCredential": [ - { - "id": "http://example.edu/credentials/3732", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "type": [ - "University-Degree-Credential, VerifiableCredential" - ], - "issuer": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "issuanceDate": "2019-06-16T18:56:59Z", - "expirationDate": "2019-06-17T18:56:59Z", - "credentialSubject": { - "college": "Test-University" - }, - "proof": { - "type": "Ed25519Signature2018", - "created": "2021-11-17T22:20:27Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:example:76e12ec712ebc6f1c221ebfeb1f#key-1", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" - } - } - ], - "proof": { - "type": "Ed25519Signature2018", - "created": "2021-11-17T22:20:27Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:example:76e12ec712ebc6f1c221ebfeb1f#key-1", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" - } - } - } - } - } - } - }, - "422": { - "description": "The input can not be processed due to semantic mismatches", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "403": { - "description": "The request could not be completed due to a forbidden access.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "401": { - "description": "The request could not be completed due to a failed authorization.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } + }, + "Verifiable expired credentials with check expiry ": { + "description": "Verifiable expired credentials with check expiry ", + "value": { + "valid": false, + "validateExpiryDate": false, + "vc": { + "issuanceDate": "2023-07-19T09:11:34Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BpnCredential" + } + ], + "id": "did:web:localhost:BPNL000000000000#f73e3631-ba87-4a03-bea3-b28700056879", + "proof": { + "created": "2023-07-19T09:11:39Z", + "jws": "eyJhbGciOiJFZERTQSJ9..fdn2qU85auOltdHDLdHI7sJVV1ZPdftpiXd_ndXN0dFgSDWiIrScdD03wtvKLq_H-shQWfh2RYeMmrlEzAhfDw", + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#" + }, + "type": [ + "VerifiableCredential", + "BpnCredential" + ], + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "expirationDate": "2022-12-31T18:30:00Z" + } } - }, - "deprecated": false - } - }, - "/api/presentations/validation": { - "post": { - "tags": [ - "VerifiablePresentations" - ], - "summary": "Validate Verifiable Presentation", - "description": "Permission: **view_wallets** OR **view_wallet**\n\nValidate Verifiable Presentation with all included credentials", - "parameters": [ - { - "name": "withDateValidation", - "in": "query", - "schema": { - "type": "boolean", - "default": false, - "nullable": true + }, + "Revocable Verifiable credentials with check expiry ": { + "description": "Revocable Verifiable credentials with check expiry ", + "value": { + "credentialStatus": "active", + "valid": true, + "validateExpiryDate": true, + "vc": { + "credentialSubject": [ + { + "holderIdentifier": "BPNL000000000001", + "allowedVehicleBrands": [ + "Audi", + "Abarth", + "Alfa Romeo", + "Chrysler" + ], + "id": "did:web:6e3e-203-129-213-107.ngrok-free.app:BPNL000000000001", + "activityType": "vehicleDismantle", + "type": "DismantlerCredential" + } + ], + "issuanceDate": "2024-01-05T05:42:53Z", + "id": "did:web:6e3e-203-129-213-107.ngrok-free.app:BPNL000000000000#8507aa50-b2a4-4532-8e45-f50e7654b23b", + "proof": { + "proofPurpose": "assertionMethod", + "verificationMethod": "did:web:6e3e-203-129-213-107.ngrok-free.app:BPNL000000000000#a39d8ccf-2a66-488d-bfec-916768082e91", + "type": "JsonWebSignature2020", + "created": "2024-01-05T05:42:53Z", + "jws": "eyJhbGciOiJFZERTQSJ9..15NdxA8L_Iw7Igxevm7YGMAQA-Kt6PMOpix6p0jaYHCtfQnTy3q61SDvsnsltGT6fzM90JOubOuig2WFy-GPDg" }, - "required": false, - "deprecated": false, - "examples": { - "withDateValidation": { - "value": "false" - } - } - }, - { - "name": "withRevocationValidation", - "in": "query", - "schema": { - "type": "boolean", - "default": true + "type": [ + "VerifiableCredential", + "DismantlerCredential" + ], + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://cofinity-x.github.io/schema-registry/v1.1/DismantlerVC.json", + "https://w3id.org/security/suites/jws-2020/v1", + "https://w3id.org/vc/status-list/2021/v1" + ], + "issuer": "did:web:6e3e-203-129-213-107.ngrok-free.app:BPNL000000000000", + "credentialStatus": { + "id": "did:web:6e3e-203-129-213-107.ngrok-free.app:BPNL000000000000#0", + "statusPurpose": "revocation", + "statusListIndex": "0", + "statusListCredential": "https://ae96-203-129-213-107.ngrok-free.app/api/v1/revocations/credentials?issuerId=did:web:6e3e-203-129-213-107.ngrok-free.app:BPNL000000000000", + "type": "StatusList2021Entry" }, - "required": false, - "deprecated": false, - "examples": { - "withRevocationValidation": { - "value": "false" - } - } + "expirationDate": "2024-12-31T18:30:00Z" + } } - ], - "requestBody": { - "description": "The verifiable presentation to validate", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifiablePresentationDto" - }, - "examples": { - "demo": { - "value": { - "@context": [ - "https://www.w3.org/2018/credentials/v1" - ], - "type": [ - "VerifiablePresentation" - ], - "holder": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "verifiableCredential": [ - { - "id": "http://example.edu/credentials/3732", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "type": [ - "University-Degree-Credential, VerifiableCredential" - ], - "issuer": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "issuanceDate": "2019-06-16T18:56:59Z", - "expirationDate": "2019-06-17T18:56:59Z", - "credentialSubject": { - "college": "Test-University" - }, - "proof": { - "type": "Ed25519Signature2018", - "created": "2021-11-17T22:20:27Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:example:76e12ec712ebc6f1c221ebfeb1f#key-1", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" - } - } - ], - "proof": { - "type": "Ed25519Signature2018", - "created": "2021-11-17T22:20:27Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:example:76e12ec712ebc6f1c221ebfeb1f#key-1", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" - } - } - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "The verification value", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifyResponse" - }, - "examples": { - "demo": { - "value": { - "valid": true, - "vp": { - "@context": [ - "https://www.w3.org/2018/credentials/v1" - ], - "type": [ - "VerifiablePresentation" - ], - "holder": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "verifiableCredential": [ - { - "id": "http://example.edu/credentials/3732", - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "type": [ - "University-Degree-Credential, VerifiableCredential" - ], - "issuer": "did:example:76e12ec712ebc6f1c221ebfeb1f", - "issuanceDate": "2019-06-16T18:56:59Z", - "expirationDate": "2019-06-17T18:56:59Z", - "credentialSubject": { - "college": "Test-University" - }, - "proof": { - "type": "Ed25519Signature2018", - "created": "2021-11-17T22:20:27Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:example:76e12ec712ebc6f1c221ebfeb1f#key-1", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" - } - } - ], - "proof": { - "type": "Ed25519Signature2018", - "created": "2021-11-17T22:20:27Z", - "proofPurpose": "assertionMethod", - "verificationMethod": "did:example:76e12ec712ebc6f1c221ebfeb1f#key-1", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" - } - } - } - } - } - } - } - }, - "422": { - "description": "The input can not be processed due to semantic mismatches", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "400": { - "description": "The input does not comply to the syntax requirements", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "403": { - "description": "The request could not be completed due to a forbidden access.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } - }, - "401": { - "description": "The request could not be completed due to a failed authorization.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExceptionResponse" - }, - "examples": { - "demo": { - "value": { - "message": "reason", - "error": true - } - } - } - } - } + }, + "Verifiable Credentials with invalid signature": { + "description": "Verifiable Credentials with invalid signature", + "value": { + "valid": false, + "vc": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#f73e3631-ba87-4a03-bea3-b28700056879", + "type": [ + "VerifiableCredential", + "BpnCredential" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "expirationDate": "2024-12-31T18:30:00Z", + "issuanceDate": "2023-07-19T09:11:34Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BpnCredential" + } + ], + "proof": { + "created": "2023-07-19T09:11:39Z", + "jws": "eyJhbGciOiJFZERTQSJ9..fdn2qU85auOltdHDLdHI7sJVV1ZPdftpiXd_ndXN0dFgSDWiIrScdD03wtvKLq_H-shQWfh2RYeMmrlEzAhf", + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#" + } + } } - }, - "deprecated": false + } + } + } } - } - }, - "components": { - "schemas": { - "WalletDto": { - "properties": { - "bpn": { - "type": "string" - }, - "createdAt": { - "$ref": "#/components/schemas/LocalDateTime" - }, - "did": { - "type": "string" - }, - "name": { - "type": "string" - }, - "vcs": { - "items": { - "$ref": "#/components/schemas/VerifiableCredentialDto" - }, - "type": "array", - "maxItems": 100 + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden access" + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } } - }, - "required": [ - "name", - "bpn", - "did", - "createdAt", - "vcs" - ], - "type": "object" + } + } + } + } + } + }, + "security": [ + { + "Authenticate using access_token": [] + } + ] + } + }, + "/api/credentials/issuer": { + "get": { + "tags": [ + "Verifiable Credential - Issuer" + ], + "summary": "Query Verifiable Credentials", + "description": "Permission: **view_wallets** (The BPN of holderIdentifier must equal BPN of caller)\n\n Search verifiable credentials with filter criteria", + "operationId": "getCredentials_1", + "parameters": [ + { + "name": "credentialId", + "in": "query", + "description": "Credential Id", + "required": false, + "schema": { + "type": "string" }, - "LocalDateTime": { - "properties": { - "date": { - "$ref": "#/components/schemas/LocalDate" - }, - "time": { - "$ref": "#/components/schemas/LocalTime" - } - }, - "type": "object" + "examples": { + "Credential Id": { + "description": "Credential Id", + "value": "did:web:localhost:BPNL000000000000#12528899-160a-48bd-ba15-f396c3959ae9" + } + } + }, + { + "name": "holderIdentifier", + "in": "query", + "description": "Holder identifier(did of BPN)", + "required": false, + "schema": { + "type": "string" }, - "LocalDate": { - "properties": { - "year": { - "format": "int32", - "type": "integer" - }, - "month": { - "$ref": "#/components/schemas/Short" - }, - "day": { - "$ref": "#/components/schemas/Short" - } - }, - "type": "object" + "examples": { + "bpn": { + "description": "bpn", + "value": "BPNL000000000001" + }, + "did": { + "description": "did", + "value": "did:web:localhost:BPNL000000000001" + } + } + }, + { + "name": "type", + "in": "query", + "description": "Type of VC", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } }, - "Short": { - "properties": {}, - "type": "object" + "examples": { + "SummaryCredential": { + "description": "SummaryCredential", + "value": "SummaryCredential" + }, + "BpnCredential": { + "description": "BpnCredential", + "value": "BpnCredential" + } + } + }, + { + "name": "pageNumber", + "in": "query", + "description": "Page number, Page number start with zero", + "required": false, + "schema": { + "maximum": 2147483647, + "minimum": 0, + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "name": "size", + "in": "query", + "description": "Number of records per page", + "required": false, + "schema": { + "maximum": 2147483647, + "minimum": 0, + "type": "integer", + "format": "int32", + "default": 2147483647 + } + }, + { + "name": "sortColumn", + "in": "query", + "description": "Sort column name", + "required": false, + "schema": { + "type": "string", + "default": "createdAt" }, - "LocalTime": { - "properties": { - "hour": { - "$ref": "#/components/schemas/Short" - }, - "minute": { - "$ref": "#/components/schemas/Short" - }, - "second": { - "$ref": "#/components/schemas/Short" - }, - "nano": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" + "examples": { + "creation date": { + "description": "creation date", + "value": "createdAt" + }, + "Holder did": { + "description": "Holder did", + "value": "holderDid" + }, + "Credential type": { + "description": "Credential type", + "value": "type" + }, + "Credential id": { + "description": "Credential id", + "value": "credentialId" + } + } + }, + { + "name": "sortTpe", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "default": "desc" }, - "Byte": { - "properties": {}, - "type": "object" + "examples": { + "Ascending order": { + "description": "Ascending order", + "value": "asc" + }, + "Descending order": { + "description": "Descending order", + "value": "desc" + } + } + }, + { + "name": "asJwt", + "in": "query", + "description": "Specifies whether the VC (Verifiable Credential) should be created as a JWT (JSON Web Token). If set to true, the VC will be generated in JWT formatSetting this parameter to false will result in the VC being created as JSON-LD Defaults to false if not specified.", + "required": false, + "schema": { + "type": "boolean", + "default": false }, - "VerifiableCredentialDto": { - "properties": { - "@context": { - "items": { - "type": "string" - }, - "type": "array", - "maxItems": 100 - }, - "credentialStatus": {}, - "credentialSubject": { - "additionalProperties": { - "$ref": "#/components/schemas/Any" + "examples": { + "Create VC as JWT": { + "description": "Create VC as JWT", + "value": true + }, + "Do not create VC as JWT": { + "description": "Do not create VC as JWT", + "value": false + } + } + } + ], + "responses": { + "200": { + "description": "Issuer credential list", + "content": { + "application/json": { + "examples": { + "Issuer credential list": { + "description": "Issuer credential list", + "value": { + "content": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#ae364f71-f054-4d91-b579-f001bcb3e59e", + "type": [ + "VerifiableCredential", + "BpnCredential" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T09:27:42Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BpnCredential" + } + ], + "proof": { + "created": "2023-07-19T09:27:44Z", + "jws": "eyJhbGciOiJFZERTQSJ9..evDHQfW4EzJUt2HnS_WlmO8FFtywTGnwyywtCE7WP41my4Iscpqr4tbuVOqnZg85b4U8L3_ut8_pEONIhbExCQ", + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#" + } }, - "type": "object" - }, - "expirationDate": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "issuanceDate": { - "type": "string" - }, - "issuer": { - "type": "string" - }, - "proof": { - "$ref": "#/components/schemas/LdProofDto" - }, - "provenanceProof": { - "items": { - "$ref": "#/components/schemas/Any" + { + "type": [ + "VerifiableCredential", + "SummaryCredential" + ], + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/SummaryVC.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T09:11:39Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "contractTemplate": "https://public.catena-x.org/contracts/", + "holderIdentifier": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "items": [ + "BpnCredential" + ], + "type": "SummaryCredential" + } + ], + "proof": { + "created": "2023-07-19T09:11:41Z", + "jws": "eyJhbGciOiJFZERTQSJ9..YvoFhDip3TQAfZUIu0yc843oA4uGTg049dMFt_GoaMmPjiNB_B1EFOL-gDpwjIxTYNlGOO_CLp9qStbzlDTNBg", + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#" + } }, - "type": "array", - "maxItems": 100 - }, - "type": { - "items": { - "type": "string" + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#f73e3631-ba87-4a03-bea3-b28700056879", + "type": [ + "VerifiableCredential", + "BpnCredential" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T09:11:34Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BpnCredential" + } + ], + "proof": { + "created": "2023-07-19T09:11:39Z", + "jws": "eyJhbGciOiJFZERTQSJ9..fdn2qU85auOltdHDLdHI7sJVV1ZPdftpiXd_ndXN0dFgSDWiIrScdD03wtvKLq_H-shQWfh2RYeMmrlEzAhfDw", + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#" + } + } + ], + "pageable": { + "sort": { + "empty": false, + "unsorted": false, + "sorted": true }, - "type": "array", - "maxItems": 100 + "offset": 0, + "pageNumber": 0, + "pageSize": 2147483647, + "paged": true, + "unpaged": false + }, + "last": true, + "totalPages": 1, + "totalElements": 3, + "first": true, + "size": 2147483647, + "number": 0, + "sort": { + "empty": false, + "unsorted": false, + "sorted": true + }, + "numberOfElements": 3, + "empty": false } - }, - "required": [ - "@context", - "type", - "issuer", - "issuanceDate", - "credentialSubject" - ], - "type": "object" + } + } + } + } + }, + "400": { + "description": "The input does not comply to the syntax requirements", + "content": { + "application/json": { + "examples": { + "Response in case of invalid data provided": { + "description": "Response in case of invalid data provided", + "value": { + "type": "about:blank", + "title": "title", + "status": 400, + "detail": "details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689760833962, + "errors": {} + } + } + } + } + } + } + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden access" + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + } + }, + "security": [ + { + "Authenticate using access_token": [] + } + ] + }, + "post": { + "tags": [ + "Verifiable Credential - Issuer" + ], + "summary": "Issue Verifiable Credential", + "description": "Permission: **update_wallets** (The BPN of the base wallet must equal BPN of caller)\nIssue a verifiable credential with a given issuer DID", + "operationId": "issueCredentialUsingBaseWallet", + "parameters": [ + { + "name": "holderDid", + "in": "query", + "description": "Holder DID", + "required": true, + "schema": { + "type": "string" }, - "Any": { - "properties": {}, - "type": "object" + "examples": { + "did": { + "description": "did", + "value": "did:web:localhost:BPNL000000000000" + } + } + }, + { + "name": "asJwt", + "in": "query", + "description": "Specifies whether the VC (Verifiable Credential) should be created as a JWT (JSON Web Token). If set to true, the VC will be generated in JWT formatSetting this parameter to false will result in the VC being created as JSON-LD Defaults to false if not specified.", + "required": false, + "schema": { + "type": "boolean", + "default": false }, - "LdProofDto": { - "properties": { - "challenge": { - "type": "string", - "nullable": true - }, - "created": { - "type": "string" - }, - "creator": { - "type": "string", - "nullable": true - }, - "domain": { - "type": "string", - "nullable": true - }, - "jws": { - "type": "string", - "nullable": true - }, - "nonce": { - "type": "string", - "nullable": true - }, - "proofPurpose": { - "type": "string" - }, - "proofValue": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string" - }, - "verificationMethod": { - "type": "string" - } - }, - "required": [ - "type", - "created", - "proofPurpose", - "verificationMethod" + "examples": { + "Create VC as JWT": { + "description": "Create VC as JWT", + "value": true + }, + "Do not create VC as JWT": { + "description": "Do not create VC as JWT", + "value": false + } + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "example": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" ], - "type": "object" - }, - "ExceptionResponse": { - "properties": { - "error": { - "type": "boolean" - }, - "message": { - "type": "string" - } - }, - "required": [ - "message" + "id": "did:web:localhost:BPNL000000000000#f73e3631-ba87-4a03-bea3-b28700056879", + "type": [ + "VerifiableCredential", + "BpnCredential" ], - "type": "object" - }, - "WalletCreateDto": { - "properties": { - "bpn": { - "type": "string" - }, - "name": { - "type": "string" + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T09:11:34Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BpnCredential" + } + ] + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Issuer credential", + "content": { + "application/json": { + "examples": { + "Issuer credential": { + "description": "Issuer credential", + "value": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#ff084e7a-1b46-4a2f-a78d-3d701a0bd6e4", + "type": [ + "VerifiableCredential", + "BpnCredential" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T12:18:30Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BpnCredential" + } + ], + "proof": { + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#", + "created": "2023-07-19T12:18:34Z", + "jws": "eyJhbGciOiJFZERTQSJ9..0Ua1vcTQAYwQY3PPuHr4RQxqW6iIngrHQQx1oPgk2uzqUpcbfY2YUxXAnbNA333-lSuvNhiV_1NLfBnCEcI2DQ" + } } - }, - "required": [ - "bpn", - "name" - ], - "type": "object" - }, - "CreateMembershipVCDto": { - "properties": { - "bpn": { - "type": "string" + } + } + } + } + }, + "400": { + "description": "The input does not comply to the syntax requirements", + "content": { + "application/json": { + "examples": { + "Response in case of invalid data provided": { + "description": "Response in case of invalid data provided", + "value": { + "type": "about:blank", + "title": "Invalid data provided", + "status": 400, + "detail": "details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689760833962, + "errors": { + "filed": "filed error message" + } + } } - }, - "required": [ - "bpn" - ], - "type": "object" - }, - "SuccessResponse": { - "properties": { - "message": { - "type": "string" + } + } + } + } + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden access" + }, + "404": { + "description": "Wallet not found with provided identifier", + "content": { + "application/json": { + "examples": { + "Wallet not found with provided identifier": { + "description": "Wallet not found with provided identifier", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 404, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } } - }, - "required": [ - "message" - ], - "type": "object" - }, - "IssuedVerifiableCredentialRequestDto": { - "properties": { - "@context": { - "items": { - "type": "string" - }, - "type": "array", - "maxItems": 100 - }, - "CredentialStatus": {}, - "credentialSubject": { - "additionalProperties": { - "$ref": "#/components/schemas/Any" - }, - "type": "object" - }, - "expirationDate": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "issuanceDate": { - "type": "string" - }, - "issuer": { - "type": "string" - }, - "proof": { - "$ref": "#/components/schemas/LdProofDto" - }, - "type": { - "items": { - "type": "string" - }, - "type": "array", - "maxItems": 100 + } + } + } + } + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } } - }, - "required": [ - "@context", - "type", - "issuer", - "issuanceDate", - "credentialSubject", - "proof" - ], - "type": "object" + } + } + } + } + } + }, + "security": [ + { + "Authenticate using access_token": [] + } + ] + } + }, + "/api/credentials/issuer/membership": { + "post": { + "tags": [ + "Verifiable Credential - Issuer" + ], + "summary": "Issue a Membership Verifiable Credential with base wallet issuer", + "description": "Permission: **update_wallets** (The BPN of base wallet must equal BPN of caller)\n\n Issue a verifiable credential by base wallet", + "operationId": "issueMembershipCredential", + "parameters": [ + { + "name": "asJwt", + "in": "query", + "description": "Specifies whether the VC (Verifiable Credential) should be created as a JWT (JSON Web Token). If set to true, the VC will be generated in JWT formatSetting this parameter to false will result in the VC being created as JSON-LD Defaults to false if not specified.", + "required": false, + "schema": { + "type": "boolean", + "default": false }, - "DidDocumentDto": { - "properties": { - "alsoKnownAs": { - "type": "string", - "nullable": true - }, - "assertionMethodVerificationMethods": { - "items": { - "$ref": "#/components/schemas/Any" - }, - "type": "array", - "maxItems": 100 - }, - "authenticationVerificationMethods": { - "items": { - "$ref": "#/components/schemas/Any" - }, - "type": "array", - "maxItems": 100 - }, - "capabilityDelegationVerificationMethods": { - "items": { - "$ref": "#/components/schemas/Any" - }, - "type": "array", - "maxItems": 100 - }, - "capabilityInvocationVerificationMethods": { - "items": { - "$ref": "#/components/schemas/Any" - }, - "type": "array", - "maxItems": 100 - }, - "context": { - "items": { - "type": "string" - }, - "type": "array", - "maxItems": 100 - }, - "controller": { - "$ref": "#/components/schemas/Short" - }, - "id": { - "type": "string" - }, - "keyAgreementVerificationMethods": { - "items": { - "$ref": "#/components/schemas/Any" - }, - "type": "array", - "maxItems": 100 - }, - "services": { - "items": { - "$ref": "#/components/schemas/Any" - }, - "type": "array", - "maxItems": 100 - }, - "verificationMethods": { - "items": { - "$ref": "#/components/schemas/DidVerificationMethodDto" - }, - "type": "array", - "maxItems": 100 + "examples": { + "Create VC as JWT": { + "description": "Create VC as JWT", + "value": true + }, + "Do not create VC as JWT": { + "description": "Do not create VC as JWT", + "value": false + } + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueMembershipCredentialRequest" + }, + "example": { + "bpn": "BPNL000000000000" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Issuer credential", + "content": { + "application/json": { + "examples": { + "Membership credential": { + "description": "Membership credential", + "value": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#0d6b6447-99de-4bc5-94f3-3ac0ae8ee188", + "type": [ + "VerifiableCredential", + "MembershipCredential" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T13:13:53Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "holderIdentifier": "BPNL000000000000", + "startTime": "2023-07-19T13:13:53.581081Z", + "memberOf": "Catena-X", + "id": "did:web:localhost:BPNL000000000000", + "type": "MembershipCredential", + "status": "Active" + } + ], + "proof": { + "proofPurpose": "proofPurpose", + "verificationMethod": "did:web:localhost:BPNL000000000000#", + "type": "JsonWebSignature2020", + "created": "2023-07-19T13:13:57Z", + "jws": "eyJhbGciOiJFZERTQSJ9..zt7SyONY1shO7N6KrabQJr9uNrToM1Bc4eagTQc1LxAfZ1v-SSp9Y-2cpZNDV8AR08r4L8VbtWrR9t2dNoAfDw" + } } - }, - "required": [ - "id", - "context" - ], - "type": "object" - }, - "DidVerificationMethodDto": { - "properties": { - "controller": { - "type": "string" - }, - "id": { - "type": "string" - }, - "publicKeyBase58": { - "type": "string", - "nullable": true - }, - "publicKeyBase64": { - "type": "string", - "nullable": true - }, - "publicKeyHex": { - "type": "string", - "nullable": true - }, - "publicKeyJwk": { - "$ref": "#/components/schemas/PublicKeyJwkDto" - }, - "publicKeyMultibase": { - "type": "string", - "nullable": true - }, - "publicKeyPem": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string" + } + } + } + } + }, + "400": { + "description": "The input does not comply to the syntax requirements", + "content": { + "application/json": { + "examples": { + "Response in case of invalid data provided": { + "description": "Response in case of invalid data provided", + "value": { + "type": "about:blank", + "title": "Invalid data provided", + "status": 400, + "detail": "details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689760833962, + "errors": { + "filed": "filed error message" + } + } } - }, - "required": [ - "id", - "type", - "controller" - ], - "type": "object" - }, - "PublicKeyJwkDto": { - "properties": { - "additionalAttributes": { - "additionalProperties": { - "$ref": "#/components/schemas/Any" - }, - "type": "object" - }, - "alg": { - "type": "string", - "nullable": true - }, - "crv": { - "type": "string", - "nullable": true - }, - "keyOps": { - "items": { - "type": "string", - "nullable": true - }, - "type": "array", - "maxItems": 100 - }, - "kid": { - "type": "string", - "nullable": true - }, - "kty": { - "type": "string" - }, - "use": { - "type": "string", - "nullable": true - }, - "x": { - "type": "string", - "nullable": true - }, - "y": { - "type": "string", - "nullable": true + } + } + } + } + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden access" + }, + "404": { + "description": "Wallet not found with provided identifier", + "content": { + "application/json": { + "examples": { + "Wallet not found with provided identifier": { + "description": "Wallet not found with provided identifier", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 404, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } } - }, - "required": [ - "kty" - ], - "type": "object" - }, - "VerifiableCredentialRequestDto": { - "properties": { - "@context": { - "items": { - "type": "string" - }, - "type": "array", - "maxItems": 100 - }, - "credentialSubject": { - "additionalProperties": { - "$ref": "#/components/schemas/Any" - }, - "type": "object" - }, - "expirationDate": { - "type": "string", - "nullable": true - }, - "holderIdentifier": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "isRevocable": { - "type": "boolean" - }, - "issuanceDate": { - "type": "string", - "nullable": true - }, - "issuerIdentifier": { - "type": "string" - }, - "type": { - "items": { - "type": "string" - }, - "type": "array", - "maxItems": 100 + } + } + } + } + }, + "409": { + "description": "The request could not be completed due to a conflict.", + "content": { + "application/json": { + "examples": { + "MembershipCredential already exist": { + "description": "MembershipCredential already exist", + "value": { + "type": "about:blank", + "title": "Credential of type MembershipCredential is already exists ", + "status": 409, + "detail": "Credential of type MembershipCredential is already exists ", + "instance": "/api/credentials/issuer/membership", + "properties": { + "timestamp": 1689772483831 + } + } + } + } + } + } + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } } + } + } + } + } + } + }, + "security": [ + { + "Authenticate using access_token": [] + } + ] + } + }, + "/api/credentials/issuer/framework": { + "post": { + "tags": [ + "Verifiable Credential - Issuer" + ], + "summary": "Issue a Use Case Verifiable Credential with base wallet issuer", + "description": "Permission: **update_wallets** (The BPN of base wallet must equal BPN of caller)\n\n Issue a verifiable credential by base wallet", + "operationId": "issueFrameworkCredential", + "parameters": [ + { + "name": "asJwt", + "in": "query", + "description": "Specifies whether the VC (Verifiable Credential) should be created as a JWT (JSON Web Token). If set to true, the VC will be generated in JWT formatSetting this parameter to false will result in the VC being created as JSON-LD Defaults to false if not specified.", + "required": false, + "schema": { + "type": "boolean", + "default": false + }, + "examples": { + "Create VC as JWT": { + "description": "Create VC as JWT", + "value": true + }, + "Do not create VC as JWT": { + "description": "Do not create VC as JWT", + "value": false + } + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueFrameworkCredentialRequest" + }, + "examples": { + "BehaviorTwinCredential": { + "description": "BehaviorTwinCredential", + "value": { + "holderIdentifier": "BPNL000000000000", + "type": "BehaviorTwinCredential", + "contract-template": "https://public.catena-x.org/contracts/traceabilty.v1.pdf", + "contract-version": "1.0.0" + } }, - "required": [ - "@context", - "type", - "issuerIdentifier", - "issuanceDate", - "credentialSubject" - ], - "type": "object" + "PcfCredential": { + "description": "PcfCredential", + "value": { + "holderIdentifier": "BPNL000000000000", + "type": "PcfCredential", + "contract-template": "https://public.catena-x.org/contracts/traceabilty.v1.pdf", + "contract-version": "1.0.0" + } + }, + "SustainabilityCredential": { + "description": "SustainabilityCredential", + "value": { + "holderIdentifier": "BPNL000000000000", + "type": "SustainabilityCredential", + "contract-template": "https://public.catena-x.org/contracts/traceabilty.v1.pdf", + "contract-version": "1.0.0" + } + }, + "QualityCredential": { + "description": "QualityCredential", + "value": { + "holderIdentifier": "BPNL000000000000", + "type": "QualityCredential", + "contract-template": "https://public.catena-x.org/contracts/traceabilty.v1.pdf", + "contract-version": "1.0.0" + } + }, + "TraceabilityCredential": { + "description": "TraceabilityCredential", + "value": { + "holderIdentifier": "BPNL000000000000", + "type": "TraceabilityCredential", + "contract-template": "https://public.catena-x.org/contracts/traceabilty.v1.pdf", + "contract-version": "1.0.0" + } + }, + "ResiliencyCredential": { + "description": "ResiliencyCredential", + "value": { + "holderIdentifier": "BPNL000000000000", + "type": "ResiliencyCredential", + "contract-template": "https://public.catena-x.org/contracts/traceabilty.v1.pdf", + "contract-version": "1.0.0" + } + } + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Framework credential", + "content": { + "application/json": { + "examples": { + "BehaviorTwin credential": { + "description": "BehaviorTwin credential", + "value": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#46a8c5e6-b195-4ec9-85cd-665c57d296ab", + "type": [ + "VerifiableCredential", + "UseCaseFrameworkCondition" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T13:49:58Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "holderIdentifier": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BehaviorTwinCredential", + "contractTemplate": "https://public.catena-x.org/contracts/traceabilty.v1.pdf", + "contractVersion": "1.0.0" + } + ], + "proof": { + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#", + "created": "2023-07-19T13:50:02Z", + "jws": "eyJhbGciOiJFZERTQSJ9..IkfgC6Gn9sOT1uu1zMiDIIqw6pV4Z8axkKvphegsCVWT9uo0HZp4J9L1ILxR-huINGR5QlGIKiVuLGB5kKDOAQ" + } + } + }, + "Pcf Credential": { + "description": "Pcf Credential", + "value": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#46a8c5e6-b195-4ec9-85cd-665c57d296ab", + "type": [ + "VerifiableCredential", + "UseCaseFrameworkCondition" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T13:49:58Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "holderIdentifier": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "PcfCredential", + "contractTemplate": "https://public.catena-x.org/contracts/traceabilty.v1.pdf", + "contractVersion": "1.0.0" + } + ], + "proof": { + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#", + "created": "2023-07-19T13:50:02Z", + "jws": "eyJhbGciOiJFZERTQSJ9..IkfgC6Gn9sOT1uu1zMiDIIqw6pV4Z8axkKvphegsCVWT9uo0HZp4J9L1ILxR-huINGR5QlGIKiVuLGB5kKDOAQ" + } + } + }, + "Sustainability Credential": { + "description": "Sustainability Credential", + "value": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#46a8c5e6-b195-4ec9-85cd-665c57d296ab", + "type": [ + "VerifiableCredential", + "UseCaseFrameworkCondition" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T13:49:58Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "holderIdentifier": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "SustainabilityCredential", + "contractTemplate": "https://public.catena-x.org/contracts/traceabilty.v1.pdf", + "contractVersion": "1.0.0" + } + ], + "proof": { + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#", + "created": "2023-07-19T13:50:02Z", + "jws": "eyJhbGciOiJFZERTQSJ9..IkfgC6Gn9sOT1uu1zMiDIIqw6pV4Z8axkKvphegsCVWT9uo0HZp4J9L1ILxR-huINGR5QlGIKiVuLGB5kKDOAQ" + } + } + }, + "Quality Credential": { + "description": "Quality Credential", + "value": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#46a8c5e6-b195-4ec9-85cd-665c57d296ab", + "type": [ + "VerifiableCredential", + "UseCaseFrameworkCondition" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T13:49:58Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "holderIdentifier": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "QualityCredential", + "contractTemplate": "https://public.catena-x.org/contracts/traceabilty.v1.pdf", + "contractVersion": "1.0.0" + } + ], + "proof": { + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#", + "created": "2023-07-19T13:50:02Z", + "jws": "eyJhbGciOiJFZERTQSJ9..IkfgC6Gn9sOT1uu1zMiDIIqw6pV4Z8axkKvphegsCVWT9uo0HZp4J9L1ILxR-huINGR5QlGIKiVuLGB5kKDOAQ" + } + } + }, + "Traceability Credential": { + "description": "Traceability Credential", + "value": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#46a8c5e6-b195-4ec9-85cd-665c57d296ab", + "type": [ + "VerifiableCredential", + "UseCaseFrameworkCondition" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T13:49:58Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "holderIdentifier": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "TraceabilityCredential", + "contractTemplate": "https://public.catena-x.org/contracts/traceabilty.v1.pdf", + "contractVersion": "1.0.0" + } + ], + "proof": { + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#", + "created": "2023-07-19T13:50:02Z", + "jws": "eyJhbGciOiJFZERTQSJ9..IkfgC6Gn9sOT1uu1zMiDIIqw6pV4Z8axkKvphegsCVWT9uo0HZp4J9L1ILxR-huINGR5QlGIKiVuLGB5kKDOAQ" + } + } + }, + "Resiliency Credential": { + "description": "Resiliency Credential", + "value": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#46a8c5e6-b195-4ec9-85cd-665c57d296ab", + "type": [ + "VerifiableCredential", + "UseCaseFrameworkCondition" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T13:49:58Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "holderIdentifier": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "ResiliencyCredential", + "contractTemplate": "https://public.catena-x.org/contracts/traceabilty.v1.pdf", + "contractVersion": "1.0.0" + } + ], + "proof": { + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#", + "created": "2023-07-19T13:50:02Z", + "jws": "eyJhbGciOiJFZERTQSJ9..IkfgC6Gn9sOT1uu1zMiDIIqw6pV4Z8axkKvphegsCVWT9uo0HZp4J9L1ILxR-huINGR5QlGIKiVuLGB5kKDOAQ" + } + } + } + } + } + } + }, + "400": { + "description": "The input does not comply to the syntax requirements", + "content": { + "application/json": { + "examples": { + "Response in case of invalid data provided": { + "description": "Response in case of invalid data provided", + "value": { + "type": "about:blank", + "title": "Invalid data provided", + "status": 400, + "detail": "details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689760833962, + "errors": { + "filed": "filed error message" + } + } + } + } + } + } + } + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden access" + }, + "404": { + "description": "Wallet not found with provided identifier", + "content": { + "application/json": { + "examples": { + "Wallet not found with provided identifier": { + "description": "Wallet not found with provided identifier", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 404, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + } + }, + "security": [ + { + "Authenticate using access_token": [] + } + ] + } + }, + "/api/credentials/issuer/dismantler": { + "post": { + "tags": [ + "Verifiable Credential - Issuer" + ], + "summary": "Issue a Dismantler Verifiable Credential with base wallet issuer", + "description": "Permission: **update_wallets** (The BPN of base wallet must equal BPN of caller)\n\n Issue a verifiable credential by base wallet", + "operationId": "issueDismantlerCredential", + "parameters": [ + { + "name": "asJwt", + "in": "query", + "description": "Specifies whether the VC (Verifiable Credential) should be created as a JWT (JSON Web Token). If set to true, the VC will be generated in JWT formatSetting this parameter to false will result in the VC being created as JSON-LD Defaults to false if not specified.", + "required": false, + "schema": { + "type": "boolean", + "default": false }, - "VerifiableCredentialRequestWithoutIssuerDto": { - "properties": { - "@context": { - "items": { - "type": "string" - }, - "type": "array", - "maxItems": 100 - }, - "credentialSubject": { - "additionalProperties": { - "$ref": "#/components/schemas/Any" - }, - "type": "object" - }, - "expirationDate": { - "type": "string", - "nullable": true - }, - "holderIdentifier": { - "type": "string" - }, - "id": { - "type": "string", - "nullable": true - }, - "isRevocable": { - "type": "boolean" - }, - "issuanceDate": { - "type": "string", - "nullable": true - }, - "type": { - "items": { - "type": "string" - }, - "type": "array", - "maxItems": 100 + "examples": { + "Create VC as JWT": { + "description": "Create VC as JWT", + "value": true + }, + "Do not create VC as JWT": { + "description": "Do not create VC as JWT", + "value": false + } + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueDismantlerCredentialRequest" + }, + "example": { + "bpn": "BPNL000000000000", + "activityType": "vehicleDismantle", + "allowedVehicleBrands": [ + "Audi", + "Abarth", + "Alfa Romeo", + "Chrysler" + ] + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Dismantler Credential", + "content": { + "application/json": { + "examples": { + "Dismantler Credential": { + "description": "Dismantler Credential", + "value": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#5caac86c-8ef8-4aab-9d2b-fb18c62560a9", + "type": [ + "VerifiableCredential", + "DismantlerCredential" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T13:35:33Z", + "expirationDate": "2024-12-31T18:30:00Z", + "credentialSubject": [ + { + "holderIdentifier": "BPNL000000000000", + "allowedVehicleBrands": [ + "Audi", + "Abarth", + "Alfa Romeo", + "Chrysler" + ], + "id": "did:web:localhost:BPNL000000000000", + "activityType": "vehicleDismantle", + "type": "DismantlerCredential" + } + ], + "proof": { + "proofPurpose": "proofPurpose", + "verificationMethod": "did:web:localhost:BPNL000000000000#", + "type": "JsonWebSignature2020", + "created": "2023-07-19T13:35:38Z", + "jws": "eyJhbGciOiJFZERTQSJ9..UI82uq6iyqoaKjZIhJiV24v_Bqnj_7EqWiqZ3VWjqkoHLnr7JDtW5KVywWPl27j_baLBxxnM5jqjQdSK4rfbBg" + } } - }, - "required": [ - "@context", - "type", - "issuanceDate", - "credentialSubject", - "holderIdentifier" - ], - "type": "object" + } + } + } + } + }, + "400": { + "description": "The input does not comply to the syntax requirements", + "content": { + "application/json": { + "examples": { + "Response in case of invalid data provided": { + "description": "Response in case of invalid data provided", + "value": { + "type": "about:blank", + "title": "Invalid data provided", + "status": 400, + "detail": "details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689760833962, + "errors": { + "filed": "filed error message" + } + } + } + } + } + } + } + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden access" + }, + "404": { + "description": "Wallet not found with provided identifier", + "content": { + "application/json": { + "examples": { + "Wallet not found with provided identifier": { + "description": "Wallet not found with provided identifier", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 404, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + }, + "409": { + "description": "The request could not be completed due to a conflict.", + "content": { + "application/json": { + "examples": { + "DismantlerCredential already exist": { + "description": "DismantlerCredential already exist", + "value": { + "type": "about:blank", + "title": "Credential of type DismantlerCredential is already exists ", + "status": 409, + "detail": "Credential of type DismantlerCredential is already exists ", + "instance": "/api/credentials/issuer/dismantler", + "properties": { + "timestamp": 1689773804746 + } + } + } + } + } + } + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + } + }, + "security": [ + { + "Authenticate using access_token": [] + } + ] + } + }, + "/{bpn}/did.json": { + "get": { + "tags": [ + "DIDDocument" + ], + "summary": "Resolve DID Document", + "description": "Resolve the DID document for a given BPN", + "operationId": "getDidResolve", + "parameters": [ + { + "name": "bpn", + "in": "path", + "description": "BPN", + "required": true, + "schema": { + "type": "string" }, - "VerifiablePresentationRequestDto": { - "properties": { - "holderIdentifier": { - "type": "string" - }, - "verifiableCredentials": { - "items": { - "$ref": "#/components/schemas/VerifiableCredentialDto" - }, - "type": "array", - "maxItems": 100 + "examples": { + "bpn": { + "description": "bpn", + "value": "BPNL000000000000" + } + } + } + ], + "responses": { + "200": { + "description": "DID document", + "content": { + "application/json": { + "examples": { + " DID document": { + "description": " DID document", + "value": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://w3c.github.io/vc-jws-2020/contexts/v1" + ], + "id": "did:web:localhost:BPNL000000000000", + "verificationMethod": [ + { + "controller": "did:web:localhost:BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "publicKeyJwk": { + "crv": "Ed25519", + "kty": "OKP", + "x": "wAOQvr92L1m7RwrpeOrgWByVYvWmhRr4fJbiMwHEIdY" + }, + "type": "JsonWebKey2020" + } + ] } - }, - "required": [ - "holderIdentifier", - "verifiableCredentials" - ], - "type": "object" + } + } + } + } + }, + "404": { + "description": "Wallet not found with provided bpn", + "content": { + "application/json": { + "examples": { + "Wallet not found with provided bpn": { + "description": "Wallet not found with provided bpn", + "value": { + "type": "about:blank", + "title": "Wallet not found for identifier BPNL00000000000", + "status": 404, + "detail": "Wallet not found for identifier BPNL00000000000", + "instance": "/BPNL00000000000/did.json", + "properties": { + "timestamp": 1689767698010 + } + } + } + } + } + } + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + } + }, + "security": [ + { + "Authenticate using access_token": [] + } + ] + } + }, + "/api/wallets/{identifier}": { + "get": { + "tags": [ + "Wallets" + ], + "summary": "Retrieve wallet by BPN", + "description": "Permission: **view_wallets** OR **view_wallet** (The BPN of Wallet to retrieve must equal the BPN of caller or Base wallet, authority wallet can see all wallets) \n\n Retrieve single wallet by identifier, with or without its credentials", + "operationId": "getWalletByIdentifier", + "parameters": [ + { + "name": "identifier", + "in": "path", + "description": "Did or BPN", + "required": true, + "schema": { + "type": "string" }, - "VerifiablePresentationDto": { - "properties": { - "@context": { - "items": { - "type": "string" - }, - "type": "array", - "maxItems": 100 - }, - "holder": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "proof": { - "$ref": "#/components/schemas/LdProofDto" - }, - "type": { - "items": { - "type": "string" - }, - "type": "array", - "maxItems": 100 - }, - "verifiableCredential": { - "items": { - "$ref": "#/components/schemas/VerifiableCredentialDto" - }, - "type": "array", - "maxItems": 100 + "examples": { + "bpn": { + "description": "bpn", + "value": "BPNL000000000000" + }, + "did": { + "description": "did", + "value": "did:web:localhost:BPNL000000000000" + } + } + }, + { + "name": "withCredentials", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Wallet Details", + "content": { + "application/json": { + "examples": { + "Wallet details without with credentials false": { + "description": "Wallet details without with credentials false", + "value": { + "name": "companyA", + "did": "did:web:localhost:BPNL000000000001", + "bpn": "BPNL000000000001", + "algorithm": "ED25519", + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://w3c.github.io/vc-jws-2020/contexts/v1" + ], + "id": "did:web:localhost:BPNL000000000001", + "verificationMethod": [ + { + "controller": "did:web:localhost:BPNL000000000001", + "id": "did:web:localhost:BPNL000000000001#", + "publicKeyJwk": { + "crv": "Ed25519", + "kty": "OKP", + "x": "mhph0ZSVk7cDVmazbaaC3jBDpphW4eNygAK9gHPlMow" + }, + "type": "JsonWebKey2020" + } + ] + } } - }, - "required": [ - "@context", - "type" - ], - "type": "object" + }, + "Wallet details without with credentials true": { + "description": "Wallet details without with credentials true", + "value": { + "name": "companyA", + "did": "did:web:localhost:BPNL000000000001", + "bpn": "BPNL000000000001", + "algorithm": "ED25519", + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://w3c.github.io/vc-jws-2020/contexts/v1" + ], + "id": "did:web:localhost:BPNL000000000001", + "verificationMethod": [ + { + "controller": "did:web:localhost:BPNL000000000001", + "id": "did:web:localhost:BPNL000000000001#", + "publicKeyJwk": { + "crv": "Ed25519", + "kty": "OKP", + "x": "mhph0ZSVk7cDVmazbaaC3jBDpphW4eNygAK9gHPlMow" + }, + "type": "JsonWebKey2020" + } + ] + }, + "verifiableCredentials": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:localhost:BPNL000000000000#a1f8ae36-9919-4ed8-8546-535280acc5bf", + "type": [ + "VerifiableCredential", + "BpnCredential" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "issuanceDate": "2023-07-19T09:14:45Z", + "expirationDate": "2023-09-30T18:30:00Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000001", + "id": "did:web:localhost:BPNL000000000001", + "type": "BpnCredential" + } + ], + "proof": { + "created": "2023-07-19T09:14:47Z", + "jws": "eyJhbGciOiJFZERTQSJ9..O69dLGMDVgZQJ7chFx3aUbkJFvibH8WWunw634rIDC77_pdiUHvQpQ0hq15_7OgFMy3dp-9H-pNgxTZ-i4UXCw", + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#" + } + } + ] + } + } + } + } + } + }, + "400": { + "description": "The input does not comply to the syntax requirements", + "content": { + "application/json": { + "examples": { + "Response in case of invalid data provided": { + "description": "Response in case of invalid data provided", + "value": { + "type": "about:blank", + "title": "title", + "status": 400, + "detail": "details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689760833962, + "errors": {} + } + } + } + } + } + } + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden access" + }, + "404": { + "description": "Wallet not found with provided identifier", + "content": { + "application/json": { + "examples": { + "Wallet not found with provided identifier": { + "description": "Wallet not found with provided identifier", + "value": { + "type": "about:blank", + "title": "Wallet not found for identifier did:web:localhost:BPNL0000000501", + "status": 404, + "detail": "Wallet not found for identifier did:web:localhost:BPNL0000000501", + "instance": "/api/wallets/did%3Aweb%3Alocalhost%3ABPNL0000000501", + "properties": { + "timestamp": 1689764377224 + } + } + } + } + } + } + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + } + }, + "security": [ + { + "Authenticate using access_token": [] + } + ] + } + }, + "/api/presentations/iatp": { + "get": { + "tags": [ + "Verifiable Presentations - Generation" + ], + "summary": "Create Verifiable Presentation", + "description": "Create a verifiable presentation for the verifiable credential types listed in STS token", + "operationId": "createPresentation_1", + "parameters": [ + { + "name": "asJwt", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Verifiable Presentation", + "content": { + "application/json": { + "examples": { + "VP as Json-LD": { + "description": "VP as Json-LD", + "value": { + "vp": { + "@context": [ + "https://www.w3.org/2018/credentials/v1" + ], + "id": "did:web:localhost:BPNL000000000000#b2e69e47-95f3-48ff-af30-eaaab36431d5", + "type": [ + "VerifiablePresentation" + ], + "verifiableCredential": [ + { + "id": "did:web:localhost:BPNL000000000000#f73e3631-ba87-4a03-bea3-b28700056879", + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "type": [ + "VerifiableCredential", + "BpnCredential" + ], + "issuer": "did:web:localhost:BPNL000000000000", + "expirationDate": "2024-12-31T18:30:00Z", + "issuanceDate": "2023-07-19T09:11:34Z", + "credentialSubject": [ + { + "bpn": "BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "type": "BpnCredential" + } + ], + "proof": { + "created": "2023-07-19T09:11:39Z", + "jws": "eyJhbGciOiJFZERTQSJ9..fdn2qU85auOltdHDLdHI7sJVV1ZPdftpiXd_ndXN0dFgSDWiIrScdD03wtvKLq_H-shQWfh2RYeMmrlEzAhfDw", + "proofPurpose": "proofPurpose", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:localhost:BPNL000000000000#" + } + } + ] + } + } + }, + "VP as JWT": { + "description": "VP as JWT", + "value": { + "vp": "eyJraWQiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIiwidHlwIjoiSldUIiwiYWxnIjoiRWREU0EifQ.eyJzdWIiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIiwiYXVkIjoic21hcnQiLCJpc3MiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIiwidnAiOnsiaWQiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwIzM4ZTU2ZTg1LTNkODQtNGEyNS1iZjg1LWFiMjRlYzY4MmMwOSIsInR5cGUiOlsiVmVyaWZpYWJsZVByZXNlbnRhdGlvbiJdLCJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ2ZXJpZmlhYmxlQ3JlZGVudGlhbCI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSIsImh0dHBzOi8vY2F0ZW5heC1uZy5naXRodWIuaW8vcHJvZHVjdC1jb3JlLXNjaGVtYXMvYnVzaW5lc3NQYXJ0bmVyRGF0YS5qc29uIiwiaHR0cHM6Ly93M2lkLm9yZy9zZWN1cml0eS9zdWl0ZXMvandzLTIwMjAvdjEiXSwidHlwZSI6WyJWZXJpZmlhYmxlQ3JlZGVudGlhbCIsIkJwbkNyZWRlbnRpYWwiXSwiaWQiOiJkaWQ6d2ViOmxvY2FsaG9zdDpCUE5MMDAwMDAwMDAwMDAwI2Y3M2UzNjMxLWJhODctNGEwMy1iZWEzLWIyODcwMDA1Njg3OSIsImlzc3VlciI6ImRpZDp3ZWI6bG9jYWxob3N0OkJQTkwwMDAwMDAwMDAwMDAiLCJpc3N1YW5jZURhdGUiOiIyMDIzLTA3LTE5VDA5OjExOjM0WiIsImV4cGlyYXRpb25EYXRlIjoiMjAyNC0xMi0zMVQxODozMDowMFoiLCJjcmVkZW50aWFsU3ViamVjdCI6eyJpZCI6ImRpZDp3ZWI6bG9jYWxob3N0OkJQTkwwMDAwMDAwMDAwMDAiLCJicG4iOiJCUE5MMDAwMDAwMDAwMDAwIiwidHlwZSI6IkJwbkNyZWRlbnRpYWwifSwicHJvb2YiOnsicHJvb2ZQdXJwb3NlIjoicHJvb2ZQdXJwb3NlIiwidHlwZSI6Ikpzb25XZWJTaWduYXR1cmUyMDIwIiwidmVyaWZpY2F0aW9uTWV0aG9kIjoiZGlkOndlYjpsb2NhbGhvc3Q6QlBOTDAwMDAwMDAwMDAwMCMiLCJjcmVhdGVkIjoiMjAyMy0wNy0xOVQwOToxMTozOVoiLCJqd3MiOiJleUpoYkdjaU9pSkZaRVJUUVNKOS4uZmRuMnFVODVhdU9sdGRIRExkSEk3c0pWVjFaUGRmdHBpWGRfbmRYTjBkRmdTRFdpSXJTY2REMDN3dHZLTHFfSC1zaFFXZmgyUlllTW1ybEV6QWhmRHcifX19LCJleHAiOjE2ODk4MzQ4MDUsImp0aSI6ImIwODYzOWZiLWQ5MWEtNGUwZS1iNmY4LTYzYjdhMzQ1ZTRhZiJ9.80x0AB-OauefdeZfx1cwhitdVKRvCRFeFzYwU73DL7y4w34vu6BdfHWLBGjkwELxkQEoFfiTPOqtuyqhtsyDBg" + } + } + } + } + } + }, + "401": { + "description": "The request could not be completed due to a failed authorization." + }, + "403": { + "description": "The request could not be completed due to a forbidden scope value" + }, + "404": { + "description": "One or more of the requested verifiable credential types were not found", + "content": { + "application/json": { + "examples": { + "One or more of the requested verifiable credential types were not found": { + "description": "One or more of the requested verifiable credential types were not found", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 404, + "detail": "Verifiable credential types that were not found", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } + } + } + }, + "security": [ + { + "sts_token": [] + } + ] + } + }, + "/api/didDocuments/{identifier}": { + "get": { + "tags": [ + "DIDDocument" + ], + "summary": "Resolve DID Document", + "description": "Resolve the DID document for a given DID or BPN", + "operationId": "getDidDocument", + "parameters": [ + { + "name": "identifier", + "in": "path", + "description": "Did or BPN", + "required": true, + "schema": { + "type": "string" }, - "VerifyResponse": { - "properties": { - "error": { - "type": "string", - "nullable": true - }, - "valid": { - "type": "boolean" - }, - "vp": { - "$ref": "#/components/schemas/VerifiablePresentationDto" + "examples": { + "bpn": { + "description": "bpn", + "value": "BPNL000000000000" + }, + "did": { + "description": "did", + "value": "did:web:localhost:BPNL000000000000" + } + } + } + ], + "responses": { + "200": { + "description": "DID document", + "content": { + "application/json": { + "examples": { + " DID document": { + "description": " DID document", + "value": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://w3c.github.io/vc-jws-2020/contexts/v1" + ], + "id": "did:web:localhost:BPNL000000000000", + "verificationMethod": [ + { + "controller": "did:web:localhost:BPNL000000000000", + "id": "did:web:localhost:BPNL000000000000", + "publicKeyJwk": { + "crv": "Ed25519", + "kty": "OKP", + "x": "wAOQvr92L1m7RwrpeOrgWByVYvWmhRr4fJbiMwHEIdY" + }, + "type": "JsonWebKey2020" + } + ] } - }, - "required": [ - "valid" - ], - "type": "object" + } + } + } + } + }, + "404": { + "description": "Wallet not found with provided bpn", + "content": { + "application/json": { + "examples": { + "Wallet not found with provided bpn": { + "description": "Wallet not found with provided bpn", + "value": { + "type": "about:blank", + "title": "Wallet not found for identifier BPNL00000000000", + "status": 404, + "detail": "Wallet not found for identifier BPNL00000000000", + "instance": "/BPNL00000000000/did.json", + "properties": { + "timestamp": 1689767698010 + } + } + } + } + } + } + }, + "500": { + "description": "Any other internal server error", + "content": { + "application/json": { + "examples": { + "Internal server error": { + "description": "Internal server error", + "value": { + "type": "about:blank", + "title": "Error Title", + "status": 500, + "detail": "Error Details", + "instance": "API endpoint", + "properties": { + "timestamp": 1689762476720 + } + } + } + } + } } + } }, - "securitySchemes": { - "auth-token": { - "bearerFormat": "JWT", - "type": "http", - "scheme": "bearer" + "security": [ + { + "Authenticate using access_token": [] + } + ] + } + } + }, + "components": { + "schemas": { + "CreateWalletRequest": { + "required": [ + "businessPartnerNumber", + "companyName", + "didUrl" + ], + "type": "object", + "properties": { + "businessPartnerNumber": { + "pattern": "^(BPN)(L|S|A)[0-9A-Z]{12}", + "type": "string" + }, + "companyName": { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + "didUrl": { + "maxLength": 2000, + "minLength": 1, + "type": "string" + } + } + }, + "SecureTokenRequest": { + "type": "object", + "properties": { + "audience": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + }, + "grant_type": { + "type": "string" + }, + "access_token": { + "type": "string" + }, + "bearer_access_alias": { + "type": "string" + }, + "bearer_access_scope": { + "type": "string" + } + } + }, + "CredentialVerificationRequest": { + "type": "object", + "properties": { + "jwt": { + "type": "string", + "writeOnly": true + }, + "vc": { + "type": "object", + "additionalProperties": { + "type": "object" + }, + "writeOnly": true + }, + "empty": { + "type": "boolean" + } + }, + "additionalProperties": { + "type": "object" + } + }, + "IssueMembershipCredentialRequest": { + "required": [ + "bpn" + ], + "type": "object", + "properties": { + "bpn": { + "pattern": "^(BPN)(L|S|A)[0-9A-Z]{12}", + "type": "string" + } + } + }, + "IssueFrameworkCredentialRequest": { + "required": [ + "contract-template", + "contract-version", + "holderIdentifier", + "type" + ], + "type": "object", + "properties": { + "holderIdentifier": { + "maxLength": 255, + "minLength": 5, + "type": "string" + }, + "type": { + "type": "string" + }, + "contract-template": { + "type": "string" + }, + "contract-version": { + "type": "string" + } + } + }, + "IssueDismantlerCredentialRequest": { + "required": [ + "activityType", + "bpn" + ], + "type": "object", + "properties": { + "bpn": { + "pattern": "^(BPN)(L|S|A)[0-9A-Z]{12}", + "type": "string" + }, + "activityType": { + "maxLength": 2147483647, + "minLength": 1, + "type": "string" + }, + "allowedVehicleBrands": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" } + } } + } }, - "security": { - "auth-token": {} - }, - "tags": [] -} \ No newline at end of file + "securitySchemes": { + "Authenticate using access_token": { + "type": "apiKey", + "description": "**Bearer (apiKey)**\nJWT Authorization header using the Bearer scheme.\nEnter **Bearer** [space] and then your token in the text input below:\nExample: Bearer 12345abcdef\n", + "name": "Authorization", + "in": "header" + }, + "sts_token": { + "type": "apiKey", + "description": "**STS token**\nJWT Authorization header.\nEnter your token in the text input below:\nExample: 12345abcdef\n", + "name": "Authorization", + "in": "header" + } + } + } +} From 1910e886dd5aace37e55d00858559c51d5ba7659 Mon Sep 17 00:00:00 2001 From: aleksandra-bel Date: Wed, 24 Apr 2024 12:27:43 +0200 Subject: [PATCH 3/5] fix: fix openapi_v001.json --- docs/openapi_v001.json | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/docs/openapi_v001.json b/docs/openapi_v001.json index 2eecd955f..a3c3f0ad9 100644 --- a/docs/openapi_v001.json +++ b/docs/openapi_v001.json @@ -15,20 +15,7 @@ }, "version": "0.0.1" }, - "servers": [ - { - "url": "http://localhost:8000", - "description": "Generated server url" - } - ], - "security": [ - { - "Authenticate using access_token": [] - }, - { - "sts_token": [] - } - ], + "servers": [], "paths": { "/api/wallets": { "get": { @@ -1129,6 +1116,7 @@ "required": false, "schema": { "type": "array", + "maxItems": 100, "items": { "type": "string" } @@ -1955,6 +1943,7 @@ "required": false, "schema": { "type": "array", + "maxItems": 100, "items": { "type": "string" } @@ -3955,6 +3944,7 @@ }, "allowedVehicleBrands": { "uniqueItems": true, + "maxItems": 100, "type": "array", "items": { "type": "string" From c30134e10c4d2aa8ec91afc8ba2d1c1de9eca87b Mon Sep 17 00:00:00 2001 From: aleksandra-bel Date: Wed, 24 Apr 2024 12:40:16 +0200 Subject: [PATCH 4/5] fix: fix openapi_v001.json --- docs/openapi_v001.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/openapi_v001.json b/docs/openapi_v001.json index a3c3f0ad9..7ca85ee0a 100644 --- a/docs/openapi_v001.json +++ b/docs/openapi_v001.json @@ -671,8 +671,7 @@ } } } - }, - "security": [] + } } }, "/api/presentations": { From 068462b992136aedeeaace966910bbcefc10aad3 Mon Sep 17 00:00:00 2001 From: aleksandra-bel Date: Wed, 24 Apr 2024 12:49:13 +0200 Subject: [PATCH 5/5] fix: fix openapi_v001.json --- docs/openapi_v001.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/openapi_v001.json b/docs/openapi_v001.json index 7ca85ee0a..0f7594660 100644 --- a/docs/openapi_v001.json +++ b/docs/openapi_v001.json @@ -15,6 +15,10 @@ }, "version": "0.0.1" }, + "security": [ + {"Authenticate using access_token": []}, + {"sts_token": []} + ], "servers": [], "paths": { "/api/wallets": {