Skip to content

Commit

Permalink
feat: remove "device-" from basepath, scopes and eventTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxl2287 committed Jun 10, 2024
1 parent e45d061 commit 51e5963
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 57 deletions.
44 changes: 22 additions & 22 deletions code/API_definitions/device-reachability-status-subscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ info:
It is mandatory in the subscription to provide the event `type` subscribed are several are managed in this API.
Following event ``type`` are managed for this API:
- ``org.camaraproject.device-reachability-status.v0.reachability-data``: Event triggered when the device is connected to the network for Data usage.
- ``org.camaraproject.reachability-status-subscriptions.v0.reachability-data``: Event triggered when the device is connected to the network for Data usage.
- ``org.camaraproject.device-reachability-status.v0.reachability-sms``: Event triggered when the device is connected to the network for SMS usage
- ``org.camaraproject.reachability-status-subscriptions.v0.reachability-sms``: Event triggered when the device is connected to the network for SMS usage
- ``org.camaraproject.device-reachability-status.v0.reachability-disconnected``: Event triggered when the device is not connected.
- ``org.camaraproject.reachability-status-subscriptions.v0.reachability-disconnected``: Event triggered when the device is not connected.
Note: Additionally to these list, ``org.camaraproject.device-reachability-status-subscriptions.v0.subscription-ends`` notification `type` is sent when the subscription ends.
Note: Additionally to these list, ``org.camaraproject.reachability-status-subscriptions.v0.subscription-ends`` notification `type` is sent when the subscription ends.
This notification does not require dedicated subscription.
It is used when the subscription expire time (optionally set by the requester) has been reached or if the API server has to stop sending notification prematurely.
Expand All @@ -60,7 +60,7 @@ externalDocs:
url: https://github.com/camaraproject/

servers:
- url: "{apiRoot}/device-reachability-status-subscriptions/v0"
- url: "{apiRoot}/reachability-status-subscriptions/v0"
variables:
apiRoot:
default: http://localhost:9091
Expand All @@ -82,7 +82,7 @@ paths:
- $ref: '#/components/parameters/x-correlator'
security:
- openId:
- device-reachability-status:subscriptions:create
- reachability-status:subscriptions:create
requestBody:
content:
application/json:
Expand Down Expand Up @@ -172,7 +172,7 @@ paths:
- $ref: '#/components/parameters/x-correlator'
security:
- openId:
- device-reachability-status:subscriptions:read
- reachability-status:subscriptions:read
responses:
"200":
description: List of event subscription details
Expand Down Expand Up @@ -205,7 +205,7 @@ paths:
description: Retrieve a given subscription by ID
security:
- openId:
- device-reachability-status:subscriptions:read
- reachability-status:subscriptions:read
parameters:
- $ref: "#/components/parameters/SubscriptionId"
- $ref: '#/components/parameters/x-correlator'
Expand Down Expand Up @@ -239,7 +239,7 @@ paths:
description: Delete a given subscription by ID
security:
- openId:
- device-reachability-status:subscriptions:delete
- reachability-status:subscriptions:delete
parameters:
- $ref: "#/components/parameters/SubscriptionId"
- $ref: '#/components/parameters/x-correlator'
Expand Down Expand Up @@ -470,10 +470,10 @@ components:
subscription-ends - Event triggered when the subscription is terminated
enum:
- org.camaraproject.device-reachability-status-subscriptions.v0.reachability-data
- org.camaraproject.device-reachability-status-subscriptions.v0.reachability-sms
- org.camaraproject.device-reachability-status-subscriptions.v0.reachability-disconnected
- org.camaraproject.device-reachability-status-subscriptions.v0.subscription-ends
- org.camaraproject.reachability-status-subscriptions.v0.reachability-data
- org.camaraproject.reachability-status-subscriptions.v0.reachability-sms
- org.camaraproject.reachability-status-subscriptions.v0.reachability-disconnected
- org.camaraproject.reachability-status-subscriptions.v0.subscription-ends

