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

Change to `application/cloudevents+json` for CloudEvent content-type #224

Closed maxl2287 closed 1 month ago

maxl2287 commented 1 month ago

Problem description

              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      $ref: "#/components/schemas/CloudEvent"

For the callbacks the request-body is declared as application/json. Wouldn't it be good to define it as application/cloudevents+json ?

Expected behavior

              requestBody:
                required: true
                content:
                  application/cloudevents+json:
                    schema:
                      $ref: "#/components/schemas/CloudEvent"

Additional context https://github.com/camaraproject/Commonalities/blob/main/artifacts/camara-cloudevents/event-subscription-template.yaml#L110

patrice-conil commented 1 month ago

Hi @maxl2287, I agree with you, to be compliant with cloud events specs we need to move to application/cloudevents+json. Patrice