", "HTML should be converted to markdown");
- doc.Description.Should().NotContain("
!string.IsNullOrWhiteSpace(l)).TakeLast(5).ToList();
-
- // At least one of the last few lines should be a Markdown list item
- var hasMarkdownListAtEnd = lastNonEmptyLines.Any(l => l.StartsWith("- **", InvariantCulture));
- hasMarkdownListAtEnd.Should().BeTrue(
- $"markdown list should be at the end of the description. Last lines:\n{string.Join("\n", lastNonEmptyLines)}\n\nFull description:\n{doc.Description}"
- );
- }
+ OperationDocs(docs).Should().ContainSingle();
+ }
+
+ [Fact]
+ public void ConvertToDocuments_Main_EmitsProductLanding()
+ {
+ var exporter = new OpenApiDocumentExporter(VersionsConfiguration);
+
+ var docs = exporter.ConvertToDocuments(PingSpec(), ElasticsearchContext()).ToArray();
+
+ docs[0].Path.Should().Be("/docs/api/doc/elasticsearch");
+ docs[0].Title.Should().Be("Elasticsearch API");
+ docs[0].SearchTitle.Should().Be("Elasticsearch API");
+ docs[0].Parents.Should().Equal([new ParentDocument { Title = "API Reference", Path = "/docs/api" }]);
+ }
+
+ [Fact]
+ public void ConvertToDocuments_NumericMoniker_EmitsVersionedLanding()
+ {
+ var exporter = new OpenApiDocumentExporter(VersionsConfiguration);
+
+ var docs = exporter.ConvertToDocuments(PingSpec(), ElasticsearchContext("8", new SemVersion(8, 19, 0))).ToArray();
+
+ docs[0].Path.Should().Be("/docs/api/doc/elasticsearch/v8");
+ docs[0].Title.Should().Be("Elasticsearch 8.x API");
}
+
+ [Fact]
+ public void ConvertToDocuments_AddedInAfterCeiling_StillEmitsLanding()
+ {
+ var exporter = new OpenApiDocumentExporter(VersionsConfiguration);
+ var spec = PingSpec("Generally available; Added in 8.19.0");
+
+ var docs = exporter.ConvertToDocuments(spec, ElasticsearchContext("8", new SemVersion(8, 18, 0))).ToArray();
+
+ docs.Should().ContainSingle();
+ docs[0].Path.Should().Be("/docs/api/doc/elasticsearch/v8");
+ docs[0].Title.Should().Be("Elasticsearch 8.x API");
+ OperationDocs(docs).Should().BeEmpty();
+ }
+
+ [Fact]
+ public void DescriptionWithHtmlOperationsListShouldTransformToMarkdownAtEnd()
+ {
+ var exporter = new OpenApiDocumentExporter(VersionsConfiguration);
+ var description = """
+ **All methods and paths for this operation:**
+
+ GET /_ping
+
+ """;
+ var spec = PingSpec(description: description);
+
+ var docs = exporter.ConvertToDocuments(spec, ElasticsearchContext()).ToArray();
+
+ var operations = OperationDocs(docs);
+ operations.Should().ContainSingle();
+ var doc = operations[0];
+ doc.Description.Should().NotContain("");
+ doc.Description.Should().NotContain(" !string.IsNullOrWhiteSpace(l))
+ .TakeLast(5)
+ .ToList();
+ lastNonEmptyLines.Any(l => l.StartsWith("- **", InvariantCulture)).Should().BeTrue();
+ }
+
+ private static DocumentationDocument[] OperationDocs(IEnumerable docs) =>
+ docs.Where(d => d.Path.Contains("/operation/", Ordinal)).ToArray();
}
diff --git a/tests/Elastic.ApiExplorer.Tests/OpenApiDocumentExporterVersionIndexTests.cs b/tests/Elastic.ApiExplorer.Tests/OpenApiDocumentExporterVersionIndexTests.cs
new file mode 100644
index 0000000000..a9fe1073bd
--- /dev/null
+++ b/tests/Elastic.ApiExplorer.Tests/OpenApiDocumentExporterVersionIndexTests.cs
@@ -0,0 +1,159 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information
+
+using System.Net;
+using System.Text;
+using AwesomeAssertions;
+using Elastic.ApiExplorer.Export;
+using Elastic.ApiExplorer.Model;
+using Elastic.Documentation;
+using Elastic.Documentation.Configuration.Products;
+using Elastic.Documentation.Configuration.Toc;
+using Elastic.Documentation.Configuration.Versions;
+using Elastic.Documentation.Diagnostics;
+using Elastic.Documentation.Versions;
+using FakeItEasy;
+using Microsoft.OpenApi;
+
+namespace Elastic.ApiExplorer.Tests;
+
+public class OpenApiDocumentExporterVersionIndexTests
+{
+ private static readonly Uri BaseUri = new("https://cdn.example/");
+
+ private static readonly VersionsConfiguration StackVersions = TestHelpers.CreateStackVersionsConfiguration(currentMajor: 9, currentMinor: 2);
+
+ private static GitCheckoutInformation GitForElasticsearch() => new()
+ {
+ Branch = "main",
+ Remote = "https://github.com/elastic/elasticsearch.git",
+ Ref = "refs/heads/main"
+ };
+
+ private static OpenApiDocument SpecWithOperation(string operationId) => new()
+ {
+ Info = new OpenApiInfo { Title = operationId, Version = "1.0" },
+ Paths = new OpenApiPaths
+ {
+ ["/ping"] = new OpenApiPathItem
+ {
+ Operations = new Dictionary
+ {
+ [HttpMethod.Get] = new() { OperationId = operationId, Summary = "Ping" }
+ }
+ }
+ }
+ };
+
+ private static ResolvedApiConfiguration ApiConfig(Product product, string specFileName = "elasticsearch-openapi.json", string? repository = "elastic/elasticsearch") =>
+ new()
+ {
+ ProductKey = product.Id,
+ Product = product,
+ SpecFileName = specFileName,
+ Repository = repository
+ };
+
+ private static HttpMessageHandler IndexHandler(string indexJson) =>
+ new StubHandler(request =>
+ {
+ if (request.RequestUri!.AbsolutePath.EndsWith("index.json", StringComparison.Ordinal))
+ {
+ return new HttpResponseMessage(HttpStatusCode.OK)
+ {
+ Content = new StringContent(indexJson, Encoding.UTF8, "application/json")
+ };
+ }
+
+ return new HttpResponseMessage(HttpStatusCode.OK)
+ {
+ Content = new StringContent(/*lang=json,strict*/ """{"openapi":"3.1.0","info":{"title":"Spec","version":"1.0"},"paths":{}}""", Encoding.UTF8, "application/json")
+ };
+ });
+
+ [Fact]
+ public async Task ExportDocuments_MultiMajorIndex_EmitsMainAndVersionedPaths()
+ {
+ var product = TestHelpers.CreateProduct("elasticsearch", StackVersions.GetVersioningSystem(VersioningSystemId.Stack), "Elasticsearch");
+ var handler = IndexHandler(/*lang=json,strict*/ """
+ {
+ "elastic/elasticsearch": {
+ "elasticsearch-openapi.json": {
+ "main": { "version": "main" },
+ "9": { "version": "9.4" },
+ "8": { "version": "8.19" }
+ }
+ }
+ }
+ """);
+ using var client = new VersionIndexClient(BaseUri, handler, sleep: (_, _) => Task.CompletedTask);
+ var queue = new Queue(
+ [
+ SpecWithOperation("ping-main"),
+ SpecWithOperation("ping-9"),
+ SpecWithOperation("ping-8")
+ ]);
+ var reader = A.Fake();
+ A.CallTo(() => reader.ReadAsync(A._, A._))
+ .ReturnsLazily(_ => Task.FromResult(queue.Dequeue()));
+ var exporter = new OpenApiDocumentExporter(StackVersions, versionIndexClient: client, openApiReader: reader, collector: new DiagnosticsCollector([]));
+ var source = new OpenApiExportSource("elasticsearch", ApiConfig(product), GitForElasticsearch());
+
+ var docs = new List();
+ await foreach (var doc in exporter.ExportDocuments([source], TestContext.Current.CancellationToken))
+ docs.Add(doc);
+
+ docs.Select(d => d.Path).Should().BeEquivalentTo(
+ [
+ "/docs/api/doc/elasticsearch",
+ "/docs/api/doc/elasticsearch/operation/operation-ping-main",
+ "/docs/api/doc/elasticsearch/v9",
+ "/docs/api/doc/elasticsearch/v9/operation/operation-ping-9",
+ "/docs/api/doc/elasticsearch/v8",
+ "/docs/api/doc/elasticsearch/v8/operation/operation-ping-8"
+ ]);
+ }
+
+ [Fact]
+ public async Task ExportDocuments_VersionlessProduct_EmitsMainOnly()
+ {
+ var versionless = TestHelpers.CreateVersionlessConfiguration();
+ var product = TestHelpers.CreateProduct("cloud-serverless", versionless.GetVersioningSystem(VersioningSystemId.Serverless), "Cloud Serverless");
+ var handler = IndexHandler(/*lang=json,strict*/ """
+ {
+ "elastic/serverless-api-specification": {
+ "elastic-cloud-serverless.yml": {
+ "main": { "version": "main" },
+ "8": { "version": "8.19" }
+ }
+ }
+ }
+ """);
+ using var client = new VersionIndexClient(BaseUri, handler, sleep: (_, _) => Task.CompletedTask);
+ var reader = A.Fake();
+ A.CallTo(() => reader.ReadAsync(A._, A._))
+ .Returns(Task.FromResult(SpecWithOperation("ping")));
+ var exporter = new OpenApiDocumentExporter(versionless, versionIndexClient: client, openApiReader: reader, collector: new DiagnosticsCollector([]));
+ var source = new OpenApiExportSource(
+ "cloud-serverless",
+ ApiConfig(product, specFileName: "elastic-cloud-serverless.yml", repository: "elastic/serverless-api-specification"),
+ GitForElasticsearch());
+
+ var docs = new List();
+ await foreach (var doc in exporter.ExportDocuments([source], TestContext.Current.CancellationToken))
+ docs.Add(doc);
+
+ docs.Select(d => d.Path).Should().BeEquivalentTo(
+ [
+ "/docs/api/doc/cloud-serverless",
+ "/docs/api/doc/cloud-serverless/operation/operation-ping"
+ ]);
+ }
+
+ private sealed class StubHandler(Func responder) : HttpMessageHandler
+ {
+ protected override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) =>
+ Task.FromResult(responder(request));
+ }
+}
diff --git a/tests/Elastic.ApiExplorer.Tests/OpenApiGeneratorMultiVersionTests.cs b/tests/Elastic.ApiExplorer.Tests/OpenApiGeneratorMultiVersionTests.cs
index 7eff1c5823..a1936b87fa 100644
--- a/tests/Elastic.ApiExplorer.Tests/OpenApiGeneratorMultiVersionTests.cs
+++ b/tests/Elastic.ApiExplorer.Tests/OpenApiGeneratorMultiVersionTests.cs
@@ -197,6 +197,8 @@ public async Task Generate_WritesDistinctOutputTreesForMainAndReleasedMajors()
context.WriteFileSystem.File.Exists(Path.Join(outputRoot, "api", "doc", "elasticsearch", "v9", "index.html")).Should().BeTrue();
context.WriteFileSystem.File.Exists(Path.Join(outputRoot, "api", "doc", "elasticsearch", "v8", "index.html")).Should().BeTrue();
context.WriteFileSystem.File.Exists(Path.Join(outputRoot, "api", "doc", "elasticsearch", "v8", "operation", "operation-ping", "index.html")).Should().BeTrue();
+ generator.GeneratedPageUrls.Should().Contain(u => u.Contains("/api/doc/elasticsearch/v8/operation/operation-ping", StringComparison.Ordinal));
+ generator.GeneratedPageUrls.Should().Contain(u => u.Contains("/api/doc/elasticsearch", StringComparison.Ordinal) && !u.Contains("/v", StringComparison.Ordinal));
}
private static BuildContext CreateGenerateContext(
diff --git a/tests/Elastic.ApiExplorer.Tests/OpenApiOperationIdSearchTitleTests.cs b/tests/Elastic.ApiExplorer.Tests/OpenApiOperationIdSearchTitleTests.cs
index 40a252bc91..1df0a32229 100644
--- a/tests/Elastic.ApiExplorer.Tests/OpenApiOperationIdSearchTitleTests.cs
+++ b/tests/Elastic.ApiExplorer.Tests/OpenApiOperationIdSearchTitleTests.cs
@@ -5,7 +5,6 @@
using AwesomeAssertions;
using Elastic.ApiExplorer.Export;
using Elastic.ApiExplorer.Model;
-using Elastic.ApiExplorer.Operations;
using Elastic.Documentation.Configuration.Versions;
using Elastic.Documentation.Versions;
using Microsoft.OpenApi;
@@ -19,16 +18,11 @@ namespace Elastic.ApiExplorer.Tests;
///
public class OpenApiOperationIdSearchTitleTests
{
- private static readonly VersionsConfiguration VersionsConfiguration = new()
- {
- VersioningSystems = new Dictionary
- {
- {
- VersioningSystemId.Stack,
- new VersioningSystem { Id = VersioningSystemId.Stack, Base = new SemVersion(8, 0, 0), Current = new SemVersion(9, 2, 0) }
- }
- }
- };
+ private static readonly VersionsConfiguration VersionsConfiguration =
+ TestHelpers.CreateStackVersionsConfiguration(currentMajor: 9, currentMinor: 2);
+
+ private static OpenApiConvertContext ElasticsearchMain() =>
+ new("elasticsearch", "main", new SemVersion(9, 2, 0), "Elasticsearch", "elasticsearch");
private static OpenApiDocument CreateBulkSpec() => new()
{
@@ -53,10 +47,11 @@ public void BulkOperation_SearchTitleContainsTheRawOperationIdWithUnderscore()
{
var exporter = new OpenApiDocumentExporter(VersionsConfiguration);
- var docs = exporter.ConvertToDocuments(CreateBulkSpec(), "elasticsearch").ToArray();
+ var docs = exporter.ConvertToDocuments(CreateBulkSpec(), ElasticsearchMain()).ToArray();
+ var operations = docs.Where(d => d.Path.Contains("/operation/", StringComparison.Ordinal)).ToArray();
- docs.Should().HaveCount(1);
- var doc = docs[0];
+ operations.Should().HaveCount(1);
+ var doc = operations[0];
doc.Title.Should().Be("Bulk index or delete documents - Elasticsearch API");
doc.SearchTitle.Should().Be("Bulk index or delete documents - Elasticsearch API - _bulk");
@@ -86,10 +81,11 @@ public void Operation_SummaryWithTrailingNewline_DoesNotLeakIntoTitleOrSearchTit
{
var exporter = new OpenApiDocumentExporter(VersionsConfiguration);
- var docs = exporter.ConvertToDocuments(CreateSpecWithSummaryWhitespace("Bulk index or delete documents\n"), "elasticsearch").ToArray();
+ var docs = exporter.ConvertToDocuments(CreateSpecWithSummaryWhitespace("Bulk index or delete documents\n"), ElasticsearchMain()).ToArray();
+ var operations = docs.Where(d => d.Path.Contains("/operation/", StringComparison.Ordinal)).ToArray();
- docs.Should().HaveCount(1);
- var doc = docs[0];
+ operations.Should().HaveCount(1);
+ var doc = operations[0];
doc.Title.Should().Be("Bulk index or delete documents - Elasticsearch API");
doc.SearchTitle.Should().Be("Bulk index or delete documents - Elasticsearch API - _bulk");
@@ -102,10 +98,11 @@ public void Operation_BlankSummary_FallsBackToOperationId()
{
var exporter = new OpenApiDocumentExporter(VersionsConfiguration);
- var docs = exporter.ConvertToDocuments(CreateSpecWithSummaryWhitespace(" "), "elasticsearch").ToArray();
+ var docs = exporter.ConvertToDocuments(CreateSpecWithSummaryWhitespace(" "), ElasticsearchMain()).ToArray();
+ var operations = docs.Where(d => d.Path.Contains("/operation/", StringComparison.Ordinal)).ToArray();
- docs.Should().HaveCount(1);
- var doc = docs[0];
+ operations.Should().HaveCount(1);
+ var doc = operations[0];
doc.Title.Should().Be("_bulk - Elasticsearch API");
}
diff --git a/tests/Elastic.Documentation.Build.Tests/AssemblerOpenApiBuildStepTests.cs b/tests/Elastic.Documentation.Build.Tests/AssemblerOpenApiBuildStepTests.cs
index f3c5d250ec..a7492dd7e4 100644
--- a/tests/Elastic.Documentation.Build.Tests/AssemblerOpenApiBuildStepTests.cs
+++ b/tests/Elastic.Documentation.Build.Tests/AssemblerOpenApiBuildStepTests.cs
@@ -62,12 +62,13 @@ public async Task BuildAsync_SkipsWhenFeatureFlagDisabled()
outputDirectory);
var assembleSources = AssembleSources.ForTests(context, FrozenDictionary.Empty);
- await AssemblerOpenApiBuildStep.BuildAsync(
+ var urls = await AssemblerOpenApiBuildStep.BuildAsync(
NullLoggerFactory.Instance,
context,
assembleSources,
TestContext.Current.CancellationToken);
+ urls.Should().BeEmpty();
fileSystem.Directory.Exists(fileSystem.Path.Join(outputDirectory, "docs", "api"))
.Should().BeFalse("OpenAPI generation must not run when the feature flag is disabled");
}
@@ -92,16 +93,34 @@ public async Task BuildAsync_SkipsWhenNoApiDeclarationsAndFlagEnabled()
outputDirectory);
var assembleSources = AssembleSources.ForTests(context, FrozenDictionary.Empty);
- await AssemblerOpenApiBuildStep.BuildAsync(
+ var urls = await AssemblerOpenApiBuildStep.BuildAsync(
NullLoggerFactory.Instance,
context,
assembleSources,
TestContext.Current.CancellationToken);
+ urls.Should().BeEmpty();
fileSystem.Directory.Exists(fileSystem.Path.Join(outputDirectory, "docs", "api"))
.Should().BeFalse("OpenAPI generation must not run without API declarations");
}
+ [Fact]
+ public void DiscoverExportSources_MapsApiKeysToExportSources()
+ {
+ var collector = new DiagnosticsCollector([]);
+ var withApi = CreateDocumentationSet("docs-content", "elasticsearch", collector);
+ var assembleSets = new Dictionary
+ {
+ [withApi.Checkout.Repository.Name] = withApi
+ }.ToFrozenDictionary();
+
+ var sources = AssemblerOpenApiBuildStep.DiscoverExportSources(assembleSets, collector);
+
+ sources.Should().ContainSingle();
+ sources[0].ApiKey.Should().Be("elasticsearch");
+ sources[0].Git.Should().Be(withApi.BuildContext.Git);
+ }
+
[Fact]
public void DiscoverApiOwners_EmitsErrorWhenDuplicateKeysDeclared()
{
diff --git a/tests/Elastic.Documentation.Build.Tests/SitemapTests.cs b/tests/Elastic.Documentation.Build.Tests/SitemapTests.cs
index 6734381784..6ab0728e9d 100644
--- a/tests/Elastic.Documentation.Build.Tests/SitemapTests.cs
+++ b/tests/Elastic.Documentation.Build.Tests/SitemapTests.cs
@@ -181,6 +181,34 @@ public void Generate_ExcludesApiDocsFromSitemap()
locs.Should().Contain("https://www.elastic.co/docs/kibana/dashboard");
}
+ [Fact]
+ public void Generate_IncludesApiDocs_WhenRequested()
+ {
+ var fs = new MockFileSystem();
+ var outputDir = fs.DirectoryInfo.New("/output");
+ var now = DateTimeOffset.UtcNow;
+ var entries = new Dictionary
+ {
+ ["/docs/elasticsearch/getting-started"] = now,
+ ["/docs/api/"] = now,
+ ["/docs/api/doc/elasticsearch/"] = now,
+ ["/docs/api/doc/elasticsearch/operation/operation-ping"] = now,
+ ["/docs/api/doc/elasticsearch/v8/operation/operation-ping"] = now,
+ };
+
+ SitemapBuilder.Generate(entries, fs, outputDir, includeApiDocs: true);
+
+ var content = fs.File.ReadAllText(fs.Path.Join("/output", "sitemap.xml"));
+ var doc = XDocument.Parse(content);
+ XNamespace ns = "http://www.sitemaps.org/schemas/sitemap/0.9";
+ var locs = doc.Descendants(ns + "loc").Select(e => e.Value).ToList();
+ locs.Should().HaveCount(5);
+ locs.Should().Contain("https://www.elastic.co/docs/api/");
+ locs.Should().Contain("https://www.elastic.co/docs/api/doc/elasticsearch/");
+ locs.Should().Contain("https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ping");
+ locs.Should().Contain("https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ping");
+ }
+
[Fact]
public void BuildSearchBody_FirstPage_HasPitButNoSearchAfter()
{
diff --git a/tests/Elastic.Markdown.Tests/Search/OpenApiSearchTitleTests.cs b/tests/Elastic.Markdown.Tests/Search/OpenApiSearchTitleTests.cs
index b01e02b0bb..f3d6e5a480 100644
--- a/tests/Elastic.Markdown.Tests/Search/OpenApiSearchTitleTests.cs
+++ b/tests/Elastic.Markdown.Tests/Search/OpenApiSearchTitleTests.cs
@@ -34,6 +34,98 @@ public void ApiDocs_PreserveTheExporterSSearchTitle()
doc.SearchTitle.Should().Contain("_bulk");
}
+ [Fact]
+ public void ApiDocs_VersionedPath_RaisesNavigationDepth()
+ {
+ var current = new DocumentationDocument
+ {
+ ContentType = "api",
+ Path = "/docs/api/doc/elasticsearch/operation/operation-ping",
+ Title = "Ping - Elasticsearch API",
+ SearchTitle = "Ping - Elasticsearch API - ping"
+ };
+ var versioned = new DocumentationDocument
+ {
+ ContentType = "api",
+ Path = "/docs/api/doc/elasticsearch/v8/operation/operation-ping",
+ Title = "Ping - Elasticsearch 8.x API",
+ SearchTitle = "Ping - Elasticsearch 8.x API - ping"
+ };
+
+ ElasticsearchMarkdownExporter.CommonEnrichments(current, null);
+ ElasticsearchMarkdownExporter.CommonEnrichments(versioned, null);
+
+ current.Navigation.Depth.Should().Be(20);
+ versioned.Navigation.Depth.Should().Be(40);
+ versioned.Navigation.Depth.Should().BeGreaterThan(current.Navigation.Depth);
+ }
+
+ [Fact]
+ public void ApiDocs_ProductLanding_AssignsNavigationDepth()
+ {
+ var current = new DocumentationDocument
+ {
+ ContentType = "api",
+ Path = "/docs/api/doc/elasticsearch",
+ Title = "Elasticsearch API",
+ SearchTitle = "Elasticsearch API"
+ };
+ var versioned = new DocumentationDocument
+ {
+ ContentType = "api",
+ Path = "/docs/api/doc/elasticsearch/v8",
+ Title = "Elasticsearch 8.x API",
+ SearchTitle = "Elasticsearch 8.x API"
+ };
+
+ ElasticsearchMarkdownExporter.CommonEnrichments(current, null);
+ ElasticsearchMarkdownExporter.CommonEnrichments(versioned, null);
+
+ current.Navigation.Depth.Should().Be(10);
+ versioned.Navigation.Depth.Should().Be(30);
+ }
+
+ [Fact]
+ public void ApiDocs_ProductLanding_RanksAboveMatchingOperation()
+ {
+ var currentLanding = new DocumentationDocument
+ {
+ ContentType = "api",
+ Path = "/docs/api/doc/elasticsearch",
+ Title = "Elasticsearch API",
+ SearchTitle = "Elasticsearch API"
+ };
+ var currentOperation = new DocumentationDocument
+ {
+ ContentType = "api",
+ Path = "/docs/api/doc/elasticsearch/operation/operation-ping",
+ Title = "Ping - Elasticsearch API",
+ SearchTitle = "Ping - Elasticsearch API - ping"
+ };
+ var versionedLanding = new DocumentationDocument
+ {
+ ContentType = "api",
+ Path = "/docs/api/doc/elasticsearch/v8",
+ Title = "Elasticsearch 8.x API",
+ SearchTitle = "Elasticsearch 8.x API"
+ };
+ var versionedOperation = new DocumentationDocument
+ {
+ ContentType = "api",
+ Path = "/docs/api/doc/elasticsearch/v8/operation/operation-ping",
+ Title = "Ping - Elasticsearch 8.x API",
+ SearchTitle = "Ping - Elasticsearch 8.x API - ping"
+ };
+
+ ElasticsearchMarkdownExporter.CommonEnrichments(currentLanding, null);
+ ElasticsearchMarkdownExporter.CommonEnrichments(currentOperation, null);
+ ElasticsearchMarkdownExporter.CommonEnrichments(versionedLanding, null);
+ ElasticsearchMarkdownExporter.CommonEnrichments(versionedOperation, null);
+
+ currentLanding.Navigation.Depth.Should().BeLessThan(currentOperation.Navigation.Depth);
+ versionedLanding.Navigation.Depth.Should().BeLessThan(versionedOperation.Navigation.Depth);
+ }
+
[Fact]
public void MarkdownDocs_StillGetTheDerivedSearchTitle()
{