asyncapi/saunter

Duplicate Attributes Not Allowed

Opened this issue · 4 comments

I noticed when using the package that having duplicate attributes is not allowed (See image for example). Is this intentional? If not is it possible to create a PR and add AllowMultiple = True to the attribute classes.
image

I don't think the spec supports this. Each ChannelItem has a single "publish" and/or "subscribe" operation.

https://www.asyncapi.com/docs/reference/specification/v2.6.0#channelItemObject

However, you can have multiple messages per operation.

Try using multiple [Saunter.Attributes.MessageAttribute] attributes on your method.

(Side note: when publishing a message you should use the SubscribeOperation, AsyncAPI doc is from the clients perspective - Just realized I need to update the docs to reflect this)

Thanks for the reply. I see, but I get the same duplication error with multiple channel attributes too, would this not be something supported?

samjpv commented

Any updates on this?

Wait, I'm working... I think 2 weeks and it will be ready - https://github.com/yurvon-screamo/asyncapi.net#todo