diff --git a/api/account/information/Account-Information-API.json b/api/account/information/Account-Information-API.json index 30f1f29..efe5a48 100644 --- a/api/account/information/Account-Information-API.json +++ b/api/account/information/Account-Information-API.json @@ -2,7 +2,7 @@ "swagger" : "2.0", "info" : { "description" : "Create Account Information Services consuming applications that offer great added value to your customers and users. Our Account Information Service will enable secure access to all European ING online accessible payment accounts.", - "version" : "3.1.4", + "version" : "3.1.5", "title" : "Account Information API", "contact" : { "name" : "ING Developer Portal", @@ -107,6 +107,9 @@ "required" : false, "type" : "integer" } ], + "security" : [ { + "ING-Access-Code-Security" : [ "payment-accounts:balances:view", "payment-accounts:transactions:view" ] + } ], "responses" : { "200" : { "description" : "OK", @@ -194,8 +197,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "403" : { - "description" : "Forbidden", + "500" : { + "description" : "Internal Server Error", "headers" : { "X-Request-ID" : { "type" : "string", @@ -207,8 +210,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "404" : { - "description" : "Not Found or Unauthorised", + "403" : { + "description" : "Forbidden", "headers" : { "X-Request-ID" : { "type" : "string", @@ -220,8 +223,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "405" : { - "description" : "Not Allowed", + "404" : { + "description" : "Not Found or Unauthorised", "headers" : { "X-Request-ID" : { "type" : "string", @@ -233,8 +236,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "406" : { - "description" : "Not Acceptable", + "503" : { + "description" : "Planned Service Unavailability", "headers" : { "X-Request-ID" : { "type" : "string", @@ -246,8 +249,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "500" : { - "description" : "Internal Server Error", + "405" : { + "description" : "Not Allowed", "headers" : { "X-Request-ID" : { "type" : "string", @@ -259,8 +262,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "503" : { - "description" : "Planned Service Unavailability", + "406" : { + "description" : "Not Acceptable", "headers" : { "X-Request-ID" : { "type" : "string", @@ -272,10 +275,7 @@ "$ref" : "#/definitions/TPPMessages" } } - }, - "security" : [ { - "ING-Access-Code-Security" : [ "payment-accounts:balances:view", "payment-accounts:transactions:view" ] - } ] + } } }, "/v3/accounts/{account-id}/transactions" : { @@ -362,6 +362,9 @@ }, "collectionFormat" : "csv" } ], + "security" : [ { + "ING-Access-Code-Security" : [ "payment-accounts:balances:view", "payment-accounts:transactions:view" ] + } ], "responses" : { "200" : { "description" : "OK", @@ -518,8 +521,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "403" : { - "description" : "Forbidden", + "500" : { + "description" : "Internal Server Error", "headers" : { "X-Request-ID" : { "type" : "string", @@ -531,8 +534,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "404" : { - "description" : "Not Found or Unauthorised", + "403" : { + "description" : "Forbidden", "headers" : { "X-Request-ID" : { "type" : "string", @@ -544,8 +547,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "405" : { - "description" : "Not Allowed", + "404" : { + "description" : "Not Found or Unauthorised", "headers" : { "X-Request-ID" : { "type" : "string", @@ -557,8 +560,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "406" : { - "description" : "Not Acceptable", + "503" : { + "description" : "Planned Service Unavailability", "headers" : { "X-Request-ID" : { "type" : "string", @@ -570,8 +573,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "500" : { - "description" : "Internal Server Error", + "405" : { + "description" : "Not Allowed", "headers" : { "X-Request-ID" : { "type" : "string", @@ -583,8 +586,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "503" : { - "description" : "Planned Service Unavailability", + "406" : { + "description" : "Not Acceptable", "headers" : { "X-Request-ID" : { "type" : "string", @@ -596,10 +599,7 @@ "$ref" : "#/definitions/TPPMessages" } } - }, - "security" : [ { - "ING-Access-Code-Security" : [ "payment-accounts:balances:view", "payment-accounts:transactions:view" ] - } ] + } } }, "/v3/accounts/{account-id}/balances" : { @@ -665,6 +665,9 @@ "type" : "string", "pattern" : "[A-Z]{3,3}" } ], + "security" : [ { + "ING-Access-Code-Security" : [ "payment-accounts:balances:view", "payment-accounts:transactions:view" ] + } ], "responses" : { "200" : { "description" : "OK", @@ -705,6 +708,19 @@ "$ref" : "#/definitions/TPPMessages" } }, + "500" : { + "description" : "Internal Server Error", + "headers" : { + "X-Request-ID" : { + "type" : "string", + "description" : "ID of the individual request determined by the initiating party", + "x-ing-type" : "string" + } + }, + "schema" : { + "$ref" : "#/definitions/TPPMessages" + } + }, "403" : { "description" : "Forbidden", "headers" : { @@ -731,6 +747,19 @@ "$ref" : "#/definitions/TPPMessages" } }, + "503" : { + "description" : "Planned Service Unavailability", + "headers" : { + "X-Request-ID" : { + "type" : "string", + "description" : "ID of the individual request determined by the initiating party", + "x-ing-type" : "string" + } + }, + "schema" : { + "$ref" : "#/definitions/TPPMessages" + } + }, "405" : { "description" : "Not Allowed", "headers" : { @@ -756,6 +785,195 @@ "schema" : { "$ref" : "#/definitions/TPPMessages" } + } + } + } + }, + "/v2/accounts/{account-id}/transactions" : { + "get" : { + "tags" : [ "Account Transactions" ], + "summary" : "Account Transactions endpoint", + "description" : "Provides transaction information for a given account.", + "parameters" : [ { + "name" : "account-id", + "in" : "path", + "description" : "Account ID represented by an UUID", + "required" : true, + "type" : "string", + "format" : "uuid" + }, { + "name" : "X-Request-ID", + "in" : "header", + "description" : "ID of the individual request determined by the initiating party (TPP) as UUID", + "required" : true, + "type" : "string", + "format" : "uuid" + }, { + "name" : "Authorization", + "in" : "header", + "description" : "Bearer Token. Represents Customer Access Token. The process to obtain the Customer Access Access Token can be found under Documentation tab. Refer to Authentication section of the Documentation page.", + "required" : true, + "type" : "string" + }, { + "name" : "Signature", + "in" : "header", + "description" : "A signature of the request by the TPP on application level. The process of signing a request is described in 'Signing HTTP Messages' RFC draft version 07 (https://tools.ietf.org/html/draft-cavage-http-signatures-07). The request signature needs to be sent in the 'Signature' HTTP header as described in the RFC. Additional requirements from ING:\n - The allowed algorithms are RSA-SHA256 and the ecdsa-sha256, ecdsa-sha512, ecdsa-sha384 algorithms are supported for Elliptic Curve Digital Signature\n - The key size for the used RSA key pair has to be at least 2048 bit\n - The keyId is the clientId of your application originating from the ING Developer Portal\n - We require the following headers for every request: \"(request-target) Date Digest X-Request-ID\". The request-target is a combination of the HTTP action verb and the request URI path.", + "required" : true, + "type" : "string" + }, { + "name" : "Digest", + "in" : "header", + "description" : "The \"Digest\" Header header as defined in [RFC3230] contains a Hash of the message body. The only hash algorithms that may be used to calculate the Digest within the context of this specification are SHA-256 and SHA-512 as defined in [RFC5843].", + "required" : true, + "type" : "string" + }, { + "name" : "Date", + "in" : "header", + "description" : "Standard http header element for date and time. HTTP headers are represented as RFC 7231 Full Dates.", + "required" : true, + "type" : "string", + "format" : "date-time" + }, { + "name" : "dateFrom", + "in" : "query", + "description" : "Transactions will be returned that have been executed since this date and (optionally) time. The date-time must be provided in UTC ISO 8601 Date Time format: YYYY-MM-DDThh:mm:ss.sTZD and always in UTC timezone. This must be made explicit by providing value Z (for Zulu) as time zone designator. If not provided, a default date and time will be applied which is determined as follows:\n * If dateFrom and dateTo are both not provided, dateFrom is defaulted to today’s date + 00:00:00 in the UTC timezone\n * If dateFrom is not provided and dateTo is provided with a date in the past, dateFrom is defaulted to the date provided in dateTo + 00:00:00 in the UTC timezone\n * If dateFrom is not provided and dateTo is provided with a date equal to or after today’s date, dateFrom is defaulted to today’s date provided in dateTo + 00:00:00 in the UTC timezone\n * If dateFrom is provided with a date but without a time, the time is defaulted to 00:00:00 in the UTC timezone\n * If dateFrom is provided with a date time in the future, the request is rejected\n\nExample: 2018-06-01T09:00:00Z", + "required" : false, + "type" : "string", + "format" : "date-time" + }, { + "name" : "dateTo", + "in" : "query", + "description" : "Transactions will be returned that have been executed until this date and (optionally) time. The date-time must be provided in UTC ISO 8601 Date Time format: YYYY-MM-DDThh:mm:ss.sTZD and always in UTC timezone. This must be made explicit by providing value Z (for Zulu) as time zone designator. If not provided, a default date and time will be applied which is determined as follows:\n * If dateTo and dateFrom are both not provided, dateTo is defaulted to today’s date time + current time in the UTC timezone\n * If dateTo is not provided and dateFrom is provided with a date in the past, dateTo is defaulted to the date provided in dateFrom + 23:59:59 in the UTC timezone\n * If dateTo is not provided and dateFrom is provided with today’s date, dateTo is defaulted to today’s date + current time in the UTC timezone\n * If dateTo is provided with a date in the past, the time is defaulted to 23:59:59 in the UTC timezone\n * If dateTo is provided with a date equal to or after today’s date, the time is defaulted to current time in the UTC timezone\n\nExample: 2018-06-30T18:00:00Z", + "required" : false, + "type" : "string", + "format" : "date-time" + }, { + "name" : "currency", + "in" : "query", + "description" : "3 Letter ISO Currency Code (ISO 4217) for which transactions are requested. Required in case transactions are requested for a multi-currency account.", + "required" : false, + "type" : "string", + "pattern" : "[A-Z]{3,3}" + }, { + "name" : "limit", + "in" : "query", + "description" : "Optional parameter to request the maximum number of transactions on the page, the next page of results can be requested via the next link", + "required" : false, + "type" : "integer" + } ], + "security" : [ { + "ING-Access-Code-Security" : [ "payment-accounts:balances:view", "payment-accounts:transactions:view" ] + } ], + "deprecated" : true, + "responses" : { + "200" : { + "description" : "OK", + "examples" : { + "application/json" : { + "transactions" : { + "booked" : [ { + "transactionId" : "trx123456789", + "endToEndId" : "EndToEndID1234567890", + "bookingDate" : "2017-11-21", + "valueDate" : "2017-11-21", + "executionDateTime" : "2017-11-21T09:16:54.991Z", + "amount" : { + "currency" : "EUR", + "content" : 100.12 + }, + "debtorName" : "Debtor Name", + "debtorAccount" : { + "iban" : "NL69INGB0123456789", + "bban" : 123456789, + "bic" : "INGBNL2A" + }, + "transactionType" : "Sepa Credit Transfer", + "remittanceInformationUnstructured" : "Unstructured remittance information example", + "remittanceInformationStructured" : { + "type" : "SCOR", + "issuer" : "ISO", + "reference" : "RF18539007547034" + } + } ], + "pending" : [ { + "transactionId" : "trx987654321", + "endToEndId" : "EndToEndID1234567890", + "bookingDate" : "2017-11-21", + "valueDate" : "2017-11-21", + "executionDateTime" : "2017-11-21T09:16:54.991Z", + "amount" : { + "currency" : "EUR", + "content" : -100.12 + }, + "creditorName" : "Creditor Name", + "creditorAccount" : { + "iban" : "NL69INGB0123456789", + "bban" : 123456789, + "bic" : "INGBNL2A" + }, + "transactionType" : "Sepa Credit Transfer", + "remittanceInformationUnstructured" : "Unstructured remittance information example", + "remittanceInformationStructured" : { + "type" : "SCOR", + "issuer" : "ISO", + "reference" : "RF18539007547034" + } + } ], + "_links" : { + "next" : { + "href" : "/v2/accounts/7de0041d-4f25-4b6c-a885-0bbeb1eab220/transactions?next=CQR23TABC" + } + } + } + } + }, + "headers" : { + "X-Request-ID" : { + "type" : "string", + "description" : "ID of the individual request determined by the initiating party", + "x-ing-type" : "string" + }, + "X-ING-AIS-TRANSACTION-VALIDITY-PERIOD" : { + "type" : "string", + "description" : "For the countries where there is transaction history period is defined, this header value holds such defined transaction history period. For countries where there is no transaction history period defined, this header is not returned. Check the Documentation tab for country-specific transaction history period.", + "x-ing-type" : "string" + }, + "X-ING-AIS-ADJUSTED-DATEFROM" : { + "type" : "string", + "format" : "date-time", + "description" : "For the countries where transaction history period is defined and where the from date (dateFrom) is before the transaction history period, this header holds the value of the adjusted from date which was used to fetch the transaction result. If the from date (dateFrom) is after the transaction history period, this header will not be returned.", + "x-ing-type" : "string" + } + }, + "schema" : { + "$ref" : "#/definitions/TransactionsResponse" + } + }, + "400" : { + "description" : "Bad Request", + "headers" : { + "X-Request-ID" : { + "type" : "string", + "description" : "ID of the individual request determined by the initiating party", + "x-ing-type" : "string" + } + }, + "schema" : { + "$ref" : "#/definitions/TPPMessages" + } + }, + "401" : { + "description" : "Unauthorised", + "headers" : { + "X-Request-ID" : { + "type" : "string", + "description" : "ID of the individual request determined by the initiating party", + "x-ing-type" : "string" + } + }, + "schema" : { + "$ref" : "#/definitions/TPPMessages" + } }, "500" : { "description" : "Internal Server Error", @@ -770,6 +988,32 @@ "$ref" : "#/definitions/TPPMessages" } }, + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-ID" : { + "type" : "string", + "description" : "ID of the individual request determined by the initiating party", + "x-ing-type" : "string" + } + }, + "schema" : { + "$ref" : "#/definitions/TPPMessages" + } + }, + "404" : { + "description" : "Not Found or Unauthorised", + "headers" : { + "X-Request-ID" : { + "type" : "string", + "description" : "ID of the individual request determined by the initiating party", + "x-ing-type" : "string" + } + }, + "schema" : { + "$ref" : "#/definitions/TPPMessages" + } + }, "503" : { "description" : "Planned Service Unavailability", "headers" : { @@ -782,11 +1026,34 @@ "schema" : { "$ref" : "#/definitions/TPPMessages" } + }, + "405" : { + "description" : "Not Allowed", + "headers" : { + "X-Request-ID" : { + "type" : "string", + "description" : "ID of the individual request determined by the initiating party", + "x-ing-type" : "string" + } + }, + "schema" : { + "$ref" : "#/definitions/TPPMessages" + } + }, + "406" : { + "description" : "Not Acceptable", + "headers" : { + "X-Request-ID" : { + "type" : "string", + "description" : "ID of the individual request determined by the initiating party", + "x-ing-type" : "string" + } + }, + "schema" : { + "$ref" : "#/definitions/TPPMessages" + } } - }, - "security" : [ { - "ING-Access-Code-Security" : [ "payment-accounts:balances:view", "payment-accounts:transactions:view" ] - } ] + } } }, "/v3/accounts" : { @@ -827,6 +1094,9 @@ "type" : "string", "format" : "date-time" } ], + "security" : [ { + "ING-Access-Code-Security" : [ "payment-accounts:balances:view", "payment-accounts:transactions:view" ] + } ], "responses" : { "200" : { "description" : "OK", @@ -886,8 +1156,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "404" : { - "description" : "Not Found or Unauthorised", + "500" : { + "description" : "Internal Server Error", "headers" : { "X-Request-ID" : { "type" : "string", @@ -899,8 +1169,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "405" : { - "description" : "Not Allowed", + "404" : { + "description" : "Not Found or Unauthorised", "headers" : { "X-Request-ID" : { "type" : "string", @@ -912,8 +1182,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "406" : { - "description" : "Not Acceptable", + "405" : { + "description" : "Not Allowed", "headers" : { "X-Request-ID" : { "type" : "string", @@ -925,8 +1195,8 @@ "$ref" : "#/definitions/TPPMessages" } }, - "500" : { - "description" : "Internal Server Error", + "406" : { + "description" : "Not Acceptable", "headers" : { "X-Request-ID" : { "type" : "string", @@ -938,10 +1208,7 @@ "$ref" : "#/definitions/TPPMessages" } } - }, - "security" : [ { - "ING-Access-Code-Security" : [ "payment-accounts:balances:view", "payment-accounts:transactions:view" ] - } ] + } } } }, @@ -1238,7 +1505,7 @@ }, "Transactions" : { "type" : "object", - "required" : [ "booked", "info", "pending", "standingOrderAgreementInformation" ], + "required" : [ "booked", "info", "pending" ], "properties" : { "booked" : { "type" : "array", @@ -1264,14 +1531,6 @@ "minItems" : 0, "x-ing-type" : "array" }, - "standingOrderAgreementInformation" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/StandingOrderAgreements" - }, - "minItems" : 0, - "x-ing-type" : "array" - }, "_links" : { "$ref" : "#/definitions/LinksNext" } @@ -1448,6 +1707,16 @@ } } }, + "HrefType" : { + "type" : "object", + "properties" : { + "href" : { + "type" : "string", + "description" : "Link to get a resource", + "x-ing-type" : "string" + } + } + }, "BalancesResponse" : { "type" : "object", "required" : [ "balances" ], @@ -1487,16 +1756,6 @@ } } }, - "HrefType" : { - "type" : "object", - "properties" : { - "href" : { - "type" : "string", - "description" : "Link to get a resource", - "x-ing-type" : "string" - } - } - }, "Balance" : { "type" : "object", "required" : [ "balanceAmount", "balanceType" ], diff --git a/api/showcase/Showcase-API.json b/api/showcase/Showcase-API.json index 237b517..2e5e1c6 100644 --- a/api/showcase/Showcase-API.json +++ b/api/showcase/Showcase-API.json @@ -1,108 +1,559 @@ { - "swagger" : "2.0", + "openapi" : "3.0.1", "info" : { - "description" : "The API shows the Open Banking Platform in operation through its endpoints. It is available on the marketplace to subscribe to, and it is accessible to internal and external applications. The endpoints corresponding to each flavour of interacting with Open Banking API's:\n- no signature (MTLS-only) `/mtls-only/greetings`\n- signature (JWS) `/signed/greetings`\n- Still in use but soon to be replaced by the JWS signature, HTTP signature `/greetings/single`", - "version" : "2.1.2", "title" : "Showcase API", + "description" : "The API shows the Open Banking Platform in operation through its endpoints. It is available on the marketplace to subscribe to, and it is accessible to internal and external applications. The endpoints corresponding to each flavour of interacting with Open Banking API's:\n- `/mtls-only/greetings`: no signature (MTLS-only)\n- `/signed/greetings`: signature (JWS)\n- `/greetings/single`: still in use but soon to be replaced by the JWS signature, HTTP signature", "contact" : { "name" : "ING Developer Portal", "url" : "https://developer.ing.com", "email" : "apis@ing.com" - } + }, + "version" : "3.1.1" }, - "host" : "api.ing.com", - "basePath" : "/", + "servers" : [ { + "url" : "https://api.ing.com" + } ], + "security" : [ { + "ING-Application-Security" : [ "greetings:view" ] + } ], "tags" : [ { - "name" : "greetings" + "name" : "Showcase API", + "description" : "Returns a message generated with a unique id and a timestamp indicating when it was produced." } ], - "schemes" : [ "https" ], "paths" : { - "/greetings/single" : { + "/signed/greetings" : { "get" : { - "tags" : [ "greetings" ], + "tags" : [ "Showcase API" ], "summary" : "Gives a greeting message from one of the available instances", - "description" : "Returns a message generated with a unique id and a timestamp indicating when it was produced.\n ## Deprecation note:\nWe are moving from HTTP signature. You still can use this endpoint in cases where you plan to consume endpoints that require HTTP signature. But over time, all endpoints will require either JWS-signature or no signature at all (MTLS-only). If you plan to consume such endpoints, please use `/signed/greetings` or `/mtls-only/greetings` respectively", - "operationId" : "greetingsSingleGet", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], + "description" : "Returns a message generated with a unique id and a timestamp indicating when it was produced.", + "operationId" : "signedGreetingsGet", "parameters" : [ { "name" : "Authorization", "in" : "header", - "description" : "OAuth2 token", + "description" : "OAuth2 Token.", "required" : true, - "type" : "string" + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "x-ing-type" : "string" + } }, { - "name" : "Signature", + "name" : "X-JWS-Signature", "in" : "header", - "description" : "An HTTP signature of the request by the third party on application level. See \"Get Started\" for more information on how to generate.", + "description" : "A JWS signature of the request by the third party on application level. See \"Get Started\" for more information on how to generate", "required" : true, - "type" : "string" + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "x-ing-type" : "string" + } }, { "name" : "Digest", "in" : "header", "description" : "SHA256 of the body.", "required" : true, - "type" : "string" + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "x-ing-type" : "string" + } }, { "name" : "Date", "in" : "header", - "description" : "Standard http header element for date and time", + "description" : "Standard http header element for date and time.", "required" : true, - "type" : "string", - "format" : "date-time" + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "format" : "date-time", + "x-ing-type" : "string" + } } ], "responses" : { - "200" : { - "description" : "OK", - "headers" : { - "X-ING-ReqID" : { - "type" : "string", - "description" : "Request ID, can be a UUID", - "x-ing-type" : "string" - }, - "X-ING-Response-ID" : { - "type" : "string", - "description" : "Response UUID, if X-ING-ReqID supplied in the request", - "x-ing-type" : "string" - }, - "Signature" : { - "type" : "string", - "description" : "A signature of the response based on X-ING-ReqID and X-ING-Response-ID. This header is deprecated", - "x-ing-type" : "string" + "500" : { + "description" : "Internal Server Error - Something went wrong on the server, check status site and/or report the issue. There's no need to really specify this any further (other than 503 below) as the client is powerless in fixing the condition that caused the error.", + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } } - }, - "schema" : { - "$ref" : "#/definitions/Greeting" } }, "400" : { "description" : "Bad Request - The request was malformed, headers may be missing or invalid.", - "schema" : { - "$ref" : "#/definitions/Error" - } - }, - "401" : { - "description" : "Unauthorized - The request did not contain authorisation evidence. A valid subscription to the scope(s) that contain this API endpoint is required to allow the request to succeed.", - "schema" : { - "$ref" : "#/definitions/Error" + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } + } } }, "404" : { "description" : "Not Found - The requested resource cannot be found. Check the request URL if it matches with the endpoint described.", - "schema" : { - "$ref" : "#/definitions/Error" + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } + } } }, - "500" : { - "description" : "Internal Server Error - Something went wrong on the server, check status site and/or report the issue. There's no need to really specify this any further (other than 503 below) as the client is powerless in fixing the condition that caused the error.", - "schema" : { - "$ref" : "#/definitions/Error" + "401" : { + "description" : "Unauthorized - The request did not contain authorisation evidence. A valid subscription to the scope(s) that contain this API endpoint is required to allow the request to succeed.", + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } + } + } + }, + "200" : { + "description" : "OK", + "headers" : { + "X-ING-Response-ID" : { + "description" : "Response UUID, if X-ING-ReqID supplied in the request", + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "x-ing-type" : "string" + } + }, + "X-ING-ReqID" : { + "description" : "Request ID, can be a UUID", + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "x-ing-type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "required" : [ "id", "message", "messageTimestamp" ], + "type" : "object", + "properties" : { + "message" : { + "type" : "string", + "description" : "A greeting message.", + "example" : "Welcome to ING!", + "x-ing-type" : "string" + }, + "id" : { + "type" : "string", + "description" : "A generated UUID.", + "example" : "aba4b176-8834-467d-9c2a-ee6acfc8fceb", + "x-ing-type" : "string" + }, + "messageTimestamp" : { + "type" : "string", + "description" : "The current time (GMT).", + "example" : "2023-07-30 15:42:17 GMT", + "x-ing-type" : "string" + } + }, + "x-ing-type" : "object" + } + } } }, "503" : { "description" : "Service Unavailable - The API is temporarily unavailable. This is the only 500 code that allows for the client to try and remedy the condition (i.e. by retrying).", - "schema" : { - "$ref" : "#/definitions/Error" + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } + } } } }, @@ -113,71 +564,503 @@ }, "/mtls-only/greetings" : { "get" : { - "tags" : [ "greetings" ], + "tags" : [ "Showcase API" ], "summary" : "Gives a greeting message from one of the available instances", "description" : "Returns a message generated with a unique id and a timestamp indicating when it was produced.", "operationId" : "mtlsOnlyGreetingsGet", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], "parameters" : [ { "name" : "Authorization", "in" : "header", - "description" : "OAuth2 token", + "description" : "OAuth2 Token", "required" : true, - "type" : "string" + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "x-ing-type" : "string" + } } ], "responses" : { - "200" : { - "description" : "OK", - "headers" : { - "X-ING-ReqID" : { - "type" : "string", - "description" : "Request ID, can be a UUID", - "x-ing-type" : "string" - }, - "X-ING-Response-ID" : { - "type" : "string", - "description" : "Response UUID, if X-ING-ReqID supplied in the request", - "x-ing-type" : "string" - }, - "Signature" : { - "type" : "string", - "description" : "A signature of the response based on X-ING-ReqID and X-ING-Response-ID. This header is deprecated", - "x-ing-type" : "string" + "500" : { + "description" : "Internal Server Error - Something went wrong on the server, check status site and/or report the issue. There's no need to really specify this any further (other than 503 below) as the client is powerless in fixing the condition that caused the error.", + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } } - }, - "schema" : { - "$ref" : "#/definitions/Greeting" } }, "400" : { "description" : "Bad Request - The request was malformed, headers may be missing or invalid.", - "schema" : { - "$ref" : "#/definitions/Error" - } - }, - "401" : { - "description" : "Unauthorized - The request did not contain authorisation evidence. A valid subscription to the scope(s) that contain this API endpoint is required to allow the request to succeed.", - "schema" : { - "$ref" : "#/definitions/Error" + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } + } } }, "404" : { "description" : "Not Found - The requested resource cannot be found. Check the request URL if it matches with the endpoint described.", - "schema" : { - "$ref" : "#/definitions/Error" + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } + } } }, - "500" : { - "description" : "Internal Server Error - Something went wrong on the server, check status site and/or report the issue. There's no need to really specify this any further (other than 503 below) as the client is powerless in fixing the condition that caused the error.", - "schema" : { - "$ref" : "#/definitions/Error" + "401" : { + "description" : "Unauthorized - The request did not contain authorisation evidence. A valid subscription to the scope(s) that contain this API endpoint is required to allow the request to succeed.", + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } + } + } + }, + "200" : { + "description" : "OK", + "headers" : { + "X-ING-Response-ID" : { + "description" : "Response UUID, if X-ING-ReqID supplied in the request", + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "x-ing-type" : "string" + } + }, + "X-ING-ReqID" : { + "description" : "Request ID, can be a UUID", + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "x-ing-type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "required" : [ "id", "message", "messageTimestamp" ], + "type" : "object", + "properties" : { + "message" : { + "type" : "string", + "description" : "A greeting message.", + "example" : "Welcome to ING!", + "x-ing-type" : "string" + }, + "id" : { + "type" : "string", + "description" : "A generated UUID.", + "example" : "aba4b176-8834-467d-9c2a-ee6acfc8fceb", + "x-ing-type" : "string" + }, + "messageTimestamp" : { + "type" : "string", + "description" : "The current time (GMT).", + "example" : "2023-07-30 15:42:17 GMT", + "x-ing-type" : "string" + } + }, + "x-ing-type" : "object" + } + } } }, "503" : { "description" : "Service Unavailable - The API is temporarily unavailable. This is the only 500 code that allows for the client to try and remedy the condition (i.e. by retrying).", - "schema" : { - "$ref" : "#/definitions/Error" + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } + } } } }, @@ -186,221 +1069,705 @@ } ] } }, - "/signed/greetings" : { + "/greetings/single" : { "get" : { - "tags" : [ "greetings" ], + "tags" : [ "Showcase API" ], "summary" : "Gives a greeting message from one of the available instances", - "description" : "Returns a message generated with a unique id and a timestamp indicating when it was produced.", - "operationId" : "signedGreetingsGet", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], + "description" : "Returns a message generated with a unique id and a timestamp indicating when it was produced.\n ## Deprecation note:\nWe are moving from HTTP signature. You still can use this endpoint in cases where you plan to consume endpoints that \nrequire HTTP signature. But over time, all endpoints will require either JWS-signature or no signature \nat all (MTLS-only). If you plan to consume such endpoints, \nplease use `/signed/greetings` or `/mtls-only/greetings` respectively", + "operationId" : "greetingsSingleGet", "parameters" : [ { "name" : "Authorization", "in" : "header", - "description" : "OAuth2 token", + "description" : "OAuth2 Token", "required" : true, - "type" : "string" + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "x-ing-type" : "string" + } }, { - "name" : "X-JWS-Signature", + "name" : "Signature", "in" : "header", - "description" : "A JWS signature of the request by the third party on application level. See \"Get Started\" for more information on how to generate.", + "description" : "An HTTP signature of the request by the third party on application level. See \"Get Started\" for more information on how to generate.", "required" : true, - "type" : "string" + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "x-ing-type" : "string" + } }, { "name" : "Digest", "in" : "header", "description" : "SHA256 of the body.", "required" : true, - "type" : "string" + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "x-ing-type" : "string" + } }, { "name" : "Date", "in" : "header", - "description" : "Standard http header element for date and time", + "description" : "Standard http header element for date and time.", "required" : true, - "type" : "string", - "format" : "date-time" + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "format" : "date-time", + "x-ing-type" : "string" + } } ], "responses" : { - "200" : { - "description" : "OK", - "headers" : { - "X-ING-ReqID" : { - "type" : "string", - "description" : "Request ID, can be a UUID", - "x-ing-type" : "string" - }, - "X-ING-Response-ID" : { - "type" : "string", - "description" : "Response UUID, if X-ING-ReqID supplied in the request", - "x-ing-type" : "string" - }, - "Signature" : { - "type" : "string", - "description" : "A signature of the response based on X-ING-ReqID and X-ING-Response-ID. This header is deprecated", - "x-ing-type" : "string" + "500" : { + "description" : "Internal Server Error - Something went wrong on the server, check status site and/or report the issue. There's no need to really specify this any further (other than 503 below) as the client is powerless in fixing the condition that caused the error.", + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } } - }, - "schema" : { - "$ref" : "#/definitions/Greeting" } }, "400" : { "description" : "Bad Request - The request was malformed, headers may be missing or invalid.", - "schema" : { - "$ref" : "#/definitions/Error" - } - }, - "401" : { - "description" : "Unauthorized - The request did not contain authorisation evidence. A valid subscription to the scope(s) that contain this API endpoint is required to allow the request to succeed.", - "schema" : { - "$ref" : "#/definitions/Error" + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } + } } }, "404" : { "description" : "Not Found - The requested resource cannot be found. Check the request URL if it matches with the endpoint described.", - "schema" : { - "$ref" : "#/definitions/Error" + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } + } } }, - "500" : { - "description" : "Internal Server Error - Something went wrong on the server, check status site and/or report the issue. There's no need to really specify this any further (other than 503 below) as the client is powerless in fixing the condition that caused the error.", - "schema" : { - "$ref" : "#/definitions/Error" + "401" : { + "description" : "Unauthorized - The request did not contain authorisation evidence. A valid subscription to the scope(s) that contain this API endpoint is required to allow the request to succeed.", + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } + } + } + }, + "200" : { + "description" : "OK", + "headers" : { + "X-ING-Response-ID" : { + "description" : "Response UUID, if X-ING-ReqID supplied in the request", + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "x-ing-type" : "string" + } + }, + "X-ING-ReqID" : { + "description" : "Request ID, can be a UUID", + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "x-ing-type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "required" : [ "id", "message", "messageTimestamp" ], + "type" : "object", + "properties" : { + "message" : { + "type" : "string", + "description" : "A greeting message.", + "example" : "Welcome to ING!", + "x-ing-type" : "string" + }, + "id" : { + "type" : "string", + "description" : "A generated UUID.", + "example" : "aba4b176-8834-467d-9c2a-ee6acfc8fceb", + "x-ing-type" : "string" + }, + "messageTimestamp" : { + "type" : "string", + "description" : "The current time (GMT).", + "example" : "2023-07-30 15:42:17 GMT", + "x-ing-type" : "string" + } + }, + "x-ing-type" : "object" + } + } } }, "503" : { "description" : "Service Unavailable - The API is temporarily unavailable. This is the only 500 code that allows for the client to try and remedy the condition (i.e. by retrying).", - "schema" : { - "$ref" : "#/definitions/Error" + "content" : { + "application/json" : { + "schema" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } + }, + "description" : "Error message.", + "x-ing-type" : "object" + } + } } } }, + "deprecated" : true, "security" : [ { "ING-Application-Security" : [ "greetings:view" ] } ] } } }, - "securityDefinitions" : { - "ING-Application-Security" : { - "type" : "oauth2", - "tokenUrl" : "https://api.ing.com/oauth2/token", - "flow" : "application", - "scopes" : { - "greetings:view" : "Get greetings messages." - } - } - }, - "definitions" : { - "Greeting" : { - "type" : "object", - "required" : [ "id", "message", "messageTimestamp" ], - "properties" : { - "messageTimestamp" : { - "type" : "string", - "example" : "2018-07-30 15:42:17 GMT", - "description" : "The current time (GMT)", - "x-ing-type" : "string" - }, - "message" : { - "type" : "string", - "example" : "Welcome to ING!", - "description" : "A greeting message", - "x-ing-type" : "string" - }, - "id" : { - "type" : "string", - "example" : "aba4b176-8834-467d-9c2a-ee6acfc8fceb", - "description" : "A generated uuid", - "x-ing-type" : "string" - } - } - }, - "Error" : { - "type" : "object", - "required" : [ "error" ], - "properties" : { - "error" : { - "$ref" : "#/definitions/ErrorModel" - } - } - }, - "ErrorModel" : { - "type" : "object", - "required" : [ "code", "message", "severity" ], - "properties" : { - "innerErrors" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/InnerErrors" + "components" : { + "schemas" : { + "Error" : { + "required" : [ "code", "innerErrors", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" }, - "x-ing-type" : "array" - }, - "message" : { - "type" : "string", - "example" : "Unexpected end of file (missing a terminator/close bracket?)", - "description" : "A descriptive error message for the consumer", - "x-ing-type" : "string" - }, - "target" : { - "type" : "string", - "description" : "Key/value pair indicating which input property caused the error", - "x-ing-type" : "string" - }, - "code" : { - "type" : "string", - "example" : "errParseFailed", - "description" : "Service-specific error code/keyword", - "x-ing-type" : "string" - }, - "source" : { - "type" : "string", - "example" : "system76", - "description" : "Optional source descriptor for this error", - "x-ing-type" : "string" + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + }, + "innerErrors" : { + "minItems" : 0, + "type" : "array", + "items" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } + }, + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "x-ing-type" : "array" + } }, - "severity" : { - "type" : "string", - "enum" : [ "critical", "error", "warning", "info" ], - "x-ing-type" : "string" - } + "description" : "Error message.", + "x-ing-type" : "object" }, - "description" : "Error message" - }, - "InnerErrors" : { - "type" : "object", - "required" : [ "code", "message", "severity" ], - "properties" : { - "message" : { - "type" : "string", - "example" : "Unexpected end of file (missing a terminator/close bracket?)", - "description" : "A descriptive error message for the consumer", - "x-ing-type" : "string" - }, - "target" : { - "type" : "string", - "description" : "Key/value pair indicating which input property caused the error", - "x-ing-type" : "string" - }, - "code" : { - "type" : "string", - "example" : "errParseFailed", - "description" : "Service-specific error code/keyword", - "x-ing-type" : "string" + "InnerError" : { + "required" : [ "code", "message", "severity" ], + "type" : "object", + "properties" : { + "severity" : { + "type" : "string", + "example" : "CRITICAL", + "enum" : [ "CRITICAL", "ERROR", "WARNING", "INFO" ], + "x-ing-type" : "string" + }, + "code" : { + "type" : "string", + "description" : "Service-specific error code/keyword", + "example" : "errParseFailed", + "x-ing-type" : "string" + }, + "message" : { + "type" : "string", + "description" : "A descriptive error message for the consumer", + "example" : "Unexpected end of file (missing a terminator/close bracket?)", + "x-ing-type" : "string" + }, + "source" : { + "type" : "string", + "description" : "Optional source descriptor for this error", + "example" : "system76", + "x-ing-type" : "string" + }, + "target" : { + "type" : "string", + "description" : "Key/value pair indicating which input property caused the error", + "x-ing-type" : "string" + } }, - "source" : { - "type" : "string", - "example" : "system76", - "description" : "Optional source descriptor for this error", - "x-ing-type" : "string" + "description" : "Upstream error messages and detailed information on error state", + "x-ing-type" : "object" + }, + "Greeting" : { + "required" : [ "id", "message", "messageTimestamp" ], + "type" : "object", + "properties" : { + "message" : { + "type" : "string", + "description" : "A greeting message.", + "example" : "Welcome to ING!", + "x-ing-type" : "string" + }, + "id" : { + "type" : "string", + "description" : "A generated UUID.", + "example" : "aba4b176-8834-467d-9c2a-ee6acfc8fceb", + "x-ing-type" : "string" + }, + "messageTimestamp" : { + "type" : "string", + "description" : "The current time (GMT).", + "example" : "2023-07-30 15:42:17 GMT", + "x-ing-type" : "string" + } }, - "severity" : { - "type" : "string", - "enum" : [ "critical", "error", "warning", "info" ], - "x-ing-type" : "string" + "x-ing-type" : "object" + } + }, + "securitySchemes" : { + "ING-Application-Security" : { + "type" : "oauth2", + "flows" : { + "clientCredentials" : { + "tokenUrl" : "https://api.ing.com/oauth2/token", + "scopes" : { + "greetings:view" : "Get greetings messages." + } + } } - }, - "description" : "Upstream error messages and detailed information on error state" + } } } } \ No newline at end of file diff --git a/java/open-banking-common/src/main/java/com/ing/developer/common/clients/OpenBankingOAuthApi.java b/java/open-banking-common/src/main/java/com/ing/developer/common/clients/OpenBankingOAuthApi.java index 2a43b1a..bd59e8a 100644 --- a/java/open-banking-common/src/main/java/com/ing/developer/common/clients/OpenBankingOAuthApi.java +++ b/java/open-banking-common/src/main/java/com/ing/developer/common/clients/OpenBankingOAuthApi.java @@ -19,6 +19,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; +import java.util.UUID; import static com.ing.developer.common.Utils.getTimeStamp; @@ -53,7 +54,7 @@ public String getConsentUri(String redirectUri, String scope, String countryCode String signature = Signing.sign(getFeatSigner(clientId), "get", path, getMandatoryHeaders(digest, date)).toString().substring("Signature ".length()); try { AuthorizationURLResponse response = client.authorizationServerUrlUsingGET("Bearer " + token.getAccessToken(), signature, date, digest, scope, redirectUri, countryCode); - return response.getLocation() + "?client_id=" + clientId + "&scope=" + scope.replace(" ", "%20") + "&redirect_uri=" + redirectUri; + return response.getLocation() + "?client_id=" + clientId + "&scope=" + scope.replace(" ", "%20") + "&redirect_uri=" + redirectUri + "&state=" + UUID.randomUUID(); } catch (ApiException e) { return Utils.throwHttpExceptionBasedOnStatusCode(e.getCode(), "", e.getMessage()); }