From 32f9c1c45b87d959dfb327f743b8e9a4f1050295 Mon Sep 17 00:00:00 2001 From: Jim Feng Date: Thu, 8 Oct 2026 16:00:41 +0200 Subject: [PATCH] Use int32-range bounds for arrays and device counters (#145) Arrays: - Set maxItems of the AccessDevices and Devices base schemas from 9007199254740991 to the int32 maximum (2147483647). - Narrow every use of them to the operative bound: the listAccessDevices page (AccessDevicesPage.items) now has minItems 0 / maxItems 100, matching perPage (maximum 100) and the other page arrays. AddedAccessDevices, CreateAccessRequest and AddDevicesRequest already narrow to minItems 1 / maxItems 100. Device counters: - Change AccessStats.totalDevices, totalGranted and totalDenied and NetworkProfile.maxNumberOfDevices from int64 (maximum 9007199254740991) to int32 (maximum 2147483647), in line with the Commonalities TotalCount, which counts the same devices in the listAccessDevices pagination. The other bounds listed in the issue were already set to 100 by the pagination changes. --- .../dedicated-network-accesses.yaml | 22 +++++++++++-------- .../dedicated-network-profiles.yaml | 4 ++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/code/API_definitions/dedicated-network-accesses.yaml b/code/API_definitions/dedicated-network-accesses.yaml index 050260c..c4a536e 100644 --- a/code/API_definitions/dedicated-network-accesses.yaml +++ b/code/API_definitions/dedicated-network-accesses.yaml @@ -773,7 +773,11 @@ components: - pagination properties: items: - $ref: "#/components/schemas/AccessDevices" + description: A list of access devices + allOf: + - $ref: "#/components/schemas/AccessDevices" + - minItems: 0 + - maxItems: 100 pagination: $ref: "../common/CAMARA_common.yaml#/components/schemas/Pagination" @@ -781,7 +785,7 @@ components: description: A list of access devices type: array minItems: 0 - maxItems: 9007199254740991 + maxItems: 2147483647 items: $ref: "#/components/schemas/AccessDevice" @@ -897,21 +901,21 @@ components: totalDevices: description: the total number of devices included in the access (regardless of status) type: integer - format: int64 + format: int32 minimum: 0 - maximum: 9007199254740991 + maximum: 2147483647 totalGranted: description: the total number of devices included in the access with status GRANTED type: integer - format: int64 + format: int32 minimum: 0 - maximum: 9007199254740991 + maximum: 2147483647 totalDenied: description: the total number of devices included in the access with status DENIED type: integer - format: int64 + format: int32 minimum: 0 - maximum: 9007199254740991 + maximum: 2147483647 required: - totalDevices - totalGranted @@ -1170,7 +1174,7 @@ components: Devices: description: A list of devices type: array - maxItems: 9007199254740991 + maxItems: 2147483647 items: $ref: "../common/CAMARA_common.yaml#/components/schemas/Device" diff --git a/code/API_definitions/dedicated-network-profiles.yaml b/code/API_definitions/dedicated-network-profiles.yaml index 5ef9f17..e4dd11c 100644 --- a/code/API_definitions/dedicated-network-profiles.yaml +++ b/code/API_definitions/dedicated-network-profiles.yaml @@ -217,9 +217,9 @@ components: description: The maximum number of devices that can simultaneously use and share the dedicated network under this profile up to the limits set by the profile's performance characteristics type: integer example: 5 - format: int64 + format: int32 minimum: 1 - maximum: 9007199254740991 + maximum: 2147483647 aggregatedUlThroughput: $ref: "#/components/schemas/BitRate" aggregatedDlThroughput: