Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common Design Model for Cloud Event datacontenttype field #192

Closed
rartych opened this issue Apr 26, 2024 · 5 comments · Fixed by #193
Closed

Common Design Model for Cloud Event datacontenttype field #192

rartych opened this issue Apr 26, 2024 · 5 comments · Fixed by #193
Labels
enhancement New feature or request

Comments

@rartych
Copy link
Collaborator

rartych commented Apr 26, 2024

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

@rartych rartych added the enhancement New feature or request label Apr 26, 2024
@PedroDiez
Copy link
Collaborator

Agree to follow same approach and define value as enum

@shilpa-padgaonkar
Copy link
Collaborator

+1

@bigludo7
Copy link
Collaborator

+1

1 similar comment
@patrice-conil
Copy link
Collaborator

+1

@PedroDiez
Copy link
Collaborator

Will be generating PR this week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants