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

AsyncAPI Trait for CloudEvents #1276

Open
Lazzaretti opened this issue Apr 9, 2024 · 1 comment
Open

AsyncAPI Trait for CloudEvents #1276

Lazzaretti opened this issue Apr 9, 2024 · 1 comment

Comments

@Lazzaretti
Copy link
Member

I am creating Kafka APIs in AsyncAPI. These APIs should have CloudEvents headers.
Now, I was wondering if it would make sense to have an official CloudEvents Trait in AsyncAPI to include these CloudEvents headers.
My goal would be to refer to a trait to include the correct CloudEvents headers.

In the structured mode, this is already possible 1:

components:
  schemas:
    userSignedUpPayload:
      type: object
      allOf:
        - $ref: 'https://raw.githubusercontent.com/cloudevents/spec/v1.0.1/spec.json'
      properties:
        data:
          $ref: '#/components/schemas/userSignedUpData'

For binary, there is no official version.
To include this, we would need to add some AsyncAPI-specific files.

Would it make sense to include such an AscynAPI trait?

Here are two samples that I found:

Footnotes

  1. https://developers.redhat.com/articles/2021/06/02/simulating-cloudevents-asyncapi-and-microcks#cloudevents_with_asyncapi

@duglin
Copy link
Collaborator

duglin commented May 2, 2024

ping @clemensv

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

No branches or pull requests

2 participants