asyncapi / saunter

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

Support for Subscribe and Publish operations of the same Channel in different classes #91

Closed neoaisac closed 3 years ago

neoaisac commented 3 years ago

If a project tries to define Publish and Subscribe operations in different classes, with the nature of the Channels object as a form of Dictionary<,> the document generator will find a conflicting key in the dictionary when performing the second Add operation, making it impossible to do this.

With this change, a new AddOrApped operation enables a Publish/Subscribe operation to be added to an existing Channel key if the existing one didn't have one defined, while still failing if multiple Publish or Subscribe operations are found for the same Channel.

m-wild commented 3 years ago

Thanks