Skip to content
This repository has been archived by the owner on May 12, 2023. It is now read-only.

Generate message headers #11

Open
alex-mueller opened this issue Feb 13, 2021 · 2 comments
Open

Generate message headers #11

alex-mueller opened this issue Feb 13, 2021 · 2 comments

Comments

@alex-mueller
Copy link

alex-mueller commented Feb 13, 2021

Hi,

I took a look at the generator and tried to use it, works like a charm, thanks! But one thing I miss is the ability to add message header like described here: https://www.asyncapi.com/docs/specifications/2.0.0#definitionsMessage.

A message MUST contain a payload and MAY also contain headers

As a workaround I can add the header like a correlation id to the payload, but would be cool if this can be generated as well.
Do you think this could be accomplished by the generator + quicktype?

@jonaslagoni
Copy link
Owner

Hey @alex-mueller thanks for the issue! Headers are also JSON Schema so they are compatible, and I will accept any PR adding this of course 😄

@alex-mueller
Copy link
Author

I actually just realized, that I can define a correlationId within an operation that is just referring to one defined as part of the message payload. So the "workaround" seems to be a feature ^^
I'm still trying to figure out how to model my API and playing around with the ecosystem, so please don't expect any contribution so far.

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

No branches or pull requests

2 participants