SubscriptionEventType:
type: string
Expand All @@ -485,9 +485,9 @@ components:
reachability-disconnected - Event triggered when the device is not connected.
enum:
- org.camaraproject.device-reachability-status-subscriptions.v0.reachability-data
- org.camaraproject.device-reachability-status-subscriptions.v0.reachability-sms
- org.camaraproject.device-reachability-status-subscriptions.v0.reachability-disconnected
- org.camaraproject.reachability-status-subscriptions.v0.reachability-data
- org.camaraproject.reachability-status-subscriptions.v0.reachability-sms
- org.camaraproject.reachability-status-subscriptions.v0.reachability-disconnected

SubscriptionInfo:
description: Represents a device reachability status subscription.
Expand Down Expand Up @@ -560,10 +560,10 @@ components:
discriminator:
propertyName: "type"
mapping:
org.camaraproject.device-reachability-status-subscriptions.v0.reachability-data: "#/components/schemas/EventReachabilityData"
org.camaraproject.device-reachability-status-subscriptions.v0.reachability-sms: "#/components/schemas/EventReachabilitySms"
org.camaraproject.device-reachability-status-subscriptions.v0.reachability-disconnected: "#/components/schemas/EventReachabilityDisconnected"
org.camaraproject.device-reachability-status-subscriptions.v0.subscription-ends: "#/components/schemas/EventSubscriptionEnds"
org.camaraproject.reachability-status-subscriptions.v0.reachability-data: "#/components/schemas/EventReachabilityData"
org.camaraproject.reachability-status-subscriptions.v0.reachability-sms: "#/components/schemas/EventReachabilitySms"
org.camaraproject.reachability-status-subscriptions.v0.reachability-disconnected: "#/components/schemas/EventReachabilityDisconnected"
org.camaraproject.reachability-status-subscriptions.v0.subscription-ends: "#/components/schemas/EventSubscriptionEnds"

Source:
type: string
Expand Down Expand Up @@ -643,7 +643,7 @@ components:


SubscriptionEnds:
description: Event detail structure for org.camaraproject.device-reachability-status-subscriptions.v0.subscription-ends event
description: Event detail structure for org.camaraproject.reachability-status-subscriptions.v0.subscription-ends event
type: object
required:
- device
Expand Down Expand Up @@ -764,7 +764,7 @@ components:
value:
id: "123658"
source: https://notificationSendServer12.supertelco.com
type: org.camaraproject.device-reachability-status-subscriptions.v0.subscription-ends
type: org.camaraproject.reachability-status-subscriptions.v0.subscription-ends
specversion: "1.0"
datacontenttype: application/json
data:
Expand Down
70 changes: 35 additions & 35 deletions code/API_definitions/device-roaming-status-subscriptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ info:
It is mandatory in the subscription to provide the event `type` subscribed are several are managed in this API.
Following event ``type`` are managed for this API:
- ``org.camaraproject.device-roaming-status-subscriptions.v0.roaming-status`` - Event triggered when the device switch from roaming ON to roaming OFF and conversely
- ``org.camaraproject.roaming-status-subscriptions.v0.roaming-status`` - Event triggered when the device switch from roaming ON to roaming OFF and conversely
- ``org.camaraproject.device-roaming-status-subscriptions.v0.roaming-on`` - Event triggered when the device switch from roaming OFF to roaming ON
- ``org.camaraproject.roaming-status-subscriptions.v0.roaming-on`` - Event triggered when the device switch from roaming OFF to roaming ON
- ``org.camaraproject.device-roaming-status-subscriptions.v0.roaming-off``: Event triggered when the device switch from roaming ON to roaming OFF
- ``org.camaraproject.roaming-status-subscriptions.v0.roaming-off``: Event triggered when the device switch from roaming ON to roaming OFF
- ``org.camaraproject.device-roaming-status-subscriptions.v0.roaming-change-country``: Event triggered when the device in roaming change country code
- ``org.camaraproject.roaming-status-subscriptions.v0.roaming-change-country``: Event triggered when the device in roaming change country code
Note: Additionally to these list, ``org.camaraproject.device-roaming-status-subscriptions.v0.subscription-ends`` notification `type` is sent when the subscription ends.
Note: Additionally to these list, ``org.camaraproject.roaming-status-subscriptions.v0.subscription-ends`` notification `type` is sent when the subscription ends.
This notification does not require dedicated subscription.
It is used when the subscription expire time (optionally set by the requester) has been reached or if the API server has to stop sending notification prematurely.
Expand All @@ -62,7 +62,7 @@ externalDocs:
url: https://github.com/camaraproject/

servers:
- url: "{apiRoot}/device-roaming-status-subscriptions/v0"
- url: "{apiRoot}/roaming-status-subscriptions/v0"
variables:
apiRoot:
default: http://localhost:9091
Expand All @@ -84,7 +84,7 @@ paths:
- $ref: '#/components/parameters/x-correlator'
security:
- openId:
- device-roaming-status:subscriptions:create
- roaming-status:subscriptions:create
requestBody:
content:
application/json:
Expand Down Expand Up @@ -182,7 +182,7 @@ paths:
- $ref: '#/components/parameters/x-correlator'
security:
- openId:
- device-roaming-status:subscriptions:read
- roaming-status:subscriptions:read
responses:
"200":
description: List of event subscription details
Expand Down Expand Up @@ -215,7 +215,7 @@ paths:
description: Retrieve a given subscription by ID
security:
- openId:
- device-roaming-status:subscriptions:read
- roaming-status:subscriptions:read
parameters:
- $ref: "#/components/parameters/SubscriptionId"
- $ref: '#/components/parameters/x-correlator'
Expand Down Expand Up @@ -249,7 +249,7 @@ paths:
description: Delete a given subscription by ID
security:
- openId:
- device-roaming-status:subscriptions:delete
- roaming-status:subscriptions:delete
parameters:
- $ref: "#/components/parameters/SubscriptionId"
- $ref: '#/components/parameters/x-correlator'
Expand Down Expand Up @@ -486,11 +486,11 @@ components:
subscription-ends - Event triggered when the subscription is terminated
enum:
- org.camaraproject.device-roaming-status-subscriptions.v0.roaming-status
- org.camaraproject.device-roaming-status-subscriptions.v0.roaming-on
- org.camaraproject.device-roaming-status-subscriptions.v0.roaming-off
- org.camaraproject.device-roaming-status-subscriptions.v0.roaming-change-country
- org.camaraproject.device-roaming-status-subscriptions.v0.subscription-ends
- org.camaraproject.roaming-status-subscriptions.v0.roaming-status
- org.camaraproject.roaming-status-subscriptions.v0.roaming-on
- org.camaraproject.roaming-status-subscriptions.v0.roaming-off
- org.camaraproject.roaming-status-subscriptions.v0.roaming-change-country
- org.camaraproject.roaming-status-subscriptions.v0.subscription-ends

SubscriptionEventType:
type: string
Expand All @@ -504,13 +504,13 @@ components:
roaming-change-country - Event triggered when the device in roaming change country code
enum:
- org.camaraproject.device-roaming-status-subscriptions.v0.roaming-status
- org.camaraproject.device-roaming-status-subscriptions.v0.roaming-on
- org.camaraproject.device-roaming-status-subscriptions.v0.roaming-off
- org.camaraproject.device-roaming-status-subscriptions.v0.roaming-change-country
- org.camaraproject.device-roaming-status-subscriptions.v0.connectivity-data
- org.camaraproject.device-roaming-status-subscriptions.v0.connectivity-sms
- org.camaraproject.device-roaming-status-subscriptions.v0.connectivity-disconnected
- org.camaraproject.roaming-status-subscriptions.v0.roaming-status
- org.camaraproject.roaming-status-subscriptions.v0.roaming-on
- org.camaraproject.roaming-status-subscriptions.v0.roaming-off
- org.camaraproject.roaming-status-subscriptions.v0.roaming-change-country
- org.camaraproject.roaming-status-subscriptions.v0.connectivity-data
- org.camaraproject.roaming-status-subscriptions.v0.connectivity-sms
- org.camaraproject.roaming-status-subscriptions.v0.connectivity-disconnected

