camaraproject / DeviceLocation

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

Geofencing API - Add "format: uri" to notificationUrl #118

Closed patrice-conil closed 1 month ago

patrice-conil commented 9 months ago

Problem description To have a strong typed notificationUrl, add a format constraint on type. This will simplify implementation and clarify usage.

    NotificationUrl:
      type: string
      format: uri
      example: "https://application-server.com"
      description: https callback address where the event notification must be POST-ed
jlurien commented 9 months ago

Hi @patrice-conil, I see this is not applied to other APIs dealing with subscriptions, such as DeviceStatus and SimSwap notifications. This should be something to be agreed transversely.

patrice-conil commented 9 months ago

Hi @patrice-conil, I see this is not applied to other APIs dealing with subscriptions, such as DeviceStatus and SimSwap notifications. This should be something to be agreed transversely.

Thanks @jlurien, I will therefore suggest doing it in commonalities each time we can specify the format of the field.

maxl2287 commented 2 months ago

Hi @patrice-conil,

with the latest subscription-model changes, the newly called sink will have a format: url:

sink:
          type: string
          format: url
          description: The address to which events shall be delivered using the selected protocol.
          example: "https://endpoint.example.com/sink"

see PR #202: https://github.com/camaraproject/DeviceLocation/pull/202/files#diff-ca27481523133fde153d65b5b9d153f2f7746eeb477fa1f057312ff9eb33f185R357-R361

Would that fit as a solution for your issue here?