### Install NuGet package WilderMinds.SwaggerUIHierarchySupport Source: https://github.com/wilder-minds/swaggeruihierarchysupport/blob/main/readme.md Install the NuGet package to enable hierarchical tag support in SwaggerUI. ```shell > > dotnet add package WilderMinds.SwaggerUIHierarchySupport ``` -------------------------------- ### Create hierarchical tags with colon delimiter in MapGet Source: https://github.com/wilder-minds/swaggeruihierarchysupport/blob/main/readme.md Example endpoint using a colon-delimited tag to create a hierarchy: 'Weather' as top level and 'Forcast' as sub-tag. ```csharp app.MapGet("/weatherforecast", () => { var forecast = Enumerable.Range(1, 5).Select(index => new WeatherForecast ( DateOnly.FromDateTime(DateTime.Now.AddDays(index)), Random.Shared.Next(-20, 55), summaries[Random.Shared.Next(summaries.Length)] )) .ToArray(); return forecast; }) .WithName("GetWeatherForecast") .WithTags("Weather:Forcast") // Weather is the top level, and the Forcast is the sub-tag .WithOpenApi(); ``` -------------------------------- ### Enable hierarchy support in SwaggerUI with AddHierarchySupport() Source: https://github.com/wilder-minds/swaggeruihierarchysupport/blob/main/readme.md Add hierarchy support to SwaggerUI by calling AddHierarchySupport() in the UseSwaggerUI options. ```csharp app.UseSwaggerUI(opt => { opt.AddHierarchySupport(); }); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.