Skip to content

Commit 72701c8

Browse files
Merge pull request #200 from camaraproject/fix198
Update x-correlator format
2 parents 4dffe65 + 77b6396 commit 72701c8

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

code/API_definitions/number-verification.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,17 @@ components:
171171
in: header
172172
description: Correlation id for the different services
173173
schema:
174-
type: string
175-
pattern: ^[a-zA-Z0-9-]{0,55}$
176-
example: "b4333c46-49c0-4f62-80d7-f0ef930f1c46"
174+
$ref: "#/components/schemas/XCorrelator"
177175
headers:
178176
x-correlator:
179177
description: Correlation id for the different services
180178
schema:
181-
type: string
182-
pattern: ^[a-zA-Z0-9-]{0,55}$
183-
example: "b4333c46-49c0-4f62-80d7-f0ef930f1c46"
179+
$ref: "#/components/schemas/XCorrelator"
184180
schemas:
181+
XCorrelator:
182+
type: string
183+
pattern: ^[a-zA-Z0-9-_:;.\/<>{}]{0,256}$
184+
example: "b4333c46-49c0-4f62-80d7-f0ef930f1c46"
185185
NumberVerificationRequestBody:
186186
type: object
187187
description: Payload to verify the phone number.

code/Test_Definitions/number-verification-device-phone-number-share.feature

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ Feature: CAMARA Number Verification API, vwip - Operation phoneNumberShare
1515
Given the resource "/device-phone-number/vwip" as base url
1616
And the header "Content-Type" is set to "application/json"
1717
And the header "Authorization" is set to a valid access token
18-
And the header "x-correlator" is set to a UUID value
18+
And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator"
1919
And the request body is compliant with the schema NumberVerificationRequestBody
2020
And the response body is compliant with the schema NumberVerificationMatchResponse
21-
And the header "x-correlator" is set to a UUID value
2221
And NUMBERVERIFY_SHARE_PHONENUMBER1 is compliant with the schema DevicePhoneNumber
2322
And NUMBERVERIFY_SHARE_PHONENUMBER2 is compliant with the schema DevicePhoneNumber
2423
And NUMBERVERIFY_SHARE_PHONENUMBER1 is different to NUMBERVERIFY_SHARE_PHONENUMBER2

code/Test_Definitions/number-verification-verify.feature

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ Feature: CAMARA Number Verification API, vwip - Operation phoneNumberVerify
1717
Given the resource "/number-verification/vwip" as base url
1818
And the header "Content-Type" is set to "application/json"
1919
And the header "Authorization" is set to a valid access token
20-
And the header "x-correlator" is set to a UUID value
20+
And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator"
2121
And the request body is compliant with the schema NumberVerificationRequestBody
2222
And the response body is compliant with the schema NumberVerificationMatchResponse
23-
And the header "x-correlator" is set to a UUID value
2423
And NUMBERVERIFY_VERIFY_MATCH_PHONENUMBER1 is compliant with the schema DevicePhoneNumber
2524
And NUMBERVERIFY_VERIFY_MATCH_PHONENUMBER2 is compliant with the schema DevicePhoneNumber
2625
And NUMBERVERIFY_VERIFY_MATCH_PHONENUMBER1 is different to NUMBERVERIFY_VERIFY_MATCH_PHONENUMBER2

0 commit comments

Comments
 (0)