From ebda76741463b48bdc16c22f51877c78027ff5f7 Mon Sep 17 00:00:00 2001 From: sachinvodafone <84573274+sachinvodafone@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:07:19 +0100 Subject: [PATCH 1/8] Addition of "lastChecked" Field What type of PR is this? Add one of the following kinds: correction What this PR does / why we need it: The CAMARA version of the current DeviceStatus API lacks a crucial "lastChecked" field, resulting in inconsistent behavior across vendors. This absence poses challenges for application developers in determining the freshness of roaming status/connectivity data. Which issue(s) this PR fixes: Fixes #110 --- code/API_definitions/device-status.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/code/API_definitions/device-status.yaml b/code/API_definitions/device-status.yaml index fa5c45f6..20a80be0 100644 --- a/code/API_definitions/device-status.yaml +++ b/code/API_definitions/device-status.yaml @@ -45,6 +45,8 @@ info: - `CONNECTED_DATA`, if device is connected to the network via data usage - `NOT_CONNECTED`, if device is not connected to the network + * **lastChecked** : Indicate when the information provided was last confirmed to be correct. + # API Functionality The API exposes following capabilities: @@ -151,12 +153,15 @@ paths: examples: Connected-With-SMS: value: + lastChecked: "2024-02-20T10:41:38.657Z" connectivityStatus: CONNECTED_SMS Connected-With-DATA: value: + lastChecked: "2024-02-20T10:41:38.657Z" connectivityStatus: CONNECTED_DATA Not-Connected: value: + lastChecked: "2024-02-20T10:41:38.657Z" connectivityStatus: NOT_CONNECTED "400": $ref: "#/components/responses/Generic400" @@ -201,16 +206,19 @@ paths: examples: No-Country-Name: value: + lastChecked: "2024-02-20T10:41:38.657Z" roaming: true countryCode: 901 countryName: [] Single-Country-Code: value: + lastChecked: "2024-02-20T10:41:38.657Z" roaming: true countryCode: 262 countryName: ["DE"] Multiple-Country-Codes: value: + lastChecked: "2024-02-20T10:41:38.657Z" roaming: true countryCode: 340 countryName: ["BL", "GF", "GP", "MF", "MQ"] @@ -466,8 +474,11 @@ components: RoamingStatusResponse: type: object required: + - lastChecked - roaming properties: + lastChecked: + $ref: "#/components/schemas/LastChecked" roaming: $ref: "#/components/schemas/ActiveRoaming" countryCode: @@ -475,6 +486,12 @@ components: countryName: $ref: "#/components/schemas/CountryName" + LastChecked: + description: Last time that the associated device roaming status/connectivity was checked and, if necessary, updated + type: string + format: date-time + example: "2024-02-20T10:41:38.657Z" + ActiveRoaming: description: Roaming status. True, if it is roaming type: boolean @@ -482,8 +499,11 @@ components: ConnectivityStatusResponse: type: object required: + - lastChecked - connectivityStatus properties: + lastChecked: + $ref: "#/components/schemas/LastChecked" connectivityStatus: $ref: "#/components/schemas/ConnectivityStatus" From 79fe112277fab5d6445af48e49c0dfe116319fb1 Mon Sep 17 00:00:00 2001 From: sachinvodafone <84573274+sachinvodafone@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:39:18 +0100 Subject: [PATCH 2/8] Update device-status.yaml --- code/API_definitions/device-status.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/code/API_definitions/device-status.yaml b/code/API_definitions/device-status.yaml index 20a80be0..9c208bb5 100644 --- a/code/API_definitions/device-status.yaml +++ b/code/API_definitions/device-status.yaml @@ -46,7 +46,6 @@ info: - `NOT_CONNECTED`, if device is not connected to the network * **lastChecked** : Indicate when the information provided was last confirmed to be correct. - # API Functionality The API exposes following capabilities: From ce3bd7c1040ea61739c930ee92283b506ef94a61 Mon Sep 17 00:00:00 2001 From: sachinvodafone <84573274+sachinvodafone@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:42:51 +0100 Subject: [PATCH 3/8] Update device-status.yaml --- code/API_definitions/device-status.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/API_definitions/device-status.yaml b/code/API_definitions/device-status.yaml index 9c208bb5..319c9917 100644 --- a/code/API_definitions/device-status.yaml +++ b/code/API_definitions/device-status.yaml @@ -490,7 +490,7 @@ components: type: string format: date-time example: "2024-02-20T10:41:38.657Z" - + ActiveRoaming: description: Roaming status. True, if it is roaming type: boolean From c1e94ac7181b38e64a06d73ec17db426916bb819 Mon Sep 17 00:00:00 2001 From: sachinvodafone <84573274+sachinvodafone@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:47:06 +0100 Subject: [PATCH 4/8] Update device-status.yaml --- code/API_definitions/device-status.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/API_definitions/device-status.yaml b/code/API_definitions/device-status.yaml index 319c9917..8a41f541 100644 --- a/code/API_definitions/device-status.yaml +++ b/code/API_definitions/device-status.yaml @@ -490,7 +490,7 @@ components: type: string format: date-time example: "2024-02-20T10:41:38.657Z" - + ActiveRoaming: description: Roaming status. True, if it is roaming type: boolean From b3d65e77dc011749ea4155a0703994eeafa48331 Mon Sep 17 00:00:00 2001 From: sachinvodafone <84573274+sachinvodafone@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:49:07 +0100 Subject: [PATCH 5/8] Update device-status.yaml --- code/API_definitions/device-status.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/API_definitions/device-status.yaml b/code/API_definitions/device-status.yaml index 8a41f541..992dd293 100644 --- a/code/API_definitions/device-status.yaml +++ b/code/API_definitions/device-status.yaml @@ -490,7 +490,7 @@ components: type: string format: date-time example: "2024-02-20T10:41:38.657Z" - + ActiveRoaming: description: Roaming status. True, if it is roaming type: boolean From d37cfbf78ff6ee87884b6ef84ad5640bca7e0c7e Mon Sep 17 00:00:00 2001 From: sachinvodafone <84573274+sachinvodafone@users.noreply.github.com> Date: Fri, 26 Apr 2024 11:32:37 +0100 Subject: [PATCH 6/8] Update device-status.yaml --- code/API_definitions/device-status.yaml | 26 ++++++++++++------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/code/API_definitions/device-status.yaml b/code/API_definitions/device-status.yaml index 992dd293..40566fbb 100644 --- a/code/API_definitions/device-status.yaml +++ b/code/API_definitions/device-status.yaml @@ -45,7 +45,7 @@ info: - `CONNECTED_DATA`, if device is connected to the network via data usage - `NOT_CONNECTED`, if device is not connected to the network - * **lastChecked** : Indicate when the information provided was last confirmed to be correct. + * **LastStatusTime** : This property specifies the time when the status was last checked. Its inclusion in the response indicates that the information may not be current, while its absence suggests that the status information is fresh. # API Functionality The API exposes following capabilities: @@ -152,15 +152,15 @@ paths: examples: Connected-With-SMS: value: - lastChecked: "2024-02-20T10:41:38.657Z" + lastStatusTime: "2024-02-20T10:41:38.657Z" connectivityStatus: CONNECTED_SMS Connected-With-DATA: value: - lastChecked: "2024-02-20T10:41:38.657Z" + lastStatusTime: "2024-02-20T10:41:38.657Z" connectivityStatus: CONNECTED_DATA Not-Connected: value: - lastChecked: "2024-02-20T10:41:38.657Z" + lastStatusTime: "2024-02-20T10:41:38.657Z" connectivityStatus: NOT_CONNECTED "400": $ref: "#/components/responses/Generic400" @@ -205,19 +205,19 @@ paths: examples: No-Country-Name: value: - lastChecked: "2024-02-20T10:41:38.657Z" + lastStatusTime: "2024-02-20T10:41:38.657Z" roaming: true countryCode: 901 countryName: [] Single-Country-Code: value: - lastChecked: "2024-02-20T10:41:38.657Z" + lastStatusTime: "2024-02-20T10:41:38.657Z" roaming: true countryCode: 262 countryName: ["DE"] Multiple-Country-Codes: value: - lastChecked: "2024-02-20T10:41:38.657Z" + lastStatusTime: "2024-02-20T10:41:38.657Z" roaming: true countryCode: 340 countryName: ["BL", "GF", "GP", "MF", "MQ"] @@ -473,11 +473,10 @@ components: RoamingStatusResponse: type: object required: - - lastChecked - roaming properties: - lastChecked: - $ref: "#/components/schemas/LastChecked" + lastStatusTime: + $ref: "#/components/schemas/LastStatusTime" roaming: $ref: "#/components/schemas/ActiveRoaming" countryCode: @@ -485,7 +484,7 @@ components: countryName: $ref: "#/components/schemas/CountryName" - LastChecked: + LastStatusTime: description: Last time that the associated device roaming status/connectivity was checked and, if necessary, updated type: string format: date-time @@ -498,11 +497,10 @@ components: ConnectivityStatusResponse: type: object required: - - lastChecked - connectivityStatus properties: - lastChecked: - $ref: "#/components/schemas/LastChecked" + lastStatusTime: + $ref: "#/components/schemas/LastStatusTime" connectivityStatus: $ref: "#/components/schemas/ConnectivityStatus" From 71add1c0ef44c16fda736ea687d3d596b41fb507 Mon Sep 17 00:00:00 2001 From: sachinvodafone <84573274+sachinvodafone@users.noreply.github.com> Date: Fri, 26 Apr 2024 11:56:13 +0100 Subject: [PATCH 7/8] Update device-status.yaml From ee2cad7f3c8095476123f03fec0f334046327788 Mon Sep 17 00:00:00 2001 From: sachinvodafone <84573274+sachinvodafone@users.noreply.github.com> Date: Fri, 26 Apr 2024 12:07:08 +0100 Subject: [PATCH 8/8] Update device-status.yaml --- code/API_definitions/device-status.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/API_definitions/device-status.yaml b/code/API_definitions/device-status.yaml index 83eb3644..77a02255 100644 --- a/code/API_definitions/device-status.yaml +++ b/code/API_definitions/device-status.yaml @@ -845,11 +845,11 @@ components: type: string format: date-time description: | - Timestamp of when the occurrence happened. - If the time of the occurrence cannot be determined then this attribute MAY be set to some other time (such as the current time) by the CloudEvents producer, - however all producers for the same source MUST be consistent in this respect. In other words, - either they all use the actual time of the occurrence or they all use the same algorithm to determine the value used. - It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. + Timestamp of when the occurrence happened. + If the time of the occurrence cannot be determined then this attribute MAY be set to some other time (such as the current time) by the CloudEvents producer, + however all producers for the same source MUST be consistent in this respect. In other words, + either they all use the actual time of the occurrence or they all use the same algorithm to determine the value used. + It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. Recommended format is yyyy-MM-dd'T'HH:mm:ss.SSSZ (i.e. which allows 2023-07-03T14:27:08.312+02:00 or 2023-07-03T12:27:08.312Z) example: "2018-04-05T17:31:00Z"