Skip to content
Merged
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
38 changes: 9 additions & 29 deletions code/API_definitions/geofencing-subscriptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
content:
application/cloudevents+json:
schema:
$ref: "#/components/schemas/CloudEvent"
$ref: "#/components/schemas/GeofencingNotificationEvent"
examples:
CIRCLE_AREA_ENTERED:
$ref: "#/components/examples/CIRCLE_AREA_ENTERED"
Expand Down Expand Up @@ -374,8 +374,6 @@
schema:
$ref: '../common/CAMARA_common.yaml#/components/schemas/XCorrelator'
schemas:
XCorrelator:
$ref: '../common/CAMARA_common.yaml#/components/schemas/XCorrelator'
ErrorInfo:
$ref: '../common/CAMARA_common.yaml#/components/schemas/ErrorInfo'

Expand Down Expand Up @@ -509,7 +507,7 @@
- org.camaraproject.geofencing-subscriptions.v0.area-entered
- org.camaraproject.geofencing-subscriptions.v0.area-left

NotificationEventType:
GeofencingEventType:
type: string
description: |
area-entered - Event triggered when the device enters the given area
Expand Down Expand Up @@ -559,7 +557,7 @@
$ref: "#/components/schemas/SubscriptionEventType"
config:
$ref: "#/components/schemas/ConfigResponse"
id:

Check notice on line 560 in code/API_definitions/geofencing-subscriptions.yaml

View check run for this annotation

camara-validation / CAMARA Validation

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 subscription in the scope of the subscription manager. When this information is contained within an event notification, this concept SHALL be referred as subscriptionId as per Commonalities Event Notification Model.
Expand Down Expand Up @@ -612,22 +610,22 @@
Device:
$ref: '../common/CAMARA_common.yaml#/components/schemas/Device'

PhoneNumber:

Check warning on line 613 in code/API_definitions/geofencing-subscriptions.yaml

View check run for this annotation

camara-validation / CAMARA Validation

Component may be unused

[S-211] Potentially unused component has been detected. Suggestion: Remove the component if it is obsolete, or reference it from the API definition.
$ref: '../common/CAMARA_common.yaml#/components/schemas/PhoneNumber'

NetworkAccessIdentifier:

Check warning on line 616 in code/API_definitions/geofencing-subscriptions.yaml

View check run for this annotation

camara-validation / CAMARA Validation

Component may be unused

[S-211] Potentially unused component has been detected. Suggestion: Remove the component if it is obsolete, or reference it from the API definition.
$ref: '../common/CAMARA_common.yaml#/components/schemas/NetworkAccessIdentifier'

DeviceIpv4Addr:

Check warning on line 619 in code/API_definitions/geofencing-subscriptions.yaml

View check run for this annotation

camara-validation / CAMARA Validation

Component may be unused

[S-211] Potentially unused component has been detected. Suggestion: Remove the component if it is obsolete, or reference it from the API definition.
$ref: '../common/CAMARA_common.yaml#/components/schemas/DeviceIpv4Address'

SingleIpv4Addr:

Check warning on line 622 in code/API_definitions/geofencing-subscriptions.yaml

View check run for this annotation

camara-validation / CAMARA Validation

Component may be unused

[S-211] Potentially unused component has been detected. Suggestion: Remove the component if it is obsolete, or reference it from the API definition.
$ref: '../common/CAMARA_common.yaml#/components/schemas/SingleIpv4Address'

Port:

Check warning on line 625 in code/API_definitions/geofencing-subscriptions.yaml

View check run for this annotation

camara-validation / CAMARA Validation

Component may be unused

[S-211] Potentially unused component has been detected. Suggestion: Remove the component if it is obsolete, or reference it from the API definition.
$ref: '../common/CAMARA_common.yaml#/components/schemas/Port'

DeviceIpv6Address:

Check warning on line 628 in code/API_definitions/geofencing-subscriptions.yaml

View check run for this annotation

camara-validation / CAMARA Validation

Component may be unused

[S-211] Potentially unused component has been detected. Suggestion: Remove the component if it is obsolete, or reference it from the API definition.
$ref: '../common/CAMARA_common.yaml#/components/schemas/DeviceIpv6Address'

DeviceResponse:
Expand Down Expand Up @@ -681,20 +679,14 @@
Point:
$ref: '../common/CAMARA_common.yaml#/components/schemas/Point'

Latitude:
$ref: '../common/CAMARA_common.yaml#/components/schemas/Latitude'

