|
5 | 5 | using System.IO.Abstractions; |
6 | 6 | using Elastic.ApiExplorer.Landing; |
7 | 7 | using Elastic.ApiExplorer.Operations; |
| 8 | +using Elastic.Documentation; |
8 | 9 | using Elastic.Documentation.Configuration; |
9 | 10 | using Elastic.Documentation.Site.FileProviders; |
10 | 11 | using Elastic.Documentation.Site.Navigation; |
@@ -37,7 +38,7 @@ public record ApiEndpoint(List<ApiOperation> Operations, string? Name) : IApiGro |
37 | 38 | public Task RenderAsync(FileSystemStream stream, ApiRenderContext context, CancellationToken ctx = default) => Task.CompletedTask; |
38 | 39 | } |
39 | 40 |
|
40 | | -public class OpenApiGenerator(BuildContext context, ILoggerFactory logger) |
| 41 | +public class OpenApiGenerator(BuildContext context, IMarkdownStringRenderer markdownStringRenderer, ILoggerFactory logger) |
41 | 42 | { |
42 | 43 | private readonly ILogger _logger = logger.CreateLogger<OpenApiGenerator>(); |
43 | 44 | private readonly IFileSystem _writeFileSystem = context.WriteFileSystem; |
@@ -256,7 +257,8 @@ public async Task Generate(Cancel ctx = default) |
256 | 257 | var renderContext = new ApiRenderContext(context, openApiDocument, _contentHashProvider) |
257 | 258 | { |
258 | 259 | NavigationHtml = string.Empty, |
259 | | - CurrentNavigation = navigation |
| 260 | + CurrentNavigation = navigation, |
| 261 | + MarkdownRenderer = markdownStringRenderer |
260 | 262 | }; |
261 | 263 | _ = await Render(navigation, navigation.Index, renderContext, navigationRenderer, ctx); |
262 | 264 | await RenderNavigationItems(navigation); |
|
0 commit comments