diff --git a/code/API_definitions/device-reachability-status.yaml b/code/API_definitions/device-reachability-status.yaml index 9b2d9b9..f8200c6 100644 --- a/code/API_definitions/device-reachability-status.yaml +++ b/code/API_definitions/device-reachability-status.yaml @@ -166,6 +166,11 @@ paths: value: lastStatusTime: "2024-02-20T10:41:38.657Z" reachable: false + Last Status Time is Unknown: + description: The API provider has recorded that the device is currently unreachable, but has no information as to when that status was last confirmed to be correct. The API consumer must take this uncertainty into account when deciding upon the value of the information to them. + value: + lastStatusTime: null + reachable: false "400": $ref: "../common/CAMARA_common.yaml#/components/responses/Generic400" "401": @@ -191,8 +196,11 @@ components: description: | The last time that the device reachability status was confirmed to be correct by the API provider. The status should still be valid, but the API provider is unable to confirm this. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. - allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/DateTime" + type: string + format: date-time + maxLength: 64 + nullable: true + example: "2018-04-05T17:31:00Z" ReachabilityStatusResponse: description: Response body definition for a device reachability request diff --git a/code/Test_definitions/device-reachability-status.feature b/code/Test_definitions/device-reachability-status.feature index 2faacee..0ed9434 100644 --- a/code/Test_definitions/device-reachability-status.feature +++ b/code/Test_definitions/device-reachability-status.feature @@ -36,7 +36,7 @@ Feature: CAMARA Device reachability status API, vwip - Operation getReachability And the response body complies with the OAS schema at "#/components/schemas/ReachabilityStatusResponse" And the response property "$.reachable" is true And the response property "$.connectivity" includes "SMS" - And the response property "$.lastStatusTime" is present and has a valid date-time format for a time in the past + And the response property "$.lastStatusTime" is present and either has a valid date-time format for a time in the past, or is null @device_reachability_status_02_reachable_and_connected_data Scenario: Check the reachability status if device is connected with DATA @@ -50,7 +50,7 @@ Feature: CAMARA Device reachability status API, vwip - Operation getReachability And the response body complies with the OAS schema at "#/components/schemas/ReachabilityStatusResponse" And the response property "$.reachable" is true And the response property "$.connectivity" includes "DATA" - And the response property "$.lastStatusTime" is present and has a valid date-time format for a time in the past + And the response property "$.lastStatusTime" is present and either has a valid date-time format for a time in the past, or is null @device_reachability_status_03_reachable_and_connected_data_and_sms Scenario: Check the reachability status if device is connected with DATA and SMS @@ -64,7 +64,7 @@ Feature: CAMARA Device reachability status API, vwip - Operation getReachability And the response body complies with the OAS schema at "#/components/schemas/ReachabilityStatusResponse" And the response property "$.reachable" is true And the response property "$.connectivity" includes both "DATA" and "SMS" - And the response property "$.lastStatusTime" is present and has a valid date-time format for a time in the past + And the response property "$.lastStatusTime" is present and either has a valid date-time format for a time in the past, or is null @device_reachability_status_04_not_reachable Scenario: Check the reachability status for an unreachable device @@ -76,7 +76,7 @@ Feature: CAMARA Device reachability status API, vwip - Operation getReachability And the response header "x-correlator" has same value as the request header "x-correlator" And the response body complies with the OAS schema at "#/components/schemas/ReachabilityStatusResponse" And the response property "$.reachable" is false - And the response property "$.lastStatusTime" is present and has a valid date-time format for a time in the past + And the response property "$.lastStatusTime" is present and either has a valid date-time format for a time in the past, or is null And the response property "$.connectivity" is not present #################