springwolf-core icon indicating copy to clipboard operation
springwolf-core copied to clipboard

Add support for kafka headers

Open timonback opened this issue 3 years ago • 4 comments

Springwolf already provides documentation for the data payload. Transport metadata (aka headers) cannot be documented with springwolf at this point. Why the separation? The data/domain payload should be separate from the transport metadata. In REST APIs, the HTTP Content-Type, Content-Length is also a header and (usually) not part of the response object.

AsyncApi allows to define headers as part of the message, similar as the payload is defined: https://www.asyncapi.com/docs/reference/specification/v2.4.0#messageObject

Personal use-case: https://cloudevents.io is an upcoming standardization, which relies on putting metadata into headers. I would like to document those headers. I do not intend to create any kind of dependency on cloudevents.

timonback avatar Sep 16 '22 12:09 timonback

See #86

stavshamir avatar Sep 17 '22 19:09 stavshamir

Just to keep everything together, the issue that triggered me for PR https://github.com/springwolf/springwolf-core/pull/86 : Issue https://github.com/springwolf/springwolf-core/issues/51

sam0r040 avatar Sep 23 '22 15:09 sam0r040

By reading #51, I was not sure if documenting the headers is part of it, or only making the springwolf-ui produce to topic functionality work. If documenting the headers as part of springwolf-ui is part of it, this is a duplicate and can be closed.

timonback avatar Sep 23 '22 18:09 timonback

That's a good point, I was just commenting about it in #51. @sam0r040 in his PR only provides a fix for producing to a topic which has multiple payload types, so let's keep this one (maybe describe it with more detail).

stavshamir avatar Sep 23 '22 18:09 stavshamir