Tool for generating documentation of domain events. Inludes a simple UI to depict what specified events, commands are used in specific service.
This library is inspired by Swagger
. Project is still evolving.
dotnet add package Kros.BusEventDoc
Startup.cs
, register the BusEventDoc generator, defining BusEventDoc document.using Kros.EventBusDoc.Generator.Middleware.Extensions;
services.AddEventBusDocGen(c =>
c.EventBusDoc("v1", new Info { Version = "v1", Title = "Demo" })
);
app.UseEventBusDoc();
AssemblyInfo.cs
.using Kros.EventBusDoc.Generator.BusentAnnotation;
[assembly: BusEvent(EventType =typeof(ISendEvent) )]
[assembly: EventBusCommandConsumer(EventType =typeof(IConsumeOne) )]
[assembly: EventBusCommandSender(EventType =typeof(ISendCommand) )]
dotnet add package Kros.BusEventDoc.UI
app.UseEventBusDocUI(c => { c.EventBusDocEndPoint("v1/busent.json", "Demo"); });
You can see simple example DEMO