SubscriptionInfo:
description: Represents a device roaming status subscription.
Expand Down Expand Up @@ -583,11 +583,11 @@ components:
discriminator:
propertyName: "type"
mapping:
org.camaraproject.device-roaming-status-subscriptions.v0.roaming-status: "#/components/schemas/EventRoamingStatus"
org.camaraproject.device-roaming-status-subscriptions.v0.roaming-change-country: "#/components/schemas/EventRoamingChangeCountry"
org.camaraproject.device-roaming-status-subscriptions.v0.roaming-off: "#/components/schemas/EventRoamingOff"
org.camaraproject.device-roaming-status-subscriptions.v0.roaming-on: "#/components/schemas/EventRoamingOn"
org.camaraproject.device-roaming-status-subscriptions.v0.subscription-ends: "#/components/schemas/EventSubscriptionEnds"
org.camaraproject.roaming-status-subscriptions.v0.roaming-status: "#/components/schemas/EventRoamingStatus"
org.camaraproject.roaming-status-subscriptions.v0.roaming-change-country: "#/components/schemas/EventRoamingChangeCountry"
org.camaraproject.roaming-status-subscriptions.v0.roaming-off: "#/components/schemas/EventRoamingOff"
org.camaraproject.roaming-status-subscriptions.v0.roaming-on: "#/components/schemas/EventRoamingOn"
org.camaraproject.roaming-status-subscriptions.v0.subscription-ends: "#/components/schemas/EventSubscriptionEnds"

Source:
type: string
Expand Down Expand Up @@ -674,7 +674,7 @@ components:
$ref: "#/components/schemas/SubscriptionId"

RoamingStatus:
description: Event detail structure for org.camaraproject.device-roaming-status-subscriptions.v0.roaming-status event
description: Event detail structure for org.camaraproject.roaming-status-subscriptions.v0.roaming-status event
type: object
required:
- device
Expand All @@ -693,7 +693,7 @@ components:
$ref: "#/components/schemas/SubscriptionId"

RoamingChangeCountry:
description: Event detail structure for org.camaraproject.device-roaming-status-subscriptions.v0.roaming-on event
description: Event detail structure for org.camaraproject.roaming-status-subscriptions.v0.roaming-on event
type: object
required:
- device
Expand All @@ -708,7 +708,7 @@ components:
$ref: "#/components/schemas/SubscriptionId"

SubscriptionEnds:
description: Event detail structure for org.camaraproject.device-roaming-status-subscriptions.v0.subscription-ends event
description: Event detail structure for org.camaraproject.roaming-status-subscriptions.v0.subscription-ends event
type: object
required:
- device
Expand Down Expand Up @@ -829,7 +829,7 @@ components:
value:
id: "123654"
source: https://notificationSendServer12.supertelco.com
type: org.camaraproject.device-roaming-status-subscriptions.v0.roaming-status
type: org.camaraproject.roaming-status-subscriptions.v0.roaming-status
specversion: "1.0"
datacontenttype: application/json
data:
Expand All @@ -845,7 +845,7 @@ components:
value:
id: "123655"
source: https://notificationSendServer12.supertelco.com
type: org.camaraproject.device-roaming-status-subscriptions.v0.roaming-off
type: org.camaraproject.roaming-status-subscriptions.v0.roaming-off
specversion: "1.0"
datacontenttype: application/json
data:
Expand All @@ -858,7 +858,7 @@ components:
value:
id: "123656"
source: https://notificationSendServer12.supertelco.com
type: org.camaraproject.device-roaming-status-subscriptions.v0.roaming-on
type: org.camaraproject.roaming-status-subscriptions.v0.roaming-on
specversion: "1.0"
datacontenttype: application/json
data:
Expand All @@ -871,7 +871,7 @@ components:
value:
id: "123657"
source: https://notificationSendServer12.supertelco.com
type: org.camaraproject.device-roaming-status-subscriptions.v0.roaming-change-country
type: org.camaraproject.roaming-status-subscriptions.v0.roaming-change-country
specversion: "1.0"
datacontenttype: application/json
data:
Expand All @@ -886,7 +886,7 @@ components:
value:
id: "123658"
source: https://notificationSendServer12.supertelco.com
type: org.camaraproject.device-roaming-status-subscriptions.v0.subscription-ends
type: org.camaraproject.roaming-status-subscriptions.v0.subscription-ends
specversion: "1.0"
datacontenttype: application/json
data:
Expand Down

0 comments on commit 51e5963

Please sign in to comment.