Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions code/API_definitions/device-reachability-status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions code/Test_definitions/device-reachability-status.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

#################
Expand Down
Loading