From 27732f92bf3fe430aea937ab39735c3d9d6dd9f0 Mon Sep 17 00:00:00 2001 From: "guillaume.francois" Date: Sat, 25 Nov 2023 18:02:20 +0100 Subject: [PATCH] Addition of CorrelationId and RequestId headers on all req/res + minor fixes --- .../ccp/ccp.api.v1.contractDataByEmaid.json | 85 +++++---- .../ccp/ccp.api.v1.contractDataByPcid.json | 35 ++-- .../ccp/ccp.api.v1.signedContractData.json | 89 +++++----- .../ccp.api.v1.signedContractDataByEmaid.json | 114 ++++++------ ...i.v1.signedContractDataByEmaidAndPcid.json | 153 ++++++++-------- ...p.api.v1.signedContractDataSetDefault.json | 31 +++- ...ps.api.v1.contractDataGenerateAndSign.json | 150 +++++++++------- .../apis/cps/cps.api.v1.contractDataSign.json | 37 ++-- .../apis/cps/cps.api.v1.cpsCertificates.json | 104 +++++------ .../apis/event/event.api.v1.endpoints.json | 162 +++++++++-------- .../event/event.api.v1.endpointsById.json | 116 +++++++++--- .../pcp/pcp.api.v1.lookupVehicleByPcid.json | 165 +++++++++++------- ....api.v1.provisioningCertificateByPcid.json | 95 +++++++--- .../pcp.api.v1.provisioningCertificates.json | 34 +++- .../apis/pki/pki.api.v1.cacerts.json | 29 ++- .../apis/pki/pki.api.v1.revokeCert.json | 112 +++++++----- .../apis/pki/pki.api.v1.simpleenroll.json | 48 +++-- .../rcp/rcp.api.v1.rootCertificateById.json | 78 +++++++-- .../apis/rcp/rcp.api.v1.rootcertificates.json | 125 +++++++++---- .../headers/opncCorrelationId.v1.json | 9 + .../parameters/headers/opncRequestId.v1.json | 9 + .../responses/errorResponses/BadGataway.json | 11 ++ .../responses/errorResponses/BadRequest.json | 18 ++ .../responses/errorResponses/Forbidden.json | 11 ++ .../errorResponses/InternalServerError.json | 11 ++ .../responses/errorResponses/NotFound.json | 18 ++ .../errorResponses/ServiceUnavailable.json | 11 ++ .../errorResponses/Unauthorized.json | 11 ++ .../responses/getRootCertificateRes.v1.json | 2 +- .../components/schemas/error.v1.json | 4 - 30 files changed, 1208 insertions(+), 669 deletions(-) create mode 100644 specification/components/parameters/headers/opncCorrelationId.v1.json create mode 100644 specification/components/parameters/headers/opncRequestId.v1.json create mode 100644 specification/components/responses/errorResponses/BadGataway.json create mode 100644 specification/components/responses/errorResponses/BadRequest.json create mode 100644 specification/components/responses/errorResponses/Forbidden.json create mode 100644 specification/components/responses/errorResponses/InternalServerError.json create mode 100644 specification/components/responses/errorResponses/NotFound.json create mode 100644 specification/components/responses/errorResponses/ServiceUnavailable.json create mode 100644 specification/components/responses/errorResponses/Unauthorized.json diff --git a/specification/apis/ccp/ccp.api.v1.contractDataByEmaid.json b/specification/apis/ccp/ccp.api.v1.contractDataByEmaid.json index e93913e..a7fbc35 100644 --- a/specification/apis/ccp/ccp.api.v1.contractDataByEmaid.json +++ b/specification/apis/ccp/ccp.api.v1.contractDataByEmaid.json @@ -7,6 +7,12 @@ "GetContractDataByEmaid" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -46,54 +52,45 @@ } ], "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/responses/getContractDataRes.v1.json" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" + "200": { + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } }, - "examples": { - "Invalid EMAID": { - "value": { - "errorMessages": [ - "emaid : must match \"^[A-Za-z]{2}[-]?\\w{3}[-]?\\w{9,28}[-]?(\\w{1})?$\"" - ], - "traceId": "02be5c05-298b-4503-a685-8126951e0233" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "../../components/responses/getContractDataRes.v1.json" + } } - } } - } + }, + "400": { + "$ref": "../../components/responses/errorResponses/BadRequest.json" + }, + "401": { + "$ref": "../../components/responses/errorResponses/Unauthorized.json" + }, + "403": { + "$ref": "../../components/responses/errorResponses/Forbidden.json" + }, + "404": { + "$ref": "../../components/responses/errorResponses/NotFound.json" + }, + "500": { + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "Internal Server Error" - }, - "502": { - "description": "Bad Gateway" - }, - "503": { - "description": "Service Unavailable" - } } } } \ No newline at end of file diff --git a/specification/apis/ccp/ccp.api.v1.contractDataByPcid.json b/specification/apis/ccp/ccp.api.v1.contractDataByPcid.json index ea5dcbb..eb86499 100644 --- a/specification/apis/ccp/ccp.api.v1.contractDataByPcid.json +++ b/specification/apis/ccp/ccp.api.v1.contractDataByPcid.json @@ -7,6 +7,12 @@ "GetContractDataByPcid" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -39,6 +45,14 @@ ], "responses": { "200": { + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, "description": "OK", "content": { "application/json": { @@ -49,32 +63,25 @@ } }, "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" - } - } - } + "$ref": "../../components/responses/errorResponses/BadRequest.json" }, "401": { - "description": "Unauthorized" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Forbidden.json" }, "404": { - "description": "Not Found" + "$ref": "../../components/responses/errorResponses/NotFound.json" }, "500": { - "description": "Internal Server Error" + "$ref": "../../components/responses/errorResponses/InternalServerError.json" }, "502": { - "description": "Bad Gateway" + "$ref": "../../components/responses/errorResponses/BadGataway.json" }, "503": { - "description": "Service Unavailable" + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } } diff --git a/specification/apis/ccp/ccp.api.v1.signedContractData.json b/specification/apis/ccp/ccp.api.v1.signedContractData.json index a5fe7d9..7aca8c0 100644 --- a/specification/apis/ccp/ccp.api.v1.signedContractData.json +++ b/specification/apis/ccp/ccp.api.v1.signedContractData.json @@ -7,6 +7,12 @@ "GetSignedContractDataByCertificateInstallationReq" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -46,6 +52,14 @@ "responses": { "200": { "description": "OK", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, "content": { "application/json": { "schema": { @@ -55,49 +69,25 @@ } }, "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" - }, - "examples": { - "Invalid EXI": { - "value": { - "errorMessages": [ - "EXI format is invalid!" - ], - "traceId": "f61bc043-9697-436f-8df6-3274f0befb1d" - } - } - } - } - } + "$ref": "../../components/responses/errorResponses/BadRequest.json" }, "401": { - "description": "Unauthorized" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Forbidden.json" }, "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" - } - } - } + "$ref": "../../components/responses/errorResponses/NotFound.json" }, "500": { - "description": "Internal Server Error" + "$ref": "../../components/responses/errorResponses/InternalServerError.json" }, "502": { - "description": "Bad Gateway" + "$ref": "../../components/responses/errorResponses/BadGataway.json" }, "503": { - "description": "Service Unavailable" + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } }, @@ -112,6 +102,12 @@ "$ref": "../../components/requestBodies/putSignedContractDataReq.v1.json" }, "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -127,29 +123,36 @@ ], "responses": { "201": { + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, "description": "Signed contract data added." }, "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" - } - } - } + "$ref": "../../components/responses/errorResponses/BadRequest.json" }, "401": { - "description": "Unauthorized" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Forbidden.json" }, "404": { - "description": "Not Found" + "$ref": "../../components/responses/errorResponses/NotFound.json" }, "500": { - "description": "Internal Server Error" + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } } diff --git a/specification/apis/ccp/ccp.api.v1.signedContractDataByEmaid.json b/specification/apis/ccp/ccp.api.v1.signedContractDataByEmaid.json index 73559b2..59fe34d 100644 --- a/specification/apis/ccp/ccp.api.v1.signedContractDataByEmaid.json +++ b/specification/apis/ccp/ccp.api.v1.signedContractDataByEmaid.json @@ -7,6 +7,12 @@ "DeleteSignedContractDataByEmaid" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -43,69 +49,67 @@ } ], "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" - }, - "examples": { - "Invalid EMAID": { - "value": { - "errorMessages": [ - "emaid : must match \"^[A-Za-z]{2}[-]?\\w{3}[-]?\\w{9,28}[-]?(\\w{1})?$\"" - ], - "traceId": "a079010e-4766-4f4a-9f4c-ccd0f0ddae1e" + "200": { + "description": "OK", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" } - } } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" + }, + "400": { + "description": "Bad Request", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } }, - "examples": { - "EMAID not found": { - "value": { - "errorMessages": [ - "The contract for the given EMAID not found." - ], - "traceId": "bc81a20d-e517-4b5d-b6d7-e6d1888a9662" + "content": { + "application/json": { + "schema": { + "$ref": "../../components/schemas/error.v1.json" + }, + "examples": { + "Invalid EMAID": { + "value": { + "errorMessages": [ + "emaid : must match \"^[A-Za-z]{2}[-]?\\w{3}[-]?\\w{9,28}[-]?(\\w{1})?$\"" + ] + } + } + } } - } } - } + }, + "401": { + "$ref": "../../components/responses/errorResponses/Unauthorized.json" + }, + "403": { + "$ref": "../../components/responses/errorResponses/Forbidden.json" + }, + "404": { + "$ref": "../../components/responses/errorResponses/NotFound.json" + }, + "500": { + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } - }, - "500": { - "description": "Internal Server Error" - }, - "502": { - "description": "Bad Gateway" - }, - "503": { - "description": "Service Unavailable" - } }, "security": [ - { - "eMSP": [] - } + { + "eMSP": [] + } ] } } \ No newline at end of file diff --git a/specification/apis/ccp/ccp.api.v1.signedContractDataByEmaidAndPcid.json b/specification/apis/ccp/ccp.api.v1.signedContractDataByEmaidAndPcid.json index ea8d1e7..c0d06a9 100644 --- a/specification/apis/ccp/ccp.api.v1.signedContractDataByEmaidAndPcid.json +++ b/specification/apis/ccp/ccp.api.v1.signedContractDataByEmaidAndPcid.json @@ -7,6 +7,12 @@ "GetSignedContractDataByEmaidAndPcid" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -67,87 +73,86 @@ } ], "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/responses/getSignedContractDataRes.v1.json" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" - }, - "examples": { - "Invalid PCID": { - "value": { - "errorMessages": [ - "pcid : must match \"^[a-zA-Z0-9]{17,18}$\"" - ], - "traceId": "1c8c56cb-b71f-46a5-8788-5ddcedc88e2a" + "200": { + "description": "OK", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" } - }, - "Invalid EMAID": { - "value": { - "errorMessages": [ - "emaid : must match \"^[A-Za-z]{2}[-]?\\w{3}[-]?\\w{9,28}[-]?(\\w{1})?$\"" - ], - "traceId": "02be5c05-298b-4503-a685-8126951e0233" - } - }, - "Invalid SessionID": { - "value": { - "errorMessages": [ - "Invalid SessionID format, make sure the length is maximum 8 characters and it is represented in HEX binary" - ], - "traceId": "5712b40b-5003-4553-8539-2d1edaf56b6a" + }, + "content": { + "application/json": { + "schema": { + "$ref": "../../components/responses/getSignedContractDataRes.v1.json" + } } - } } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" + }, + "400": { + "description": "Bad Request", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } }, - "examples": { - "Not Found": { - "value": { - "errorMessages": [ - "The contract for the given EMAID not found." - ], - "traceId": "ddb3e897-30c3-4901-b5fe-383c5edeadcb" + "content": { + "application/json": { + "schema": { + "$ref": "../../components/schemas/error.v1.json" + }, + "examples": { + "Invalid PCID": { + "value": { + "errorMessages": [ + "pcid : must match \"^[a-zA-Z0-9]{17,18}$\"" + ], + "traceId": "1c8c56cb-b71f-46a5-8788-5ddcedc88e2a" + } + }, + "Invalid EMAID": { + "value": { + "errorMessages": [ + "emaid : must match \"^[A-Za-z]{2}[-]?\\w{3}[-]?\\w{9,28}[-]?(\\w{1})?$\"" + ], + "traceId": "02be5c05-298b-4503-a685-8126951e0233" + } + }, + "Invalid SessionID": { + "value": { + "errorMessages": [ + "Invalid SessionID format, make sure the length is maximum 8 characters and it is represented in HEX binary" + ], + "traceId": "5712b40b-5003-4553-8539-2d1edaf56b6a" + } + } + } } - } } - } + }, + "401": { + "$ref": "../../components/responses/errorResponses/Unauthorized.json" + }, + "403": { + "$ref": "../../components/responses/errorResponses/Forbidden.json" + }, + "404": { + "$ref": "../../components/responses/errorResponses/NotFound.json" + }, + "500": { + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } - }, - "500": { - "description": "Internal Server Error" - }, - "502": { - "description": "Bad Gateway" - }, - "503": { - "description": "Service Unavailable" - } }, "security": [ { diff --git a/specification/apis/ccp/ccp.api.v1.signedContractDataSetDefault.json b/specification/apis/ccp/ccp.api.v1.signedContractDataSetDefault.json index 6af690e..d29c47b 100644 --- a/specification/apis/ccp/ccp.api.v1.signedContractDataSetDefault.json +++ b/specification/apis/ccp/ccp.api.v1.signedContractDataSetDefault.json @@ -7,6 +7,12 @@ "SetSignedContractDataAsDefault" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -40,25 +46,36 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + } }, "400": { - "description": "Bad Request" + "$ref": "../../components/responses/errorResponses/BadRequest.json" }, "401": { - "description": "Unauthorized" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Forbidden.json" + }, + "404": { + "$ref": "../../components/responses/errorResponses/NotFound.json" }, "500": { - "description": "Internal Server Error" + "$ref": "../../components/responses/errorResponses/InternalServerError.json" }, "502": { - "description": "Bad Gateway" + "$ref": "../../components/responses/errorResponses/BadGataway.json" }, "503": { - "description": "Service Unavailable" + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } } diff --git a/specification/apis/cps/cps.api.v1.contractDataGenerateAndSign.json b/specification/apis/cps/cps.api.v1.contractDataGenerateAndSign.json index 337ed39..b6d9084 100644 --- a/specification/apis/cps/cps.api.v1.contractDataGenerateAndSign.json +++ b/specification/apis/cps/cps.api.v1.contractDataGenerateAndSign.json @@ -7,6 +7,12 @@ "GenerateAndSignContractData" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -21,76 +27,90 @@ } ], "responses": { - "201": { - "description": "Created" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" - }, - "examples": { - "EMAID already used": { - "value": { - "errorMessages": [ - "Invalid Tupple - EMAID is already used by other PCID." - ], - "traceId": "3e002e2a-580b-48e4-88a5-6b782cae636b" - } - }, - "Invalid EMAID": { - "value": { - "errorMessages": [ - "emaid : must match \"^[A-Za-z]{2}[-]?\\w{3}[-]?\\w{9,28}[-]?(\\w{1})?$\"" - ], - "traceId": "57a24dd5-08e2-4d78-8a77-b49b9db411f2" + "201": { + "description": "Created", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" } - }, - "Invalid PCID": { - "value": { - "errorMessages": [ - "pcid : must match \"^[a-zA-Z0-9]{17,18}$\"" - ], - "traceId": "a29a7734-0599-4394-9300-d912a6bfd914" - } - }, - "Invalid Date": { - "value": { - "errorMessages": [ - "The given contractEnds date is in the past." - ], - "traceId": "8185b433-8598-463e-a83f-9dbfea8a33e0" + } + }, + "400": { + "description": "Bad Request", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" } - }, - "PCID not Available": { - "value": { - "errorMessages": [ - "The OEM provisioning certificate with the given PCID is not available." - ], - "traceId": "fb683590-7de9-4c3e-ae41-a83ccb578628" + }, + "content": { + "application/json": { + "schema": { + "$ref": "../../components/schemas/error.v1.json" + }, + "examples": { + "EMAID already used": { + "value": { + "errorMessages": [ + "Invalid Tupple - EMAID is already used by other PCID." + ] + } + }, + "Invalid EMAID": { + "value": { + "errorMessages": [ + "emaid : must match \"^[A-Za-z]{2}[-]?\\w{3}[-]?\\w{9,28}[-]?(\\w{1})?$\"" + ] + } + }, + "Invalid PCID": { + "value": { + "errorMessages": [ + "pcid : must match \"^[a-zA-Z0-9]{17,18}$\"" + ] + } + }, + "Invalid Date": { + "value": { + "errorMessages": [ + "The given contractEnds date is in the past." + ] + } + }, + "PCID not Available": { + "value": { + "errorMessages": [ + "The OEM provisioning certificate with the given PCID is not available." + ] + } + } + } } - } } - } + }, + "401": { + "$ref": "../../components/responses/errorResponses/Unauthorized.json" + }, + "403": { + "$ref": "../../components/responses/errorResponses/Forbidden.json" + }, + "404": { + "$ref": "../../components/responses/errorResponses/NotFound.json" + }, + "500": { + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "500": { - "description": "Internal Server Error" - }, - "502": { - "description": "Bad Gateway" - }, - "503": { - "description": "Service Unavailable" - } }, "requestBody": { "content": { diff --git a/specification/apis/cps/cps.api.v1.contractDataSign.json b/specification/apis/cps/cps.api.v1.contractDataSign.json index dfcc05b..641876c 100644 --- a/specification/apis/cps/cps.api.v1.contractDataSign.json +++ b/specification/apis/cps/cps.api.v1.contractDataSign.json @@ -7,6 +7,12 @@ "SignContractData" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -32,6 +38,14 @@ "responses": { "201": { "description": "Created", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, "content": { "application/json": { "schema": { @@ -41,26 +55,25 @@ } }, "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" - } - } - } + "$ref": "../../components/responses/errorResponses/BadRequest.json" }, "401": { - "description": "Unauthorized" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Forbidden.json" }, "404": { - "description": "Not Found" + "$ref": "../../components/responses/errorResponses/NotFound.json" }, "500": { - "description": "Internal Server Error" + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } } diff --git a/specification/apis/cps/cps.api.v1.cpsCertificates.json b/specification/apis/cps/cps.api.v1.cpsCertificates.json index c7737f1..487b70c 100644 --- a/specification/apis/cps/cps.api.v1.cpsCertificates.json +++ b/specification/apis/cps/cps.api.v1.cpsCertificates.json @@ -7,6 +7,12 @@ "GetCpsCertificates" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -14,62 +20,58 @@ "$ref": "../../components/parameters/headers/opncFromPartyId.v1.json" }, { - "$ref": "../../components/parameters/headers/opncToPartyType.v1.json" + "$ref": "../../components/parameters/headers/opncToPartyType.v1.json" }, { - "$ref": "../../components/parameters/headers/opncToPartyId.v1.json" + "$ref": "../../components/parameters/headers/opncToPartyId.v1.json" } ], "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/responses/getCpsCertificatesRes.v1.json" - } - }, - "multipart/form-data": { - "schema": { - "type": "object", - "properties": {} - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" + "200": { + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "../../components/responses/getCpsCertificatesRes.v1.json" + } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "properties": {} + } + } } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" - } - } + }, + "400": { + "$ref": "../../components/responses/errorResponses/BadRequest.json" + }, + "401": { + "$ref": "../../components/responses/errorResponses/Unauthorized.json" + }, + "403": { + "$ref": "../../components/responses/errorResponses/Forbidden.json" + }, + "404": { + "$ref": "../../components/responses/errorResponses/NotFound.json" + }, + "500": { + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } - }, - "500": { - "description": "Internal Server Error" - } } - } - } \ No newline at end of file + } +} \ No newline at end of file diff --git a/specification/apis/event/event.api.v1.endpoints.json b/specification/apis/event/event.api.v1.endpoints.json index 6e9c8c5..5f8e26a 100644 --- a/specification/apis/event/event.api.v1.endpoints.json +++ b/specification/apis/event/event.api.v1.endpoints.json @@ -21,7 +21,7 @@ "oem.contract.updated", "oem.contract.deleted" ], - "wmi":[ + "wmi": [ "WPO", "WVW", "WAU" @@ -36,6 +36,12 @@ "description": "Request body for creating webhook endpoint" }, "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -50,60 +56,72 @@ } ], "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/responses/endpointRes.v1.json" - }, - "examples": { - "endpoint-created": { - "value": { - "id": "xyzedjds", - "apiVersion": "v1", - "created": 1623760573, - "description": "Test webhook", - "enabledEvents": [ - "oem.contract.created", - "oem.contract.deleted" - ], - "wmi":[ - "WPO", - "WVW", - "WAU" - ], - "metadata": {}, - "status": "enabled", - "url": "https://mywebhooks.com/payload", - "secret": "secret keyword" + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "../../components/responses/endpointRes.v1.json" + }, + "examples": { + "endpoint-created": { + "value": { + "id": "xyzedjds", + "apiVersion": "v1", + "created": 1623760573, + "description": "Test webhook", + "enabledEvents": [ + "oem.contract.created", + "oem.contract.deleted" + ], + "wmi": [ + "WPO", + "WVW", + "WAU" + ], + "metadata": {}, + "status": "enabled", + "url": "https://mywebhooks.com/payload", + "secret": "secret keyword" + } } } } } + }, + "400": { + "$ref": "../../components/responses/errorResponses/BadRequest.json" + }, + "401": { + "$ref": "../../components/responses/errorResponses/Unauthorized.json" + }, + "403": { + "$ref": "../../components/responses/errorResponses/Forbidden.json" + }, + "404": { + "$ref": "../../components/responses/errorResponses/NotFound.json" + }, + "500": { + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "Internal Server Error" - } } }, "get": { "summary": "Get all endpoints", "operationId": "get-webhook-endpoints", "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -118,34 +136,40 @@ } ], "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "../../components/responses/endpointRes.v1.json" + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "../../components/responses/endpointRes.v1.json" + } + } } } + }, + "400": { + "$ref": "../../components/responses/errorResponses/BadRequest.json" + }, + "401": { + "$ref": "../../components/responses/errorResponses/Unauthorized.json" + }, + "403": { + "$ref": "../../components/responses/errorResponses/Forbidden.json" + }, + "404": { + "$ref": "../../components/responses/errorResponses/NotFound.json" + }, + "500": { + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "Internal Server Error" - } }, "description": "Returns users all webhook endpoints" } diff --git a/specification/apis/event/event.api.v1.endpointsById.json b/specification/apis/event/event.api.v1.endpointsById.json index 3a08fd1..447715d 100644 --- a/specification/apis/event/event.api.v1.endpointsById.json +++ b/specification/apis/event/event.api.v1.endpointsById.json @@ -1,14 +1,14 @@ { "parameters": [ - { - "schema": { - "type": "string" - }, - "name": "id", - "in": "path", - "required": true, - "description": "Endpoint ID" - } + { + "schema": { + "type": "string" + }, + "name": "id", + "in": "path", + "required": true, + "description": "Endpoint ID" + } ], "get": { "operationId": "getEndpointByIdV1", @@ -18,6 +18,12 @@ "GetEndpointById" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -33,6 +39,14 @@ ], "responses": { "200": { + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, "description": "OK", "content": { "application/json": { @@ -72,19 +86,25 @@ } }, "400": { - "description": "Bad Request" + "$ref": "../../components/responses/errorResponses/BadRequest.json" }, "401": { - "description": "Unauthorized" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Forbidden.json" }, "404": { - "description": "Not Found" + "$ref": "../../components/responses/errorResponses/NotFound.json" }, "500": { - "description": "Internal Server Error" + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } }, @@ -105,6 +125,12 @@ } }, "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -120,6 +146,14 @@ ], "responses": { "200": { + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, "description": "OK", "content": { "application/json": { @@ -137,7 +171,7 @@ "oem.contract.created", "oem.contract.deleted" ], - "wmi":[ + "wmi": [ "WPO", "WVW", "WAU" @@ -152,21 +186,27 @@ } }, "400": { - "description": "Bad Request" + "$ref": "../../components/responses/errorResponses/BadRequest.json" }, "401": { - "description": "Unauthorized" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Forbidden.json" }, "404": { - "description": "Not Found" + "$ref": "../../components/responses/errorResponses/NotFound.json" }, "500": { - "description": "Internal Server Error" + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } - } + } }, "delete": { "summary": "DeleteEndpointById", @@ -176,6 +216,12 @@ "DeleteEndpointById" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -191,23 +237,37 @@ ], "responses": { "200": { - "description": "OK" + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, + "description": "OK" }, "400": { - "description": "Bad Request" + "$ref": "../../components/responses/errorResponses/BadRequest.json" }, "401": { - "description": "Unauthorized" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Forbidden.json" }, "404": { - "description": "Not Found" + "$ref": "../../components/responses/errorResponses/NotFound.json" }, "500": { - "description": "Internal Server Error" + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } } - } \ No newline at end of file +} \ No newline at end of file diff --git a/specification/apis/pcp/pcp.api.v1.lookupVehicleByPcid.json b/specification/apis/pcp/pcp.api.v1.lookupVehicleByPcid.json index d2475e8..a84d424 100644 --- a/specification/apis/pcp/pcp.api.v1.lookupVehicleByPcid.json +++ b/specification/apis/pcp/pcp.api.v1.lookupVehicleByPcid.json @@ -1,14 +1,32 @@ { "parameters": [ - { - "name": "pcid", - "in": "path", - "required": true, - "description": "", - "schema": { - "$ref": "../../components/parameters/pcidParam.v1.json" + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncFromPartyId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncToPartyType.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncToPartyId.v1.json" + }, + { + "name": "pcid", + "in": "path", + "required": true, + "description": "", + "schema": { + "$ref": "../../components/parameters/pcidParam.v1.json" + } } - } ], "get": { "summary": "LookUpVehicleByPCID", @@ -18,6 +36,12 @@ "LookUpVehicle" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -32,65 +56,86 @@ } ], "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" + "200": { + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, + "description": "OK" + }, + "400": { + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } }, - "examples": { - "INVALID PCID": { - "value": { - "errorMessages": [ - "pcid : must match \"^[a-zA-Z0-9]{17,18}$\"" - ], - "traceId": "1c8c56cb-b71f-46a5-8788-5ddcedc88e2a" + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../../components/schemas/error.v1.json" + }, + "examples": { + "INVALID PCID": { + "value": { + "errorMessages": [ + "pcid : must match \"^[a-zA-Z0-9]{17,18}$\"" + ] + } + } + } } - } } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" + }, + "404": { + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } }, - "examples": { - "NOT FOUND": { - "value": { - "errorMessages": [ - "The OEM provisioning certificate with given PCID is not found." - ], - "traceId": "807838e3-b058-447c-b6f8-233638cefc18" + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../../components/schemas/error.v1.json" + }, + "examples": { + "NOT FOUND": { + "value": { + "errorMessages": [ + "The OEM provisioning certificate with given PCID is not found." + ] + } + } + } } - } } - } + }, + "401": { + "$ref": "../../components/responses/errorResponses/Unauthorized.json" + }, + "403": { + "$ref": "../../components/responses/errorResponses/Forbidden.json" + }, + "500": { + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } - }, - "500": { - "description": "Internal Server Error" - }, - "502": { - "description": "Bad Gateway" - }, - "503": { - "description": "Service Unavailable" - } } - } } \ No newline at end of file diff --git a/specification/apis/pcp/pcp.api.v1.provisioningCertificateByPcid.json b/specification/apis/pcp/pcp.api.v1.provisioningCertificateByPcid.json index cd52f62..ef3173f 100644 --- a/specification/apis/pcp/pcp.api.v1.provisioningCertificateByPcid.json +++ b/specification/apis/pcp/pcp.api.v1.provisioningCertificateByPcid.json @@ -28,6 +28,12 @@ "description": "if set to true - this call is not getting forwarded to other Ecosystems ", "name": "broadcast" }, + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -44,6 +50,14 @@ "responses": { "200": { "description": "OK", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, "content": { "application/json": { "schema": { @@ -54,6 +68,14 @@ }, "400": { "description": "Bad Request", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, "content": { "application/json": { "schema": { @@ -72,14 +94,16 @@ } } }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, "404": { "description": "Not Found", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, "content": { "application/json": { "schema": { @@ -98,14 +122,20 @@ } } }, + "401": { + "$ref": "../../components/responses/errorResponses/Unauthorized.json" + }, + "403": { + "$ref": "../../components/responses/errorResponses/Forbidden.json" + }, "500": { - "description": "Internal Server Error" + "$ref": "../../components/responses/errorResponses/InternalServerError.json" }, "502": { - "description": "Bad Gateway" + "$ref": "../../components/responses/errorResponses/BadGataway.json" }, "503": { - "description": "Service Unavailable" + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } }, @@ -116,6 +146,12 @@ "DeleteProvisioningCertificate" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -132,33 +168,36 @@ "description": "This method is used by the OEM to depublish Provisioning Certificates.\n\n\n\n> A successful deletes triggers a call to the DELETE method of the Contract Certificate Pool for all EMAIDs related to this PCID! In case of contract certificates issued by one of the Operator owned eMSP CAs, this also involves revocation of the same.", "responses": { "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" - } + "description": "OK", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" } } }, + "400": { + "$ref": "../../components/responses/errorResponses/BadRequest.json" + }, "401": { - "description": "Unauthorized" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Forbidden.json" }, "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" - } - } - } + "$ref": "../../components/responses/errorResponses/NotFound.json" + }, + "500": { + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } } diff --git a/specification/apis/pcp/pcp.api.v1.provisioningCertificates.json b/specification/apis/pcp/pcp.api.v1.provisioningCertificates.json index e5c1e83..745486e 100644 --- a/specification/apis/pcp/pcp.api.v1.provisioningCertificates.json +++ b/specification/apis/pcp/pcp.api.v1.provisioningCertificates.json @@ -10,6 +10,12 @@ "$ref": "../../components/requestBodies/putProvisioningCertificateReq.v1.json" }, "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -25,10 +31,26 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + } }, "400": { "description": "Bad Request", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, "content": { "application/json": { "schema": { @@ -72,19 +94,19 @@ } }, "401": { - "description": "Unauthorized" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Forbidden.json" }, "500": { - "description": "Internal Server Error" + "$ref": "../../components/responses/errorResponses/InternalServerError.json" }, "502": { - "description": "Bad Gateway" + "$ref": "../../components/responses/errorResponses/BadGataway.json" }, "503": { - "description": "Service Unavailable" + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } } diff --git a/specification/apis/pki/pki.api.v1.cacerts.json b/specification/apis/pki/pki.api.v1.cacerts.json index 92fa00c..2d036fa 100644 --- a/specification/apis/pki/pki.api.v1.cacerts.json +++ b/specification/apis/pki/pki.api.v1.cacerts.json @@ -7,6 +7,12 @@ ], "description": "Get the chain of CA certificates incl. Root CA.", "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -57,6 +63,12 @@ "200": { "description": "OK", "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, "content-transfer-encoding": { "schema": { "type": "string" @@ -79,14 +91,23 @@ } } }, + "400": { + "$ref": "../../components/responses/errorResponses/BadRequest.json" + }, "401": { - "description": "Unauthorized" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Forbidden.json" + }, + "500": { + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" }, - "5XX": { - "description": "Internal Server Error" + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } } diff --git a/specification/apis/pki/pki.api.v1.revokeCert.json b/specification/apis/pki/pki.api.v1.revokeCert.json index 8ad12b3..2bc3b03 100644 --- a/specification/apis/pki/pki.api.v1.revokeCert.json +++ b/specification/apis/pki/pki.api.v1.revokeCert.json @@ -1,44 +1,78 @@ { - "post": { - "summary": "RevokeCert", - "operationId": "revokeCertV1", - "tags": [ - "RevokeCert" - ], - "description": "Revocation service for leaf certificates (SECC Certificate, Contract Certificate, OEM Contract Certificate, OEM Vehicle Certificate).\n\n *NB: A PKI certificate subscriber can only ask the revocation on one of his own certificates.* \n\n *NB2: A certificate can be revoked only by the Certificate Authority that delivered it.*", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "../../components/requestBodies/revokeCertificateReq.v1.json" - }, - "examples": { - "example": { - "value": { - "certificate": "MIIC8jCCApegAwIBAgIIVgSOEtL5U+owCgYIKoZIzj0EAwIwbjElMCMGA1UEAwwcU3ViQ0EyLUEtZU1TUF9Gb3JfQ0MtR2VuZXJpYzEMMAoGA1UECwwDU1RHMQ8wDQYDVQQKDAZHSVJFVkUxGTAXBgoJkiaJk/IsZAEZFglTdWJDQTItQ0MxCzAJBgNVBAYTAkZSMB4XDTI0MDEyMjEwMDE0NVoXDTI2MDEyMTEwMDE0NFowOTEYMBYGA1UEAwwPVFVBQUJjQXoyQks3SlJhMQwwCgYDVQQLDANTVEcxDzANBgNVBAoMBkdJUkVWRTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABAJdgL7lS8wUMIy8IOiM6SpH1Bjp5GWKFFCYx55bBoHC7yyo2b+GcQSnGRMKaB4F5t06fk1w9+P7uehhjmXwLFGjggFSMIIBTjAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFMgAjDsX1OyW40YHz/CTyEQx8iGrMFEGCCsGAQUFBwEBBEUwQzBBBggrBgEFBQcwAYY1aHR0cDovL29jc3AudGttZ2lydi5ldzEuYWlzLXN0ZzAzLmFjbG91ZC5nZW1hbHRvLmNvbS8wgZoGA1UdHwSBkjCBjzCBjKCBiaCBhoaBg2h0dHA6Ly9jcmwudGttZ2lydi5ldzEuYWlzLXN0ZzAzLmFjbG91ZC5nZW1hbHRvLmNvbTo4MC9jcmwvaXNzdWVyL0NOPVN1YkNBMi1BLWVNU1BfRm9yX0NDLUdlbmVyaWMsT1U9U1RHLE89R0lSRVZFLERDPVN1YkNBMi1DQyxDPUZSMB0GA1UdDgQWBBQ/vmRczFWeeSwQl28yZuABoCCj2jAOBgNVHQ8BAf8EBAMCA+gwCgYIKoZIzj0EAwIDSQAwRgIhAP13OVb18cdam6r+pbmqzy4n7332OZUMt7qK2W1a7Ns6AiEA0QKHeNa2ZSuv6jIhr1Z01XZUZHOROA1o2s/dNvfBKp8=", - "revocationReason": "privilegeWithdrawn" - } + "post": { + "summary": "RevokeCert", + "operationId": "revokeCertV1", + "tags": [ + "RevokeCert" + ], + "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncFromPartyId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncToPartyType.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncToPartyId.v1.json" + } + ], + "description": "Revocation service for leaf certificates (SECC Certificate, Contract Certificate, OEM Contract Certificate, OEM Vehicle Certificate).\n\n *NB: A PKI certificate subscriber can only ask the revocation on one of his own certificates.* \n\n *NB2: A certificate can be revoked only by the Certificate Authority that delivered it.*", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "../../components/requestBodies/revokeCertificateReq.v1.json" + }, + "examples": { + "example": { + "value": { + "certificate": "MIIC8jCCApegAwIBAgIIVgSOEtL5U+owCgYIKoZIzj0EAwIwbjElMCMGA1UEAwwcU3ViQ0EyLUEtZU1TUF9Gb3JfQ0MtR2VuZXJpYzEMMAoGA1UECwwDU1RHMQ8wDQYDVQQKDAZHSVJFVkUxGTAXBgoJkiaJk/IsZAEZFglTdWJDQTItQ0MxCzAJBgNVBAYTAkZSMB4XDTI0MDEyMjEwMDE0NVoXDTI2MDEyMTEwMDE0NFowOTEYMBYGA1UEAwwPVFVBQUJjQXoyQks3SlJhMQwwCgYDVQQLDANTVEcxDzANBgNVBAoMBkdJUkVWRTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABAJdgL7lS8wUMIy8IOiM6SpH1Bjp5GWKFFCYx55bBoHC7yyo2b+GcQSnGRMKaB4F5t06fk1w9+P7uehhjmXwLFGjggFSMIIBTjAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFMgAjDsX1OyW40YHz/CTyEQx8iGrMFEGCCsGAQUFBwEBBEUwQzBBBggrBgEFBQcwAYY1aHR0cDovL29jc3AudGttZ2lydi5ldzEuYWlzLXN0ZzAzLmFjbG91ZC5nZW1hbHRvLmNvbS8wgZoGA1UdHwSBkjCBjzCBjKCBiaCBhoaBg2h0dHA6Ly9jcmwudGttZ2lydi5ldzEuYWlzLXN0ZzAzLmFjbG91ZC5nZW1hbHRvLmNvbTo4MC9jcmwvaXNzdWVyL0NOPVN1YkNBMi1BLWVNU1BfRm9yX0NDLUdlbmVyaWMsT1U9U1RHLE89R0lSRVZFLERDPVN1YkNBMi1DQyxDPUZSMB0GA1UdDgQWBBQ/vmRczFWeeSwQl28yZuABoCCj2jAOBgNVHQ8BAf8EBAMCA+gwCgYIKoZIzj0EAwIDSQAwRgIhAP13OVb18cdam6r+pbmqzy4n7332OZUMt7qK2W1a7Ns6AiEA0QKHeNa2ZSuv6jIhr1Z01XZUZHOROA1o2s/dNvfBKp8=", + "revocationReason": "privilegeWithdrawn" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + } + }, + "400": { + "$ref": "../../components/responses/errorResponses/BadRequest.json" + }, + "401": { + "$ref": "../../components/responses/errorResponses/Unauthorized.json" + }, + "403": { + "$ref": "../../components/responses/errorResponses/Forbidden.json" + }, + "500": { + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } - } } - } - }, - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "5XX": { - "description": "Internal Server Error" - } } - } } \ No newline at end of file diff --git a/specification/apis/pki/pki.api.v1.simpleenroll.json b/specification/apis/pki/pki.api.v1.simpleenroll.json index c92117d..f3fd681 100644 --- a/specification/apis/pki/pki.api.v1.simpleenroll.json +++ b/specification/apis/pki/pki.api.v1.simpleenroll.json @@ -7,6 +7,12 @@ ], "description": "The EST interface receives CSRs from CPOs, eMSPs, OEMs, and CPSs, signs them, and delivers an ISO 15118 leaf certificate. The PKI Gateway/Certificate Manager creates the leaf certificates from the Sub 2 CA of the respective role. This interface can create leaf certificates for CPOs (SECC Certificate), eMSPs (Contract Certificate), OEMs (Provisioning Certificate), and CPSs (Provisioning Signing Certificates). An EST interface is a standard implementation described in RFC7030.", "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -38,20 +44,20 @@ } }, { - "name": "algorithm", - "in": "path", - "description": "Defines the algorithm for the PKI which shall be used.", - "schema": { - "type": "string", - "enum": [ - "secp256r1", - "secp521r1", - "ed448" + "name": "algorithm", + "in": "path", + "description": "Defines the algorithm for the PKI which shall be used.", + "schema": { + "type": "string", + "enum": [ + "secp256r1", + "secp521r1", + "ed448" ], "default": "secp256r1", "example": "secp521r1" + } } - } ], "requestBody": { "content": { @@ -80,20 +86,32 @@ "type": "string" }, "description": "application/pkcs7-mime; smime-type=certs-only" + }, + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" } } }, "400": { - "description": "Bad Request" + "$ref": "../../components/responses/errorResponses/BadRequest.json" }, "401": { - "description": "Unauthorized" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Forbidden.json" + }, + "500": { + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" }, - "5XX": { - "description": "Internal Server Error" + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } } diff --git a/specification/apis/rcp/rcp.api.v1.rootCertificateById.json b/specification/apis/rcp/rcp.api.v1.rootCertificateById.json index 6cd5d37..37a918f 100644 --- a/specification/apis/rcp/rcp.api.v1.rootCertificateById.json +++ b/specification/apis/rcp/rcp.api.v1.rootCertificateById.json @@ -18,6 +18,12 @@ "GetRootCertificate" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -34,6 +40,14 @@ "responses": { "200": { "description": "OK", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, "content": { "application/json": { "schema": { @@ -42,24 +56,26 @@ } } }, + "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" - } - } - } + "$ref": "../../components/responses/errorResponses/BadRequest.json" }, "401": { - "description": "Unauthorized" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Forbidden.json" }, "404": { "description": "Not Found", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, "content": { "application/json": { "schema": { @@ -79,13 +95,13 @@ } }, "500": { - "description": "Internal Server Error" + "$ref": "../../components/responses/errorResponses/InternalServerError.json" }, "502": { - "description": "Bad Gateway" + "$ref": "../../components/responses/errorResponses/BadGataway.json" }, "503": { - "description": "Service Unavailable" + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } }, @@ -96,24 +112,50 @@ "tags": [ "DeleteRootCertificate" ], + "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncFromPartyId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncToPartyType.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncToPartyId.v1.json" + } + ], "responses": { "200": { "description": "OK" }, "400": { - "description": "Bad Request" + "$ref": "../../components/responses/errorResponses/BadRequest.json" }, "401": { - "description": "Unauthorized" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Forbidden.json" }, "404": { - "description": "Not Found" + "$ref": "../../components/responses/errorResponses/NotFound.json" }, "500": { - "description": "Internal Server Error" + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } } diff --git a/specification/apis/rcp/rcp.api.v1.rootcertificates.json b/specification/apis/rcp/rcp.api.v1.rootcertificates.json index 4b40b61..7a8ff3f 100644 --- a/specification/apis/rcp/rcp.api.v1.rootcertificates.json +++ b/specification/apis/rcp/rcp.api.v1.rootcertificates.json @@ -7,6 +7,12 @@ "GetRootCertificates" ], "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, { "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" }, @@ -24,13 +30,21 @@ "name": "pkiType", "description": "Optional parameter to filter for root certificates from V2G, eMSP or OEM PKI.", "schema": { - "$ref": "../../components/parameters/pkiTypeParam.v1.json" + "$ref": "../../components/parameters/pkiTypeParam.v1.json" } } ], "responses": { "200": { "description": "OK", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, "content": { "application/json": { "schema": { @@ -39,50 +53,51 @@ } } }, - "400": { - "description": "Bad Request", + "404": { + "description": "Not Found", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + }, "content": { "application/json": { "schema": { "$ref": "../../components/schemas/error.v1.json" + }, + "examples": { + "ROOT NOT FOUND": { + "value": { + "errorMessages": [ + "Root certificate with the given ID is not found" + ], + "traceId": "c52fe6ad-1e39-4f6e-a0d0-e2d51aacf09f" + } + } } } } }, + "400": { + "$ref": "../../components/responses/errorResponses/BadRequest.json" + }, "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" + "$ref": "../../components/responses/errorResponses/Unauthorized.json" }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../../components/schemas/error.v1.json" - }, - "examples": { - "ROOT NOT FOUND": { - "value": { - "errorMessages": [ - "Root certificate with the given ID is not found" - ], - "traceId": "c52fe6ad-1e39-4f6e-a0d0-e2d51aacf09f" - } - } - } - } - } + "403": { + "$ref": "../../components/responses/errorResponses/Forbidden.json" }, "500": { - "description": "Internal Server Error" + "$ref": "../../components/responses/errorResponses/InternalServerError.json" }, "502": { - "description": "Bad Gateway" + "$ref": "../../components/responses/errorResponses/BadGataway.json" }, "503": { - "description": "Service Unavailable" + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" } } }, @@ -93,13 +108,59 @@ "tags": [ "PutRootCertificate" ], + "parameters": [ + { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncFromPartyType.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncFromPartyId.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncToPartyType.v1.json" + }, + { + "$ref": "../../components/parameters/headers/opncToPartyId.v1.json" + } + ], "requestBody": { "$ref": "../../components/requestBodies/putRootCertificateReq.v1.json" }, "responses": { - "200": { - "description": "OK" - } + "200": { + "description": "OK", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../components/parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../components/parameters/headers/opncRequestId.v1.json" + } + } + }, + "400": { + "$ref": "../../components/responses/errorResponses/BadRequest.json" + }, + "401": { + "$ref": "../../components/responses/errorResponses/Unauthorized.json" + }, + "403": { + "$ref": "../../components/responses/errorResponses/Forbidden.json" + }, + "500": { + "$ref": "../../components/responses/errorResponses/InternalServerError.json" + }, + "502": { + "$ref": "../../components/responses/errorResponses/BadGataway.json" + }, + "503": { + "$ref": "../../components/responses/errorResponses/ServiceUnavailable.json" + } } } } diff --git a/specification/components/parameters/headers/opncCorrelationId.v1.json b/specification/components/parameters/headers/opncCorrelationId.v1.json new file mode 100644 index 0000000..81d1715 --- /dev/null +++ b/specification/components/parameters/headers/opncCorrelationId.v1.json @@ -0,0 +1,9 @@ +{ + "name": "OPNC-Correlation-ID", + "schema": { + "type": "string" + }, + "in": "header", + "description": "Every request/response SHALL contain a unique correlation ID, every response to this request SHALL contain the same ID.", + "required": false +} \ No newline at end of file diff --git a/specification/components/parameters/headers/opncRequestId.v1.json b/specification/components/parameters/headers/opncRequestId.v1.json new file mode 100644 index 0000000..ecccecd --- /dev/null +++ b/specification/components/parameters/headers/opncRequestId.v1.json @@ -0,0 +1,9 @@ +{ + "name": "OPNC-Request-ID", + "schema": { + "type": "string" + }, + "in": "header", + "description": "Every request SHALL contain a unique request ID, the response to this request SHALL contain the same ID.", + "required": false +} \ No newline at end of file diff --git a/specification/components/responses/errorResponses/BadGataway.json b/specification/components/responses/errorResponses/BadGataway.json new file mode 100644 index 0000000..800c1db --- /dev/null +++ b/specification/components/responses/errorResponses/BadGataway.json @@ -0,0 +1,11 @@ +{ + "description": "Bad Gataway", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../parameters/headers/opncRequestId.v1.json" + } + } +} \ No newline at end of file diff --git a/specification/components/responses/errorResponses/BadRequest.json b/specification/components/responses/errorResponses/BadRequest.json new file mode 100644 index 0000000..9d4bfd7 --- /dev/null +++ b/specification/components/responses/errorResponses/BadRequest.json @@ -0,0 +1,18 @@ +{ + "description": "Bad Request", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../parameters/headers/opncRequestId.v1.json" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../../schemas/error.v1.json" + } + } + } +} \ No newline at end of file diff --git a/specification/components/responses/errorResponses/Forbidden.json b/specification/components/responses/errorResponses/Forbidden.json new file mode 100644 index 0000000..0faf791 --- /dev/null +++ b/specification/components/responses/errorResponses/Forbidden.json @@ -0,0 +1,11 @@ +{ + "description": "Forbidden", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../parameters/headers/opncRequestId.v1.json" + } + } +} \ No newline at end of file diff --git a/specification/components/responses/errorResponses/InternalServerError.json b/specification/components/responses/errorResponses/InternalServerError.json new file mode 100644 index 0000000..2e67717 --- /dev/null +++ b/specification/components/responses/errorResponses/InternalServerError.json @@ -0,0 +1,11 @@ +{ + "description": "Internal Server Error", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../parameters/headers/opncRequestId.v1.json" + } + } +} \ No newline at end of file diff --git a/specification/components/responses/errorResponses/NotFound.json b/specification/components/responses/errorResponses/NotFound.json new file mode 100644 index 0000000..a407e80 --- /dev/null +++ b/specification/components/responses/errorResponses/NotFound.json @@ -0,0 +1,18 @@ +{ + "description": "Not Found", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../parameters/headers/opncRequestId.v1.json" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../../schemas/error.v1.json" + } + } + } +} \ No newline at end of file diff --git a/specification/components/responses/errorResponses/ServiceUnavailable.json b/specification/components/responses/errorResponses/ServiceUnavailable.json new file mode 100644 index 0000000..191d032 --- /dev/null +++ b/specification/components/responses/errorResponses/ServiceUnavailable.json @@ -0,0 +1,11 @@ +{ + "description": "Service Unavailable", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../parameters/headers/opncRequestId.v1.json" + } + } +} \ No newline at end of file diff --git a/specification/components/responses/errorResponses/Unauthorized.json b/specification/components/responses/errorResponses/Unauthorized.json new file mode 100644 index 0000000..740731d --- /dev/null +++ b/specification/components/responses/errorResponses/Unauthorized.json @@ -0,0 +1,11 @@ +{ + "description": "Unauthorized", + "headers": { + "OPNC-Correlation-ID": { + "$ref": "../../parameters/headers/opncCorrelationId.v1.json" + }, + "OPNC-Request-ID": { + "$ref": "../../parameters/headers/opncRequestId.v1.json" + } + } +} \ No newline at end of file diff --git a/specification/components/responses/getRootCertificateRes.v1.json b/specification/components/responses/getRootCertificateRes.v1.json index d69ec12..56804d5 100644 --- a/specification/components/responses/getRootCertificateRes.v1.json +++ b/specification/components/responses/getRootCertificateRes.v1.json @@ -2,7 +2,7 @@ "title": "GetRootCertificateResponseV1", "type": "object", "properties": { - "roootCertificate": { + "rootCertificate": { "$ref": "../schemas/rootCertificate.v1.json" } } diff --git a/specification/components/schemas/error.v1.json b/specification/components/schemas/error.v1.json index dcc91cd..6f614c3 100644 --- a/specification/components/schemas/error.v1.json +++ b/specification/components/schemas/error.v1.json @@ -10,10 +10,6 @@ "items": { "type": "string" } - }, - "traceId": { - "type": "string", - "format": "uuid" } } } \ No newline at end of file