camaraproject / DeviceLocation

Repository to describe, develop, document and test the DeviceLocation API family
Apache License 2.0
21 stars 32 forks source link

Rename in the OAS SubscriptionEventType to NotificationEventType #139

Closed bigludo7 closed 8 months ago

bigludo7 commented 8 months ago

Problem description Feedback from development team. In the OAS: line 469 we list the notification event type and not the subscription event type. In order to be clear for the developer better to rename this class NotificationEventType. In line 459 with this modification we can rename SubscriptionCreationEventType to SubscriptionEventType

As the reminder we have distinct enum because org.camaraproject.geofencing.v0.subscription-ends is a notification type but not a subscription type.

We should have something like:

SubscriptionType:
  description: |
    area-entered - Event triggered when the device enters the given area
    area-left - Event triggered when the device leaves the given area
  type: string
  enum:
    - org.camaraproject.geofencing.v0.area-entered
    - org.camaraproject.geofencing.v0.area-left

NotificationType:
  description: |
    area-entered - Event triggered when the device enters the given area
    area-left - Event triggered when the device leaves the given area
    subscription-ends - Event triggered when the subscription ends
  type: string
  enum:
    - org.camaraproject.geofencing.v0.area-entered
    - org.camaraproject.geofencing.v0.area-left
    - org.camaraproject.geofencing.v0.subscription-ends

Expected behavior Fix the swagger

Alternative solution

Additional context

jlurien commented 8 months ago

It makes sense, you can propose a PR. Thanks