diff --git a/code/API_definitions/device-identifier.yaml b/code/API_definitions/device-identifier.yaml index 83f2f18..5943849 100644 --- a/code/API_definitions/device-identifier.yaml +++ b/code/API_definitions/device-identifier.yaml @@ -354,13 +354,13 @@ paths: schema: $ref: "#/components/schemas/MatchRequestBody" examples: - Match Device By 3-Legged Access Token: + Match Device IMEISV By 3-Legged Access Token: $ref: '#/components/examples/MatchDeviceBy3LeggedToken' - Match Device By Phone Number: + Match Device IMEI By Phone Number: $ref: '#/components/examples/MatchDeviceByPhoneNumber' - Match Device By IP Address: + Match Device TAC By IP Address: $ref: '#/components/examples/MatchDeviceByIPAddress' - Match Device By Multiple Identifiers: + Match Device IMEISV By Multiple Identifiers: $ref: '#/components/examples/MatchDeviceByMultipleIdentifiers' responses: @@ -636,6 +636,62 @@ components: message: The provided identifier cannot be matched to a device. schemas: + Imei: + description: Schema for the International Mobile Equipment Identity (IMEI) of a physical mobile device + type: string + minLength: 15 + maxLength: 15 + pattern: ^[0-9]{15}$ + example: "490154203237518" + + ImeiSv: + description: Schema for the International Mobile Equipment Identity - Software Version (IMEISV) of a physical mobile device + type: string + minLength: 16 + maxLength: 16 + pattern: ^[0-9]{16}$ + example: "4901542032375180" + + Tac: + description: Schema for the IMEI Type Allocation Code (TAC) of a physical mobile device + type: string + minLength: 8 + maxLength: 8 + pattern: ^[0-9]{8}$ + example: "49015420" + + Ppid: + description: Schema for the Pairwise Pseudonymous Identifier (PPID) of a physical mobile device + type: string + minLength: 64 + maxLength: 128 + pattern: ^[a-fA-F0-9]{64,128}$ + example: "b083f65ccdad365d7489fff24b6d5074b30c12b6d81db3404d25964ffd908813" + + RequestBody: + description: Common request body to allow optional Device object to be passed + type: object + properties: + device: + $ref: "../common/CAMARA_common.yaml#/components/schemas/Device" + + MatchRequestBody: + description: Request body for match-identifier operation, containing an optional mobile device subscription identifier, and the physical device identifier to match against + allOf: + - $ref: "#/components/schemas/RequestBody" + - type: object + oneOf: + - required: [imeisv] + - required: [imei] + - required: [tac] + properties: + imeisv: + $ref: "#/components/schemas/ImeiSv" + imei: + $ref: "#/components/schemas/Imei" + tac: + $ref: "#/components/schemas/Tac" + CommonResponseBody: description: | Common parameters to be included in all responses @@ -661,17 +717,9 @@ components: type: object properties: imeisv: - type: string - maxLength: 16 - pattern: ^[0-9]{16}$ - description: IMEISV of the device - example: "4901542032375180" + $ref: "#/components/schemas/ImeiSv" imei: - type: string - maxLength: 15 - pattern: ^[0-9]{15}$ - description: IMEI of the device - example: "490154203237518" + $ref: "#/components/schemas/Imei" RetrieveIdentifierResponse: description: Response body definition for retrieveIdentifier operation @@ -696,11 +744,7 @@ components: type: object properties: tac: - type: string - maxLength: 8 - pattern: ^[0-9]{8}$ - description: IMEI Type Allocation Code of the device - example: "49015420" + $ref: "#/components/schemas/Tac" model: description: Model of the device allOf: @@ -727,12 +771,7 @@ components: type: object properties: ppid: - type: string - minLength: 64 - maxLength: 128 - pattern: ^[a-fA-F0-9]{64,128}$ - description: A PPID for the identified physical device - example: "b083f65ccdad365d7489fff24b6d5074b30c12b6d81db3404d25964ffd908813" + $ref: "#/components/schemas/Ppid" RetrievePpidResponse: description: Response body definition for retrievePpid operation @@ -743,44 +782,6 @@ components: - $ref: "#/components/schemas/CommonResponseBody" - $ref: "#/components/schemas/DevicePpid" - RequestBody: - description: Common request body to allow optional Device object to be passed - type: object - properties: - device: - $ref: "../common/CAMARA_common.yaml#/components/schemas/Device" - - MatchRequestBody: - description: Request body for match-identifier operation, containing an optional mobile device subscription identifier, and the physical device identifier to match against - allOf: - - $ref: "#/components/schemas/RequestBody" - - type: object - required: - - providedIdentifierType - - providedIdentifier - properties: - providedIdentifierType: - $ref: "#/components/schemas/ProvidedIdentifierType" - providedIdentifier: - type: string - minLength: 8 - maxLength: 16 - pattern: ^[0-9]{8,16}$ - description: The device identifier value to match against. Must match the format constraints for the specified identifier type. - example: "490154203237518" - - ProvidedIdentifierType: - type: string - enum: - - IMEI - - IMEISV - - TAC - description: | - Type of the provided device identifier. Format requirements: - - IMEI: 15 digits (pattern: ^[0-9]{15}$) - - IMEISV: 16 digits (pattern: ^[0-9]{16}$) - - TAC: 8 digits (pattern: ^[0-9]{8}$) - MatchResult: description: | The result of matching the provided device identifier against the network's identifier for the subscription @@ -831,36 +832,32 @@ components: networkAccessIdentifier: "123456789@example.com" MatchDeviceBy3LeggedToken: - description: Match identifier when device is identified by access token + description: Match IMEISV when device is identified using a 3-legged access token value: - providedIdentifierType: "IMEISV" - providedIdentifier: "4901542032375181" + imeisv: "4901542032375181" MatchDeviceByPhoneNumber: - description: Matching device identifier by phone number and provided IMEI using a 2-legged access token + description: Matching IMEI when identifying device by phone number and using a 2-legged access token value: device: phoneNumber: "+123456789" - providedIdentifierType: "IMEI" - providedIdentifier: "490154203237518" + imei: "490154203237518" MatchDeviceByIPAddress: - description: Matching device identifier by IP address and provided TAC + description: Matching TAC when identifying device by IP address and using a 2-legged access token value: device: ipv4Address: publicAddress: "84.125.93.10" publicPort: 59765 - providedIdentifierType: "TAC" - providedIdentifier: "49015420" + tac: "49015420" MatchDeviceByMultipleIdentifiers: - description: Matching device identifier by multiple subscription identifiers and provided IMEISV + description: Matching IMEISV when identifying device by multiple identifiers and using a 2-legged access token value: device: phoneNumber: "+123456789" ipv4Address: publicAddress: "84.125.93.10" publicPort: 59765 - providedIdentifierType: "IMEISV" - providedIdentifier: "4901542032375180" + imeisv: "4901542032375180" diff --git a/code/Test_definitions/device-identifier-matchIdentifier.feature b/code/Test_definitions/device-identifier-matchIdentifier.feature index d1fbe20..1019ce5 100644 --- a/code/Test_definitions/device-identifier-matchIdentifier.feature +++ b/code/Test_definitions/device-identifier-matchIdentifier.feature @@ -32,8 +32,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And the resource "/device-identifier/vwip/match-identifier" 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" complies with the schema at "#/components/schemas/XCorrelator" - And the request body is compliant with the MatchRequestBody schema defined by "#/components/schemas/MatchRequestBody" + And the header "x-correlator" complies with the OAS schema at "#/components/schemas/XCorrelator" + And the request body complies with the OAS schema at "#/components/schemas/MatchRequestBody" And one of the scopes associated with the access token is device-identifier:match-identifier # Success scenarios @@ -44,8 +44,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier Given SIMCARD1 is installed within DEVICE1, which is connected to the network And the header "Authorization" is set to a valid access token that identifies DEVICE1 containing SIMCARD1 And request property "$.device" does not exist - And request property "$.providedIdentifierType" is set to "" - And request property "$.providedIdentifier" is set to + And request property "$." is set to "" + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 200 And the response body complies with the OAS schema at "#/components/schemas/MatchIdentifierResponse" @@ -53,16 +53,13 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And the response header "Content-Type" is "application/json" And the response property "$.match" exists and is true And the response property "$.lastChecked" exists and is either a valid date-time in the past, or is null - And the response property "$.imei" does not exist - And the response property "$.imeisv" does not exist - And the response property "$.tac" does not exist - And the response property "$.ppid" does not exist + And no other response properties are present Examples: - | providedIdentifierType | providedIdentifier | - | IMEI | IMEI1 | - | IMEISV | IMEISV1 | - | TAC | TAC1 | + | propertyName | providedIdentifier | + | imei | IMEI1 | + | imeisv | IMEISV1 | + | tac | TAC1 | # This scenario is only valid for 2-legged access tokens @DeviceIdentifier_matchIdentifier_200.02_success_scenario_2-legged_token_identifying_device_by_phone_number @@ -70,8 +67,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier Given SIMCARD1 is installed within DEVICE1, which is connected to the network And the header "Authorization" is set to a valid access token that does not identify a device And request property "$.device.phoneNumber" is set to PHONENUMBER1 - And request property "$.providedIdentifierType" is set to "IMEI" - And request property "$.providedIdentifier" is set to IMEI1 + And request property "$.imei" is set to IMEI1 + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 200 And the response body complies with the OAS schema at "#/components/schemas/MatchIdentifierResponse" @@ -79,10 +76,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And the response header "Content-Type" is "application/json" And the response property "$.match" exists and is true And the response property "$.lastChecked" exists and is either a valid date-time in the past, or is null - And the response property "$.imei" does not exist - And the response property "$.imeisv" does not exist - And the response property "$.tac" does not exist - And the response property "$.ppid" does not exist + And no other response properties are present # This scenario is only valid for 2-legged access tokens @DeviceIdentifier_matchIdentifier_200.02b_success_scenario_2-legged_token_identifying_device_by_phone_number_non_match @@ -90,8 +84,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier Given SIMCARD1 is installed within DEVICE1, which is connected to the network And the header "Authorization" is set to a valid access token that does not identify a device And request property "$.device.phoneNumber" is set to PHONENUMBER1 - And request property "$.providedIdentifierType" is set to "IMEI" - And request property "$.providedIdentifier" is set to IMEI2 + And request property "$.imei" is set to IMEI2 + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 200 And the response body complies with the OAS schema at "#/components/schemas/MatchIdentifierResponse" @@ -99,10 +93,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And the response header "Content-Type" is "application/json" And the response property "$.match" exists and is false And the response property "$.lastChecked" exists and is either a valid date-time in the past, or is null - And the response property "$.imei" does not exist - And the response property "$.imeisv" does not exist - And the response property "$.tac" does not exist - And the response property "$.ppid" does not exist + And no other response properties are present # This scenario is only valid for 2-legged access tokens @DeviceIdentifier_matchIdentifier_200.03_success_scenario_2-legged_token_identifying_device_by_IPv4_address @@ -111,8 +102,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And the header "Authorization" is set to a valid access token that does not identify a device And request property "$.device.ipv4Address.publicAddress" is set to PUBLICIPV4ADDRESS1 And request property "$.device.ipv4Address.publicPort" is set to PUBLICPORT1 - And request property "$.providedIdentifierType" is set to "TAC" - And request property "$.providedIdentifier" is set to TAC1 + And request property "$.tac" is set to TAC1 + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 200 And the response body complies with the OAS schema at "#/components/schemas/MatchIdentifierResponse" @@ -120,10 +111,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And the response header "Content-Type" is "application/json" And the response property "$.match" exists and is true And the response property "$.lastChecked" exists and is either a valid date-time in the past, or is null - And the response property "$.imei" does not exist - And the response property "$.imeisv" does not exist - And the response property "$.tac" does not exist - And the response property "$.ppid" does not exist + And no other response properties are present # This scenario is only valid for 2-legged access tokens @DeviceIdentifier_matchIdentifier_200.03b_success_scenario_2-legged_token_identifying_device_by_IPv4_address_non_match @@ -132,8 +120,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And the header "Authorization" is set to a valid access token that does not identify a device And request property "$.device.ipv4Address.publicAddress" is set to PUBLICIPV4ADDRESS1 And request property "$.device.ipv4Address.publicPort" is set to PUBLICPORT1 - And request property "$.providedIdentifierType" is set to "TAC" - And request property "$.providedIdentifier" is set to TAC2 + And request property "$.tac" is set to TAC2 + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 200 And the response body complies with the OAS schema at "#/components/schemas/MatchIdentifierResponse" @@ -141,10 +129,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And the response header "Content-Type" is "application/json" And the response property "$.match" exists and is false And the response property "$.lastChecked" exists and is either a valid date-time in the past, or is null - And the response property "$.imei" does not exist - And the response property "$.imeisv" does not exist - And the response property "$.tac" does not exist - And the response property "$.ppid" does not exist + And no other response properties are present # This scenario is only valid for 2-legged access tokens @DeviceIdentifier_matchIdentifier_200.04_success_scenario_2-legged_token_identifying_device_by_multiple_identifiers @@ -154,8 +139,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And request property "$.device.phoneNumber" is set to PHONENUMBER1 And request property "$.device.ipv4Address.publicAddress" is set to PUBLICIPV4ADDRESS1 And request property "$.device.ipv4Address.publicPort" is set to PUBLICPORT1 - And request property "$.providedIdentifierType" is set to "IMEISV" - And request property "$.providedIdentifier" is set to IMEISV1 + And request property "$.imeisv" is set to IMEISV1 + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 200 And the response body complies with the OAS schema at "#/components/schemas/MatchIdentifierResponse" @@ -163,10 +148,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And the response header "Content-Type" is "application/json" And the response property "$.match" exists and is true And the response property "$.lastChecked" exists and is either a valid date-time in the past, or is null - And the response property "$.imei" does not exist - And the response property "$.imeisv" does not exist - And the response property "$.tac" does not exist - And the response property "$.ppid" does not exist + And the response property "$.device" exists and complies with the OAS schema at "#/components/schemas/DeviceResponse" + And no other response properties are present # This scenario is only valid for 2-legged access tokens @DeviceIdentifier_matchIdentifier_200.04b_success_scenario_2-legged_token_identifying_device_by_multiple_identifiers_non_match @@ -176,8 +159,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And request property "$.device.phoneNumber" is set to PHONENUMBER1 And request property "$.device.ipv4Address.publicAddress" is set to PUBLICIPV4ADDRESS1 And request property "$.device.ipv4Address.publicPort" is set to PUBLICPORT1 - And request property "$.providedIdentifierType" is set to "IMEISV" - And request property "$.providedIdentifier" is set to IMEISV2 + And request property "$.imeisv" is set to IMEISV2 + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 200 And the response body complies with the OAS schema at "#/components/schemas/MatchIdentifierResponse" @@ -185,10 +168,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And the response header "Content-Type" is "application/json" And the response property "$.match" exists and is false And the response property "$.lastChecked" exists and is either a valid date-time in the past, or is null - And the response property "$.imei" does not exist - And the response property "$.imeisv" does not exist - And the response property "$.tac" does not exist - And the response property "$.ppid" does not exist + And the response property "$.device" exists and complies with the OAS schema at "#/components/schemas/DeviceResponse" + And no other response properties are present # This scenario is only valid for 3-legged access tokens @DeviceIdentifier_matchIdentifier_200.05_success_scenario_3-legged_token_after_device_swap_mismatch @@ -196,8 +177,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier Given SIMCARD1 is installed within DEVICE2, which is connected to the network And the header "Authorization" is set to a valid access token that identifies DEVICE2 containing SIMCARD1 And request property "$.device" does not exist - And request property "$.providedIdentifierType" is set to "" - And request property "$.providedIdentifier" is set to + And request property "$." is set to + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 200 And the response body complies with the OAS schema at "#/components/schemas/MatchIdentifierResponse" @@ -205,16 +186,13 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And the response header "Content-Type" is "application/json" And the response property "$.match" exists and is false And the response property "$.lastChecked" exists and is either a valid date-time in the past, or is null - And the response property "$.imei" does not exist - And the response property "$.imeisv" does not exist - And the response property "$.tac" does not exist - And the response property "$.ppid" does not exist + And no other response properties are present Examples: - | providedIdentifierType | providedIdentifier | - | IMEI | IMEI1 | - | IMEISV | IMEISV1 | - | TAC | TAC1 | + | propertyName | providedIdentifier | + | imei | IMEI1 | + | imeisv | IMEISV1 | + | tac | TAC1 | # This scenario is only valid for 3-legged access tokens @DeviceIdentifier_matchIdentifier_200.05b_success_scenario_3-legged_token_after_device_swap_match @@ -222,8 +200,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier Given SIMCARD1 is installed within DEVICE2, which is connected to the network And the header "Authorization" is set to a valid access token that identifies DEVICE2 containing SIMCARD1 And request property "$.device" does not exist - And request property "$.providedIdentifierType" is set to "" - And request property "$.providedIdentifier" is set to + And request property "$." is set to + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 200 And the response body complies with the OAS schema at "#/components/schemas/MatchIdentifierResponse" @@ -231,16 +209,13 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And the response header "Content-Type" is "application/json" And the response property "$.match" exists and is true And the response property "$.lastChecked" exists and is either a valid date-time in the past, or is null - And the response property "$.imei" does not exist - And the response property "$.imeisv" does not exist - And the response property "$.tac" does not exist - And the response property "$.ppid" does not exist + And no other response properties are present Examples: - | providedIdentifierType | providedIdentifier | - | IMEI | IMEI2 | - | IMEISV | IMEISV2 | - | TAC | TAC2 | + | propertyName | providedIdentifier | + | imei | IMEI1 | + | imeisv | IMEISV1 | + | tac | TAC1 | # This scenario is only valid for 2-legged access tokens @DeviceIdentifier_matchIdentifier_200.06_success_scenario_2-legged_token_after_SIM_card_swap @@ -248,8 +223,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier Given SIMCARD2 is installed within DEVICE1, which is connected to the network And the header "Authorization" is set to a valid access token that does not identify a device And request property "$.device.phoneNumber" is set to PHONENUMBER2 - And request property "$.providedIdentifierType" is set to "IMEI" - And request property "$.providedIdentifier" is set to IMEI1 + And request property "$.imei" is set to IMEI1 + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 200 And the response body complies with the OAS schema at "#/components/schemas/MatchIdentifierResponse" @@ -257,17 +232,14 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And the response header "Content-Type" is "application/json" And the response property "$.match" exists and is true And the response property "$.lastChecked" exists and is either a valid date-time in the past, or is null - And the response property "$.imei" does not exist - And the response property "$.imeisv" does not exist - And the response property "$.tac" does not exist - And the response property "$.ppid" does not exist + And no other response properties are present # Generic 400 errors # This scenario is valid for both 2-legged and 3-legged access tokens @DeviceIdentifier_matchIdentifier_400.1_schema_not_compliant Scenario: Invalid Argument. Generic Syntax Exception - Given the request body is set to any value which is not compliant with the schema at "#/components/schemas/MatchRequestBody" + Given the request body is set to any value which is not compliant with the OAS schema at "#/components/schemas/MatchRequestBody" When the request "matchIdentifier" is sent Then the response status code is 400 And the response header "x-correlator" has same value as the request header "x-correlator" @@ -292,8 +264,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier @DeviceIdentifier_matchIdentifier_400.2b_device_empty Scenario: The device value is an empty object Given the request body property "$.device" exists and is set to: {} - And the request body property "$.providedIdentifierType" is set to "IMEI" - And the request body property "$.providedIdentifier" is set to IMEI1 + And the request body property "$.imei" is set to IMEI1 + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 400 And the response header "x-correlator" has same value as the request header "x-correlator" @@ -307,9 +279,9 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier # Note that device schema validation errors (if any) should be thrown even if a 3-legged access token is being used Scenario Outline: Some device identifier value does not comply with the schema Given a valid 2-legged or 3-legged access token is being used - And the request body property "$.providedIdentifierType" is set to "IMEI" - And the request body property "$.providedIdentifier" is set to IMEI1 - And the request body property "" does not comply with the OAS schema at "" + And the request body property "$.imei" is set to IMEI1 + And the request body property "" exits but does not comply with the OAS schema at "" + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 400 And the response header "x-correlator" has same value as the request header "x-correlator" @@ -327,10 +299,11 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier # This scenario is valid for both 2-legged and 3-legged access tokens @DeviceIdentifier_matchIdentifier_400.4_invalid_identifier_type - Scenario: Unsupported providedIdentifierType enum value + Scenario: Unsupported identifier type Given a valid 2-legged or 3-legged access token is being used - And the request body property "$.providedIdentifierType" is set to "INVALID_TYPE" - And the request body property "$.providedIdentifier" is set to IMEI1 + And the request body property "$.device" exists if a 2-legged access token is being used + And the request body property "$.model" is set to "model" + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 400 And the response header "x-correlator" has same value as the request header "x-correlator" @@ -343,8 +316,9 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier @DeviceIdentifier_matchIdentifier_400.5_invalid_identifier_format Scenario Outline: Provided identifier does not comply with the format required by the identifier type Given a valid 2-legged or 3-legged access token is being used - And the request body property "$.providedIdentifierType" is set to "" - And the request body property "$.providedIdentifier" is set to "" + And the request body property "$.device" exists if a 2-legged access token is being used + And the request body property "$." is set to "" + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 400 And the response header "x-correlator" has same value as the request header "x-correlator" @@ -354,13 +328,13 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier And the response property "$.message" contains a user friendly text Examples: - | providedIdentifierType | providedIdentifier | - | IMEI | 12345678901234 | - | IMEISV | 123456789012345 | - | TAC | 1234567 | - | IMEI | 1234567890ABCDE | - | IMEISV | 1234567890ABCDEF | - | TAC | 12!45678 | + | propertyName | providedIdentifier | + | imei | 12345678901234 | + | imeisv | 123456789012345 | + | tac | 1234567 | + | imei | 1234567890ABCDE | + | imeisv | 1234567890ABCDEF | + | tac | 12!45678 | # Generic 401 errors @@ -417,9 +391,9 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier @DeviceIdentifier_matchIdentifier_404.1_device_not_found Scenario: An identifier cannot be matched to a valid device Given the header "Authorization" is set to a valid access token that does not identify a device - And the request body property "$.device" is compliant with the request body schema but does not identify a valid device - And the request body property "$.providedIdentifierType" is set to "IMEI" - And the request body property "$.providedIdentifier" is set to IMEI1 + And the request body property "$.device" is compliant with the OAS schema at "#/components/schemas/Device" but does not identify a valid device + And the request body property "$.imei" is set to IMEI1 + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 404 And the response header "x-correlator" has same value as the request header "x-correlator" @@ -436,8 +410,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier Given that some types of device identifiers are not supported by the implementation And the header "Authorization" is set to a valid access token that does not identify a device And the request body property "$.device" only includes device identifiers not supported by the implementation - And the request body property "$.providedIdentifierType" is set to "IMEI" - And the request body property "$.providedIdentifier" is set to IMEI1 + And the request body property "$.imei" is set to IMEI1 + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 422 And the response header "x-correlator" has same value as the request header "x-correlator" @@ -453,8 +427,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier Given that the matchIdentifier service is not applicable for the identified mobile device subscription And a valid 2-legged or 3-legged access token is being used And a valid device is identified by the access token or the request body property "$.device" - And the request body property "$.providedIdentifierType" is set to "IMEI" - And the request body property "$.providedIdentifier" is set to IMEI1 + And the request body property "$.imei" is set to IMEI1 + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 422 And the response header "x-correlator" has same value as the request header "x-correlator" @@ -468,8 +442,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier Scenario: Device not included and cannot be deduced from the access token Given the header "Authorization" is set to a valid access token which does not identify a device And the request body property "$.device" is not included - And the request body property "$.providedIdentifierType" is set to "IMEI" - And the request body property "$.providedIdentifier" is set to IMEI1 + And the request body property "$.imei" is set to IMEI1 + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 422 And the response header "x-correlator" has same value as the request header "x-correlator" @@ -483,8 +457,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier Scenario: Explicit device identifier provided when a 3-legged access token identifies a different device Given the header "Authorization" is set to a valid access token that identifies DEVICE1 containing SIMCARD1 And the request body property "$.device" exists and identifies DEVICE2 containing SIMCARD2 - And the request body property "$.providedIdentifierType" is set to "IMEI" - And the request body property "$.providedIdentifier" is set to IMEI1 + And the request body property "$.imei" is set to IMEI1 + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 422 And the response header "x-correlator" has same value as the request header "x-correlator" @@ -498,8 +472,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier Scenario: Explicit device identifier provided when a 3-legged access token identifies the same device Given the header "Authorization" is set to a valid access token that identifies DEVICE1 containing SIMCARD1 And the request body property "$.device" exists and also identifies DEVICE1 containing SIMCARD1 - And the request body property "$.providedIdentifierType" is set to "IMEI" - And the request body property "$.providedIdentifier" is set to IMEI1 + And the request body property "$.imei" is set to IMEI1 + And no other request properties are present When the request "matchIdentifier" is sent Then the response status code is 422 And the response header "x-correlator" has same value as the request header "x-correlator" diff --git a/code/Test_definitions/device-identifier-retrieveIdentifier.feature b/code/Test_definitions/device-identifier-retrieveIdentifier.feature index db64b48..f4c0316 100644 --- a/code/Test_definitions/device-identifier-retrieveIdentifier.feature +++ b/code/Test_definitions/device-identifier-retrieveIdentifier.feature @@ -33,8 +33,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: retrieveIdentifi And the resource "/device-identifier/vwip/retrieve-identifier" 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" complies with the schema at "#/components/schemas/XCorrelator" - And the request body is compliant with the RequestBody schema defined by "#/components/schemas/RequestBody" + And the header "x-correlator" complies with the OAS schema at "#/components/schemas/XCorrelator" + And the request body complies with the OAS schema at "#/components/schemas/RequestBody" And one of the scopes associated with the access token is device-identifier:retrieve-identifier # Success scenarios @@ -171,7 +171,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: retrieveIdentifi # This scenario is valid for both 2-legged and 3-legged access tokens @DeviceIdentifier_retrieveIdentifier_400.1_schema_not_compliant Scenario: Invalid Argument. Generic Syntax Exception - Given the request body is set to any value which is not compliant with the schema at "#/components/schemas/RequestBody" + Given the request body is set to any value which is not compliant with the OAS schema at "#/components/schemas/RequestBody" When the request "retrieveIdentifier" is sent Then the response status code is 400 And the response header "x-correlator" has same value as the request header "x-correlator" @@ -296,7 +296,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: retrieveIdentifi @DeviceIdentifier_retrieveIdentifier_404.1_device_not_found Scenario: An identifier cannot be matched to a valid device Given the header "Authorization" is set to a valid access token that does not identify a device - And the request body property "$.device" is compliant with the request body schema but does not identify a valid device + And the request body property "$.device" is compliant with the OAS schema at "#/components/schemas/Device" but does not identify a valid device When the request "retrieveIdentifier" is sent Then the response status code is 404 And the response header "x-correlator" has same value as the request header "x-correlator" diff --git a/code/Test_definitions/device-identifier-retrievePpid.feature b/code/Test_definitions/device-identifier-retrievePpid.feature index d2b7dd4..49de079 100644 --- a/code/Test_definitions/device-identifier-retrievePpid.feature +++ b/code/Test_definitions/device-identifier-retrievePpid.feature @@ -35,8 +35,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: retrievePpid And the resource "/device-identifier/vwip/retrieve-ppid" 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" complies with the schema at "#/components/schemas/XCorrelator" - And the request body is compliant with the RequestBody schema defined by "#/components/schemas/RequestBody" + And the header "x-correlator" complies with the OAS schema at "#/components/schemas/XCorrelator" + And the request body complies with the OAS schema at "#/components/schemas/RequestBody" And one of the scopes associated with the access token is device-identifier:retrieve-ppid # Success scenarios @@ -270,7 +270,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: retrievePpid @DeviceIdentifier_retrievePpid_404.1_device_not_found Scenario: An identifier cannot be matched to a valid device Given the header "Authorization" is set to a valid access token that does not identify a device - And the request body property "$.device" is compliant with the request body schema but does not identify a valid device + And the request body property "$.device" is compliant with the OAS schema at "#/components/schemas/Device" but does not identify a valid device When the request "retrievePpid" is sent Then the response status code is 404 And the response header "x-correlator" has same value as the request header "x-correlator" diff --git a/code/Test_definitions/device-identifier-retrieveType.feature b/code/Test_definitions/device-identifier-retrieveType.feature index 99584d0..e8f990c 100644 --- a/code/Test_definitions/device-identifier-retrieveType.feature +++ b/code/Test_definitions/device-identifier-retrieveType.feature @@ -33,8 +33,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: retrieveType And the resource "/device-identifier/vwip/retrieve-type" 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" complies with the schema at "#/components/schemas/XCorrelator" - And the request body is compliant with the RequestBody schema defined by "#/components/schemas/RequestBody" + And the header "x-correlator" complies with the OAS schema at "#/components/schemas/XCorrelator" + And the request body complies with the OAS schema at "#/components/schemas/RequestBody" And one of the scopes associated with the access token is device-identifier:retrieve-type # Success scenarios @@ -157,7 +157,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: retrieveType # This scenario is valid for both 2-legged and 3-legged access tokens @DeviceIdentifier_retrieveType_400.1_schema_not_compliant Scenario: Invalid Argument. Generic Syntax Exception - Given the request body is set to any value which is not compliant with the schema at "#/components/schemas/RequestBody" + Given the request body is set to any value which is not compliant with the OAS schema at "#/components/schemas/RequestBody" When the request "retrieveType" is sent Then the response status code is 400 And the response header "x-correlator" has same value as the request header "x-correlator" @@ -282,7 +282,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: retrieveType @DeviceIdentifier_retrieveType_404.1_device_not_found Scenario: An identifier cannot be matched to a valid device Given the header "Authorization" is set to a valid access token that does not identify a device - And the request body property "$.device" is compliant with the request body schema but does not identify a valid device + And the request body property "$.device" is compliant with the OAS schema at "#/components/schemas/Device" but does not identify a valid device When the request "retrieveType" is sent Then the response status code is 404 And the response header "x-correlator" has same value as the request header "x-correlator"