From 69cb90ddd96551a90f0c268d9ee19f1598fb8a3c Mon Sep 17 00:00:00 2001 From: Eric Murray Date: Mon, 14 Sep 2026 14:13:11 +0100 Subject: [PATCH] Refactor subscription schemas and update references --- .../device-data-volume-subscriptions.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/code/API_definitions/device-data-volume-subscriptions.yaml b/code/API_definitions/device-data-volume-subscriptions.yaml index dd06b0f..d0fa375 100644 --- a/code/API_definitions/device-data-volume-subscriptions.yaml +++ b/code/API_definitions/device-data-volume-subscriptions.yaml @@ -358,21 +358,26 @@ components: $ref: "../common/CAMARA_event_common.yaml#/components/schemas/SubscriptionId" schemas: - SubscriptionDetailLocal: + SubscriptionDetail: description: The details of the requested device data volume subscription. type: object properties: device: $ref: "../common/CAMARA_common.yaml#/components/schemas/Device" - ConfigLocal: + Config: description: Config schema allowing for device to be specified as part of subscription detail allOf: - - $ref: "../common/CAMARA_event_common.yaml#/components/schemas/Config" + - $ref: "../common/CAMARA_event_common.yaml#/components/schemas/ConfigBase" - type: object properties: subscriptionDetail: $ref: "#/components/schemas/SubscriptionDetailLocal" + initialEvent: + description: | + Set to `true` by API consumer if consumer wants to get an event as soon as the subscription is created and current situation reflects event request. + Example: Consumer requests `data-10-percent-remaining` events. If API consumer sets initialEvent to true and remaining device data allowance is less than 10% of the full allowance, an event is triggered + type: boolean ApiEventType: type: string @@ -443,7 +448,7 @@ components: items: $ref: "#/components/schemas/ApiEventType" config: - $ref: "#/components/schemas/ConfigLocal" + $ref: "#/components/schemas/Config" id: $ref: "../common/CAMARA_event_common.yaml#/components/schemas/SubscriptionId" startsAt: @@ -501,7 +506,7 @@ components: items: $ref: "#/components/schemas/ApiEventType" config: - $ref: "#/components/schemas/ConfigLocal" + $ref: "#/components/schemas/Config" discriminator: propertyName: protocol mapping: