Skip to content

Commit b4481c8

Browse files
committed
finalize
1 parent 1fc0473 commit b4481c8

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

src/Elastic.ApiExplorer/Landing/LandingNavigationItem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.IO.Abstractions;
66
using Elastic.Documentation.Extensions;
77
using Elastic.Documentation.Site.Navigation;
8-
using RazorSlices;
98

109
namespace Elastic.ApiExplorer.Landing;
1110

@@ -24,7 +23,8 @@ public async Task RenderAsync(FileSystemStream stream, ApiRenderContext context,
2423
{
2524
Landing = this,
2625
StaticFileContentHashProvider = context.StaticFileContentHashProvider,
27-
NavigationHtml = context.NavigationHtml
26+
NavigationHtml = context.NavigationHtml,
27+
ApiInfo = context.Model.Info,
2828
};
2929
var slice = Landing.LandingView.Create(viewModel);
3030
await slice.RenderAsync(stream, cancellationToken: ctx);

src/Elastic.ApiExplorer/Landing/LandingView.cshtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,7 @@
2929
};
3030
}
3131
<section id="elastic-docs-v3">
32-
<h1>@Model.</h1>
32+
<h1>@Model.ApiInfo.Title</h1>
33+
<p>@Model.ApiInfo.Description</p>
34+
<p>License: @Model.ApiInfo.License.Identifier</p>
3335
</section>

src/Elastic.ApiExplorer/Landing/LandingViewModel.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information
44

5+
using Microsoft.OpenApi.Models;
6+
57
namespace Elastic.ApiExplorer.Landing;
68

79
public class LandingViewModel : ApiViewModel
810
{
911
public required ApiLanding Landing { get; init; }
10-
12+
public required OpenApiInfo ApiInfo { get; init; }
1113
}

src/Elastic.ApiExplorer/Operations/OperationView.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
};
3030
}
3131
<section id="elastic-docs-v3">
32-
<h1>@Model.</h1>
32+
<h1>@Model.Operation.Operation.OperationId</h1>
3333
</section>

0 commit comments

Comments
 (0)