asyncapi / saunter

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

Documentation for how to use Filters #115

Open m-wild opened 3 years ago

m-wild commented 3 years ago

Need some documentation and example use-cases of how and why you might want to use filters. Possibly even provide some common/example filters in the library itself (e.g. MethodParameterFilter to automatically add ChannelItemParameters). Examples:

m-wild commented 3 years ago

Another example use case is automatically adding bindings e.g.

public class DefaultChannelFilter : IChannelItemFilter
{
    public void Apply(ChannelItem channelItem, ChannelItemFilterContext context)
    {
        channelItem.Bindings = new ChannelBindingsReference("default");
    }
}