Class JsonSidebarGenerator
Namespace: Momentum.Extensions.EventMarkdownGenerator.Services
Assembly: Momentum.Extensions.EventMarkdownGenerator.dll
Generates JSON sidebar navigation structure for documentation sites. Groups events by subdomain and section, with separate schemas section.
public static class JsonSidebarGeneratorInheritance
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Methods
GenerateSidebar(ICollection<EventWithDocumentation>)
Generates a JSON string containing the sidebar navigation structure.
public static string GenerateSidebar(ICollection<EventWithDocumentation> events)Parameters
events ICollection<EventWithDocumentation>
The events to include in the sidebar.
Returns
A formatted JSON string representing the sidebar structure.
GenerateSidebarItems(ICollection<EventWithDocumentation>)
public static List<SidebarItem> GenerateSidebarItems(ICollection<EventWithDocumentation> events)Parameters
events ICollection<EventWithDocumentation>
Returns
WriteSidebarAsync(ICollection<EventWithDocumentation>, string, CancellationToken)
Generates and writes the sidebar JSON to a file asynchronously.
public static Task WriteSidebarAsync(ICollection<EventWithDocumentation> events, string filePath, CancellationToken cancellationToken = default)Parameters
events ICollection<EventWithDocumentation>
The events to include in the sidebar.
filePath string
The file path to write the sidebar JSON to.
cancellationToken CancellationToken
Optional cancellation token.