asyncapi / saunter

Saunter is a code-first AsyncAPI documentation generator for dotnet.
https://www.asyncapi.com/
MIT License
195 stars 55 forks source link

Duplicate Attributes Not Allowed #165

Open duncan-scuffell-cko opened 1 year ago

duncan-scuffell-cko commented 1 year ago

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

m-wild commented 1 year ago

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)

duncan-scuffell-cko commented 1 year ago

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 10 months ago

Any updates on this?

yurvon-screamo commented 9 months ago

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