diff --git a/code/API_definitions/number-verification.yaml b/code/API_definitions/number-verification.yaml index 6e3387b..af0c60d 100644 --- a/code/API_definitions/number-verification.yaml +++ b/code/API_definitions/number-verification.yaml @@ -171,17 +171,17 @@ components: in: header description: Correlation id for the different services schema: - type: string - pattern: ^[a-zA-Z0-9-]{0,55}$ - example: "b4333c46-49c0-4f62-80d7-f0ef930f1c46" + $ref: "#/components/schemas/XCorrelator" headers: x-correlator: description: Correlation id for the different services schema: - type: string - pattern: ^[a-zA-Z0-9-]{0,55}$ - example: "b4333c46-49c0-4f62-80d7-f0ef930f1c46" + $ref: "#/components/schemas/XCorrelator" schemas: + XCorrelator: + type: string + pattern: ^[a-zA-Z0-9-_:;.\/<>{}]{0,256}$ + example: "b4333c46-49c0-4f62-80d7-f0ef930f1c46" NumberVerificationRequestBody: type: object description: Payload to verify the phone number. diff --git a/code/Test_Definitions/number-verification-device-phone-number-share.feature b/code/Test_Definitions/number-verification-device-phone-number-share.feature index c0fc5e2..259958b 100644 --- a/code/Test_Definitions/number-verification-device-phone-number-share.feature +++ b/code/Test_Definitions/number-verification-device-phone-number-share.feature @@ -15,10 +15,9 @@ Feature: CAMARA Number Verification API, vwip - Operation phoneNumberShare Given the resource "/device-phone-number/vwip" as base url And the header "Content-Type" is set to "application/json" And the header "Authorization" is set to a valid access token - And the header "x-correlator" is set to a UUID value + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" And the request body is compliant with the schema NumberVerificationRequestBody And the response body is compliant with the schema NumberVerificationMatchResponse - And the header "x-correlator" is set to a UUID value And NUMBERVERIFY_SHARE_PHONENUMBER1 is compliant with the schema DevicePhoneNumber And NUMBERVERIFY_SHARE_PHONENUMBER2 is compliant with the schema DevicePhoneNumber And NUMBERVERIFY_SHARE_PHONENUMBER1 is different to NUMBERVERIFY_SHARE_PHONENUMBER2 diff --git a/code/Test_Definitions/number-verification-verify.feature b/code/Test_Definitions/number-verification-verify.feature index 7846a2d..6452ea3 100644 --- a/code/Test_Definitions/number-verification-verify.feature +++ b/code/Test_Definitions/number-verification-verify.feature @@ -17,10 +17,9 @@ Feature: CAMARA Number Verification API, vwip - Operation phoneNumberVerify Given the resource "/number-verification/vwip" as base url And the header "Content-Type" is set to "application/json" And the header "Authorization" is set to a valid access token - And the header "x-correlator" is set to a UUID value + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" And the request body is compliant with the schema NumberVerificationRequestBody And the response body is compliant with the schema NumberVerificationMatchResponse - And the header "x-correlator" is set to a UUID value And NUMBERVERIFY_VERIFY_MATCH_PHONENUMBER1 is compliant with the schema DevicePhoneNumber And NUMBERVERIFY_VERIFY_MATCH_PHONENUMBER2 is compliant with the schema DevicePhoneNumber And NUMBERVERIFY_VERIFY_MATCH_PHONENUMBER1 is different to NUMBERVERIFY_VERIFY_MATCH_PHONENUMBER2