Longitude:
$ref: '../common/CAMARA_common.yaml#/components/schemas/Longitude'

CloudEvent:
GeofencingNotificationEvent:
description: The notification callback.
allOf:
- $ref: '../common/CAMARA_event_common.yaml#/components/schemas/CloudEvent'
- type: object
properties:
type:
$ref: "#/components/schemas/NotificationEventType"
$ref: "#/components/schemas/GeofencingEventType"
discriminator:
propertyName: "type"
mapping:
Expand All @@ -704,24 +696,12 @@
org.camaraproject.geofencing-subscriptions.v0.subscription-updated: "#/components/schemas/EventSubscriptionUpdated"
org.camaraproject.geofencing-subscriptions.v0.subscription-ended: "#/components/schemas/EventSubscriptionEnded"

Source:
$ref: '../common/CAMARA_event_common.yaml#/components/schemas/Source'

DateTime:
$ref: '../common/CAMARA_common.yaml#/components/schemas/DateTime'

SubscriptionId:
$ref: '../common/CAMARA_event_common.yaml#/components/schemas/SubscriptionId'

SinkCredential:
$ref: '../common/CAMARA_event_common.yaml#/components/schemas/SinkCredential'

AccessTokenCredential:
$ref: '../common/CAMARA_event_common.yaml#/components/schemas/AccessTokenCredential'

PrivateKeyJWTCredential:
$ref: '../common/CAMARA_event_common.yaml#/components/schemas/PrivateKeyJWTCredential'

HTTPSettings:
$ref: '../common/CAMARA_event_common.yaml#/components/schemas/HTTPSettings'

Expand All @@ -734,7 +714,7 @@
EventAreaLeft:
description: Event structure for event when the device leaves the area.
allOf:
- $ref: "#/components/schemas/CloudEvent"
- $ref: "#/components/schemas/GeofencingNotificationEvent"
- type: object
properties:
data:
Expand All @@ -743,7 +723,7 @@
EventAreaEntered:
description: Event structure for event when the device enters the area.
allOf:
- $ref: "#/components/schemas/CloudEvent"
- $ref: "#/components/schemas/GeofencingNotificationEvent"
- type: object
properties:
data:
Expand All @@ -752,7 +732,7 @@
EventSubscriptionStarted:
description: Event structure for event subscription started
allOf:
- $ref: "#/components/schemas/CloudEvent"
- $ref: "#/components/schemas/GeofencingNotificationEvent"
- type: object
properties:
data:
Expand Down Expand Up @@ -782,7 +762,7 @@
EventSubscriptionUpdated:
description: Event structure for event subscription updated
allOf:
- $ref: "#/components/schemas/CloudEvent"
- $ref: "#/components/schemas/GeofencingNotificationEvent"
- type: object
properties:
data:
Expand Down Expand Up @@ -812,7 +792,7 @@
EventSubscriptionEnded:
description: Event structure for event subscription ends.
allOf:
- $ref: "#/components/schemas/CloudEvent"
- $ref: "#/components/schemas/GeofencingNotificationEvent"
- type: object
properties:
data:
Expand Down Expand Up @@ -994,7 +974,7 @@
message: "Expected property is missing: subscriptionId"
Generic401:
$ref: '../common/CAMARA_common.yaml#/components/responses/Generic401'
SubscriptionPermissionDenied403:

Check warning on line 977 in code/API_definitions/geofencing-subscriptions.yaml

View check run for this annotation

camara-validation / CAMARA Validation

Component may be unused

[S-211] Potentially unused component has been detected. Suggestion: Remove the component if it is obsolete, or reference it from the API definition.
description: Client does not have sufficient permission.
headers:
x-correlator:
Expand Down
2 changes: 1 addition & 1 deletion code/Test_definitions/geofencing-subscriptions.feature
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Feature: Camara Geofencing Subscriptions API, vwip - Operations on subscriptions

# Input to be provided by the implementation to the tester
Expand Down Expand Up @@ -155,7 +155,7 @@
When the request "createGeofencingSubscription" is sent
Then the response code is 201 or 202
And an event notification of the subscribed type is received on callback-url
And notification body complies with the OAS schema at "#/components/schemas/CloudEvent"
And notification body complies with the OAS schema at "#/components/schemas/GeofencingNotificationEvent"

@geofencing_subscriptions_receive_notification_when_subscription_is_updated
Scenario: Receive notification for subscription-updated event
Expand Down
Loading