Skip to content
Draft
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
171 changes: 111 additions & 60 deletions code/API_definitions/predictive-connectivity-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -263,26 +263,26 @@
$ref: '../common/CAMARA_common.yaml#/components/responses/Generic429'
callbacks:
connectivityCallback:
'{$request.body#/sink}':
"{$request.body#/sink}":
post:
summary: Callback for asynchronous connectivity data retrieval
description: >-
This callback is invoked to provide the result of an asynchronous
connectivity data retrieval request.
operationId: connectivityCallback
operationId: sendConnectivityData
parameters:
- $ref: "../common/CAMARA_common.yaml#/components/parameters/x-correlator"
requestBody:
required: true
content:
application/json:
application/cloudevents+json:
schema:
$ref: '#/components/schemas/ConnectivityDataAsyncResponse'
$ref: "#/components/schemas/ApiNotificationEvent"
examples:
ConnectivityDataSupportedAreaAsyncResponseExample:
$ref: "#/components/examples/ConnectivityDataSupportedAreaAsyncResponseExample"
ConnectivityDataOperationNotCompletedExample:
$ref: "#/components/examples/ConnectivityDataOperationNotCompletedExample"
required: true
responses:
"204":
description: Successful notification
Expand All @@ -309,6 +309,43 @@
notificationsBearerAuth:
$ref: "../common/CAMARA_event_common.yaml#/components/securitySchemes/notificationsBearerAuth"
schemas:
ApiEventType:
type: string
description: |
The list of events that can be sent by the API
enum:
- org.camaraproject.predictive-connectivity-data.v0.connectivity-data-available
- org.camaraproject.predictive-connectivity-data.v0.connectivity-data-not-available
EventConnectivityDataAvailable:
description: Event structure for event type connectivity-data-available, containing the connectivity data
allOf:
- $ref: "#/components/schemas/ApiNotificationEvent"
- type: object
properties:
data:
$ref: "#/components/schemas/ConnectivityDataAsyncResponse"
EventConnectivityDataNotAvailable:
description: Event structure for event type connectivity-data-not-available
allOf:
- $ref: "#/components/schemas/ApiNotificationEvent"
- type: object
properties:
data:
$ref: "#/components/schemas/ConnectivityDataAsyncResponse"
ApiNotificationEvent:
description: |
Callback that includes the connectivity data
allOf:
- $ref: "../common/CAMARA_event_common.yaml#/components/schemas/CloudEvent"
- type: object
properties:
type:
$ref: "#/components/schemas/ApiEventType"
discriminator:
propertyName: "type"
mapping:
org.camaraproject.predictive-connectivity-data.v0.connectivity-data-available: "#/components/schemas/EventConnectivityDataAvailable"
org.camaraproject.predictive-connectivity-data.v0.connectivity-data-not-available: "#/components/schemas/EventConnectivityDataNotAvailable"
RetrieveConnectivityRequest:
type: object
description: Request object for retrieving connectivity data in a specified area.
Expand Down Expand Up @@ -472,7 +509,7 @@
maxItems: 168
status:
$ref: '#/components/schemas/ResponseStatus'
statusInfo:

Check notice on line 512 in code/API_definitions/predictive-connectivity-data.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

String has no format/pattern/enum

[S-313] Schema of type string should specify a format, pattern, enum, or const. | Suggestion: Acceptable if free-form field or implementation-dependent — no fix needed.
type: string
maxLength: 512
description: Information about the status, mandatory when property `status` is `OPERATION_NOT_COMPLETED` for adding extra information about the error.
Expand Down Expand Up @@ -507,7 +544,7 @@
$ref: '#/components/schemas/OperationId'
required:
- operationId
OperationId:

Check notice on line 547 in code/API_definitions/predictive-connectivity-data.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

String has no format/pattern/enum

[S-313] Schema of type string should specify a format, pattern, enum, or const. | Suggestion: Acceptable if free-form field or implementation-dependent — no fix needed.
type: string
maxLength: 256
description: The unique identifier of the asynchronous operation that is returned when the operation is initiated.
Expand Down Expand Up @@ -906,64 +943,78 @@
ConnectivityDataSupportedAreaAsyncResponseExample:
description: Connectivity data supported area async response example
value:
layerThickness: 30
timedConnectivityData:
- startTime: "2024-01-03T11:00:00Z"
endTime: "2024-01-03T12:00:00Z"
cellConnectivityData:
- geohash: ezdmemd
layerConnectivities:
- GC
- GC
- GC
- GC
- GC
- NC
- NC
- NC
- geohash: ezdmemc
layerConnectivities:
- GC
- GC
- GC
- GC
- GC
- NC
- NC
- NC
- startTime: "2024-01-03T12:00:00Z"
endTime: "2024-01-03T13:00:00Z"
cellConnectivityData:
- geohash: ezdmemd
layerConnectivities:
- GC
- GC
- GC
- GC
- GC
- NC
- NC
- NC
- geohash: ezdmemc
layerConnectivities:
- GC
- GC
- GC
- GC
- GC
- NC
- NC
- NC
status: SUPPORTED_AREA
operationId: 2322f362-eaab-4cf3-86d2-efcbdf3a7cb4
id: "123654"
source: "https://notificationSendServer12.example.com"
type: "org.camaraproject.predictive-connectivity-data.v0.connectivity-data-available"
specversion: "1.0"
datacontenttype: "application/json"
time: "2023-01-17T13:18:23.682Z"
data:
layerThickness: 30
timedConnectivityData:
- startTime: "2024-01-03T11:00:00Z"
endTime: "2024-01-03T12:00:00Z"
cellConnectivityData:
- geohash: ezdmemd
layerConnectivities:
- GC
- GC
- GC
- GC
- GC
- NC
- NC
- NC
- geohash: ezdmemc
layerConnectivities:
- GC
- GC
- GC
- GC
- GC
- NC
- NC
- NC
- startTime: "2024-01-03T12:00:00Z"
endTime: "2024-01-03T13:00:00Z"
cellConnectivityData:
- geohash: ezdmemd
layerConnectivities:
- GC
- GC
- GC
- GC
- GC
- NC
- NC
- NC
- geohash: ezdmemc
layerConnectivities:
- GC
- GC
- GC
- GC
- GC
- NC
- NC
- NC
status: SUPPORTED_AREA
operationId: 2322f362-eaab-4cf3-86d2-efcbdf3a7cb4
ConnectivityDataOperationNotCompletedExample:
description: Connectivity data operation not completed example
value:
layerThickness: 30
timedConnectivityData: []
status: OPERATION_NOT_COMPLETED
statusInfo: Some error happened during the processing of the request
operationId: 2322f362-eaab-4cf3-86d2-efcbdf3a7cb4
id: "123654"
source: "https://notificationSendServer12.example.com"
type: "org.camaraproject.predictive-connectivity-data.v0.connectivity-data-not-available"
specversion: "1.0"
datacontenttype: "application/json"
time: "2023-01-17T13:18:23.682Z"
data:
layerThickness: 30
timedConnectivityData: []
status: OPERATION_NOT_COMPLETED
statusInfo: Some error happened during the processing of the request
operationId: 2322f362-eaab-4cf3-86d2-efcbdf3a7cb4
ConnectivityDataWithSignalStrengthResponseExample:
description: Connectivity data with signal strength response example
value:
Expand Down