camaraproject / Commonalities

Repository to describe, develop, document and test the common guidelines and assets for CAMARA APIs
Apache License 2.0
9 stars 24 forks source link

Common Design Model for Cloud Event datacontenttype field #192

Closed rartych closed 1 month ago

rartych commented 2 months ago

Problem description API Design Guidelines requirement is that datacontenttype field is media-type that describes the event payload encoding, must be application/json for CAMARA APIs In https://github.com/camaraproject/Commonalities/blob/main/artifacts/notification-as-cloud-event.yaml it is defined as follows:

datacontenttype:
          type: string
          description: 'media-type that describes the event payload encoding, must be "application/json" for CAMARA APIs'

Possible evolution Define required value as enum - as the only possible value is "application/json"

Alternative solution

Additional context The similar specversion field is defined as enum with PR:

The datacontenttype field is optional , specversion field is mandatory

PedroDiez commented 2 months ago

Agree to follow same approach and define value as enum

shilpa-padgaonkar commented 2 months ago

+1

bigludo7 commented 2 months ago

+1

patrice-conil commented 2 months ago

+1

PedroDiez commented 2 months ago

Will be generating PR this week