From 2d5612108008c694a6149e60e49f0277f8742239 Mon Sep 17 00:00:00 2001 From: Andrea De Pirro Date: Mon, 23 Nov 2026 15:09:15 +0100 Subject: [PATCH 1/6] Enable API Explorer and page feedback flags in prod DO NOT MERGE until the API Explorer go-live checklist reaches the flag step. Co-Authored-By: Claude Sonnet 5.5 --- config/assembler.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/assembler.yml b/config/assembler.yml index 8d6eda2291..e9d1cdd32b 100644 --- a/config/assembler.yml +++ b/config/assembler.yml @@ -10,6 +10,9 @@ environments: optimizely: enabled: false id: "18132920325" + feature_flags: + ASSEMBLER_API_EXPLORER: true + PAGE_FEEDBACK: true # Same AWS account as edge, so the WAF integration URL is shared. waf_integration_url: https://33d8ddf078ac.edge.captcha-sdk.awswaf.com/33d8ddf078ac/jsapi.js staging: From 99713a1dc3ad07e0a3377023eb63603afac85f98 Mon Sep 17 00:00:00 2001 From: Andrea De Pirro Date: Tue, 24 Nov 2026 11:16:18 +0100 Subject: [PATCH 2/6] Flip the prod API Explorer guards for the cutover Isolated builds link API pages to www.elastic.co, so they stop emitting legacy /api/doc/ URLs once prod serves the API Explorer. Co-Authored-By: Claude Opus 5.5 --- .../CrossLinks/IUriEnvironmentResolver.cs | 4 ++-- ...ronments_EnabledKeysWithoutAndWithOverrides.verified.txt | 6 +++--- .../Elastic.Documentation.Build.Tests/FeatureFlagsTests.cs | 6 ++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Elastic.Documentation.Links/CrossLinks/IUriEnvironmentResolver.cs b/src/Elastic.Documentation.Links/CrossLinks/IUriEnvironmentResolver.cs index 8c3e86e4f0..a3369b519f 100644 --- a/src/Elastic.Documentation.Links/CrossLinks/IUriEnvironmentResolver.cs +++ b/src/Elastic.Documentation.Links/CrossLinks/IUriEnvironmentResolver.cs @@ -34,8 +34,8 @@ public Uri Resolve(Uri crossLinkUri, string path) => public Uri ResolveSitePath(Uri crossLinkUri, string sitePath) => new(PublishedBaseUri, $"docs/{sitePath}"); /// - /// www.elastic.co serves bump.sh until the API Explorer cutover (elastic/docs-eng-team#725), which flips this with prod's flag. - public bool LegacyApiUrls => true; + /// Follows prod's API Explorer flag, since isolated builds link API pages to www.elastic.co (elastic/docs-eng-team#725). + public bool LegacyApiUrls => false; private static Uri PublishedBaseUri { get; } = new("https://www.elastic.co"); diff --git a/tests/Elastic.Documentation.Build.Tests/.snapshots/Snapshots/FeatureFlagsMatrixTests/AssemblerEnvironments_EnabledKeysWithoutAndWithOverrides.verified.txt b/tests/Elastic.Documentation.Build.Tests/.snapshots/Snapshots/FeatureFlagsMatrixTests/AssemblerEnvironments_EnabledKeysWithoutAndWithOverrides.verified.txt index c97894e460..c248f241ac 100644 --- a/tests/Elastic.Documentation.Build.Tests/.snapshots/Snapshots/FeatureFlagsMatrixTests/AssemblerEnvironments_EnabledKeysWithoutAndWithOverrides.verified.txt +++ b/tests/Elastic.Documentation.Build.Tests/.snapshots/Snapshots/FeatureFlagsMatrixTests/AssemblerEnvironments_EnabledKeysWithoutAndWithOverrides.verified.txt @@ -23,9 +23,9 @@ preview enabled: assembler-api-explorer, page-feedback enabled with FEATURE_PAGE_FEEDBACK=false and FEATURE_GUIDE_NAV=true: assembler-api-explorer, guide-nav prod - yaml: - enabled: - enabled with FEATURE_PAGE_FEEDBACK=false and FEATURE_GUIDE_NAV=true: guide-nav + yaml: ASSEMBLER_API_EXPLORER=true, PAGE_FEEDBACK=true + enabled: assembler-api-explorer, page-feedback + enabled with FEATURE_PAGE_FEEDBACK=false and FEATURE_GUIDE_NAV=true: assembler-api-explorer, guide-nav staging yaml: ASSEMBLER_API_EXPLORER=true, NAVIGATION_PREVIEW=false, PAGE_FEEDBACK=true, WEBSITE_SEARCH=true enabled: assembler-api-explorer, page-feedback, website-search diff --git a/tests/Elastic.Documentation.Build.Tests/FeatureFlagsTests.cs b/tests/Elastic.Documentation.Build.Tests/FeatureFlagsTests.cs index d652d74b5b..e72262f183 100644 --- a/tests/Elastic.Documentation.Build.Tests/FeatureFlagsTests.cs +++ b/tests/Elastic.Documentation.Build.Tests/FeatureFlagsTests.cs @@ -167,16 +167,14 @@ public void EnabledKeys_EnvironmentVariableOverridesYaml() } [Test] - public void ProdEnvironment_DoesNotEnableAssemblerApiExplorer() + public void ProdEnvironment_EnablesAssemblerApiExplorer() { var config = AssemblyConfiguration.Create(new ConfigurationFileProvider(new TestLoggerFactory(), new ConfigurationFileSystem())); var prod = config.Environments["prod"]; - prod.FeatureFlags.Should().NotContainKey("ASSEMBLER_API_EXPLORER"); - var features = new FeatureFlags([]); foreach (var (key, value) in prod.FeatureFlags) features.Set(key, value); - features.AssemblerApiExplorerEnabled.Should().BeFalse(); + features.AssemblerApiExplorerEnabled.Should().BeTrue(); } } From 9a7427737c10ca839a675bcc4fae615d05a5b688 Mon Sep 17 00:00:00 2001 From: Andrea De Pirro Date: Tue, 24 Nov 2026 11:18:16 +0100 Subject: [PATCH 3/6] Update isolated API link tests to the API Explorer URLs The bump.sh mapping keeps its coverage through a legacy-host resolver. Co-Authored-By: Claude Opus 5.5 --- ...ctions_PickVersionsAndAliases.verified.txt | 44 +++++++++---------- .../CrossLinks/FloatingLinkTests.cs | 30 ++++++++----- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/tests/Elastic.Documentation.Build.Tests/.snapshots/CrossLinks/CrossLinkResolutionSnapshotTests/Resolve_FloatingSections_PickVersionsAndAliases.verified.txt b/tests/Elastic.Documentation.Build.Tests/.snapshots/CrossLinks/CrossLinkResolutionSnapshotTests/Resolve_FloatingSections_PickVersionsAndAliases.verified.txt index 79eaf9608e..02944bffb4 100644 --- a/tests/Elastic.Documentation.Build.Tests/.snapshots/CrossLinks/CrossLinkResolutionSnapshotTests/Resolve_FloatingSections_PickVersionsAndAliases.verified.txt +++ b/tests/Elastic.Documentation.Build.Tests/.snapshots/CrossLinks/CrossLinkResolutionSnapshotTests/Resolve_FloatingSections_PickVersionsAndAliases.verified.txt @@ -1,30 +1,30 @@ example-repo://api/example-api - isolated resolved https://www.elastic.co/docs/api/doc/example-api - codex-absolute resolved https://www.elastic.co/docs/api/doc/example-api + isolated resolved https://www.elastic.co/docs/api/example-api + codex-absolute resolved https://www.elastic.co/docs/api/example-api publish resolved https://docs.example.test/api/doc/example-api publish-prefixed resolved https://docs.example.test/docs/9.0/api/doc/example-api publish-api-explorer resolved https://docs.example.test/docs/api/example-api example-repo://api/example-api/ - isolated resolved https://www.elastic.co/docs/api/doc/example-api - codex-absolute resolved https://www.elastic.co/docs/api/doc/example-api + isolated resolved https://www.elastic.co/docs/api/example-api + codex-absolute resolved https://www.elastic.co/docs/api/example-api publish resolved https://docs.example.test/api/doc/example-api publish-prefixed resolved https://docs.example.test/docs/9.0/api/doc/example-api publish-api-explorer resolved https://docs.example.test/docs/api/example-api example-repo://api/example-api/operation/operation-search - isolated resolved https://www.elastic.co/docs/api/doc/example-api/operation/operation-search - codex-absolute resolved https://www.elastic.co/docs/api/doc/example-api/operation/operation-search + isolated resolved https://www.elastic.co/docs/api/example-api/operation/operation-search + codex-absolute resolved https://www.elastic.co/docs/api/example-api/operation/operation-search publish resolved https://docs.example.test/api/doc/example-api/operation/operation-search publish-prefixed resolved https://docs.example.test/docs/9.0/api/doc/example-api/operation/operation-search publish-api-explorer resolved https://docs.example.test/docs/api/example-api/operation/operation-search example-repo://api/example-api/operation/operation-search#fragment - isolated resolved https://www.elastic.co/docs/api/doc/example-api/operation/operation-search#fragment - codex-absolute resolved https://www.elastic.co/docs/api/doc/example-api/operation/operation-search#fragment + isolated resolved https://www.elastic.co/docs/api/example-api/operation/operation-search#fragment + codex-absolute resolved https://www.elastic.co/docs/api/example-api/operation/operation-search#fragment publish resolved https://docs.example.test/api/doc/example-api/operation/operation-search#fragment publish-prefixed resolved https://docs.example.test/docs/9.0/api/doc/example-api/operation/operation-search#fragment publish-api-explorer resolved https://docs.example.test/docs/api/example-api/operation/operation-search#fragment example-repo://api/example-api/operation/operation-new - isolated resolved https://www.elastic.co/docs/api/doc/example-api/operation/operation-new - codex-absolute resolved https://www.elastic.co/docs/api/doc/example-api/operation/operation-new + isolated resolved https://www.elastic.co/docs/api/example-api/operation/operation-new + codex-absolute resolved https://www.elastic.co/docs/api/example-api/operation/operation-new publish resolved https://docs.example.test/api/doc/example-api/operation/operation-new publish-prefixed resolved https://docs.example.test/docs/9.0/api/doc/example-api/operation/operation-new publish-api-explorer resolved https://docs.example.test/docs/api/example-api/operation/operation-new @@ -41,26 +41,26 @@ example-repo://api/example-api/operation/operation-missing publish-prefixed LinkFloatingPageNotFound: 'operation/operation-missing' is not a page of 'api/example-api' in the current version. publish-api-explorer LinkFloatingPageNotFound: 'operation/operation-missing' is not a page of 'api/example-api' in the current version. example-repo://api/example-api/8 - isolated resolved https://www.elastic.co/docs/api/doc/example-api/8 - codex-absolute resolved https://www.elastic.co/docs/api/doc/example-api/8 + isolated resolved https://www.elastic.co/docs/api/example-api/8 + codex-absolute resolved https://www.elastic.co/docs/api/example-api/8 publish resolved https://docs.example.test/api/doc/example-api/8 publish-prefixed resolved https://docs.example.test/docs/9.0/api/doc/example-api/8 publish-api-explorer resolved https://docs.example.test/docs/api/example-api/8 example-repo://api/example-api/8/operation/operation-search - isolated resolved https://www.elastic.co/docs/api/doc/example-api/v8/operation/operation-search - codex-absolute resolved https://www.elastic.co/docs/api/doc/example-api/v8/operation/operation-search + isolated resolved https://www.elastic.co/docs/api/example-api/v8/operation/operation-search + codex-absolute resolved https://www.elastic.co/docs/api/example-api/v8/operation/operation-search publish resolved https://docs.example.test/api/doc/example-api/v8/operation/operation-search publish-prefixed resolved https://docs.example.test/docs/9.0/api/doc/example-api/v8/operation/operation-search publish-api-explorer resolved https://docs.example.test/docs/api/example-api/v8/operation/operation-search example-repo://api/example-api/8/operation/operation-search-legacy - isolated resolved https://www.elastic.co/docs/api/doc/example-api/v8/operation/operation-search - codex-absolute resolved https://www.elastic.co/docs/api/doc/example-api/v8/operation/operation-search + isolated resolved https://www.elastic.co/docs/api/example-api/v8/operation/operation-search + codex-absolute resolved https://www.elastic.co/docs/api/example-api/v8/operation/operation-search publish resolved https://docs.example.test/api/doc/example-api/v8/operation/operation-search publish-prefixed resolved https://docs.example.test/docs/9.0/api/doc/example-api/v8/operation/operation-search publish-api-explorer resolved https://docs.example.test/docs/api/example-api/v8/operation/operation-search example-repo://api/example-api/8/operation/operation-old - isolated resolved https://www.elastic.co/docs/api/doc/example-api/v8/operation/operation-old - codex-absolute resolved https://www.elastic.co/docs/api/doc/example-api/v8/operation/operation-old + isolated resolved https://www.elastic.co/docs/api/example-api/v8/operation/operation-old + codex-absolute resolved https://www.elastic.co/docs/api/example-api/v8/operation/operation-old publish resolved https://docs.example.test/api/doc/example-api/v8/operation/operation-old publish-prefixed resolved https://docs.example.test/docs/9.0/api/doc/example-api/v8/operation/operation-old publish-api-explorer resolved https://docs.example.test/docs/api/example-api/v8/operation/operation-old @@ -71,8 +71,8 @@ example-repo://api/example-api/8/operation/operation-new publish-prefixed LinkFloatingPageNotFound: 'operation/operation-new' is not a page of 'api/example-api' in version '8'. publish-api-explorer LinkFloatingPageNotFound: 'operation/operation-new' is not a page of 'api/example-api' in version '8'. example-repo://api/example-api/main/operation/operation-search - isolated resolved https://www.elastic.co/docs/api/doc/example-api/operation/operation-search - codex-absolute resolved https://www.elastic.co/docs/api/doc/example-api/operation/operation-search + isolated resolved https://www.elastic.co/docs/api/example-api/operation/operation-search + codex-absolute resolved https://www.elastic.co/docs/api/example-api/operation/operation-search publish resolved https://docs.example.test/api/doc/example-api/operation/operation-search publish-prefixed resolved https://docs.example.test/docs/9.0/api/doc/example-api/operation/operation-search publish-api-explorer resolved https://docs.example.test/docs/api/example-api/operation/operation-search @@ -83,8 +83,8 @@ example-repo://api/example-api/main/operation/operation-search-legacy publish-prefixed LinkFloatingPageNotFound: 'operation/operation-search-legacy' is not a page of 'api/example-api' in version 'main'. publish-api-explorer LinkFloatingPageNotFound: 'operation/operation-search-legacy' is not a page of 'api/example-api' in version 'main'. example-repo://api/example-api/main - isolated resolved https://www.elastic.co/docs/api/doc/example-api - codex-absolute resolved https://www.elastic.co/docs/api/doc/example-api + isolated resolved https://www.elastic.co/docs/api/example-api + codex-absolute resolved https://www.elastic.co/docs/api/example-api publish resolved https://docs.example.test/api/doc/example-api publish-prefixed resolved https://docs.example.test/docs/9.0/api/doc/example-api publish-api-explorer resolved https://docs.example.test/docs/api/example-api diff --git a/tests/Elastic.Markdown.Tests/CrossLinks/FloatingLinkTests.cs b/tests/Elastic.Markdown.Tests/CrossLinks/FloatingLinkTests.cs index 1ac2a19fc6..f41e4c42e9 100644 --- a/tests/Elastic.Markdown.Tests/CrossLinks/FloatingLinkTests.cs +++ b/tests/Elastic.Markdown.Tests/CrossLinks/FloatingLinkTests.cs @@ -67,10 +67,20 @@ private static FetchedCrossLinks CrossLinks(FloatingLinkSection? api = null) }; } - private static (bool Resolved, string? Url, string? Error) Resolve(string crossLink, FloatingLinkSection? api = null) + // A host that still proxies /docs/api/doc/ to bump.sh, as www.elastic.co did before the API Explorer cutover. + private sealed class LegacyHostResolver : IsolatedBuildEnvironmentUriResolver, IUriEnvironmentResolver + { + bool IUriEnvironmentResolver.LegacyApiUrls => true; + } + + private static (bool Resolved, string? Url, string? Error) Resolve( + string crossLink, + FloatingLinkSection? api = null, + IUriEnvironmentResolver? resolver = null + ) { var crossLinkUri = new Uri(crossLink); - var resolution = CrossLinkResolver.Resolve(CrossLinks(api), new IsolatedBuildEnvironmentUriResolver(), crossLinkUri); + var resolution = CrossLinkResolver.Resolve(CrossLinks(api), resolver ?? new IsolatedBuildEnvironmentUriResolver(), crossLinkUri); var uri = resolution.ResolvedUri(); return (uri is not null, uri?.ToString(), uri is null ? resolution.ToDiagnosticMessage(crossLinkUri) : null); } @@ -81,7 +91,7 @@ public void Resolve_PageNamedLikeVersion_PageWinsOverVersion() var (resolved, url, error) = Resolve("elasticsearch://api/elasticsearch/main"); resolved.Should().BeTrue(error); - url.Should().EndWith("/api/doc/elasticsearch/main"); + url.Should().EndWith("/api/elasticsearch/main"); } [Test] @@ -140,7 +150,7 @@ public void TryResolvePage_NamedNewestMajor_StillResolvesToTheVersionlessRoot() [Arguments("elasticsearch://api/elasticsearch/operation/operation-search", "https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-search")] public void CrossLink_OnTheLegacyHost_LandsWhereBumpShServesTheVersion(string crossLink, string expected) { - var (resolved, url, error) = Resolve(crossLink, Versioned); + var (resolved, url, error) = Resolve(crossLink, Versioned, new LegacyHostResolver()); resolved.Should().BeTrue(error); url.Should().Be(expected); @@ -180,7 +190,7 @@ public void CrossLink_ToAnApiPage_ResolvesToThePublishedPage() var (resolved, url, _) = Resolve("elasticsearch://api/elasticsearch/operation/operation-search"); resolved.Should().BeTrue(); - url.Should().Be("https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search"); + url.Should().Be("https://www.elastic.co/docs/api/elasticsearch/operation/operation-search"); } [Test] @@ -189,7 +199,7 @@ public void CrossLink_ToAnApiPageWithAnchor_KeepsTheAnchor() var (resolved, url, _) = Resolve("elasticsearch://api/elasticsearch/operation/operation-search#responses"); resolved.Should().BeTrue(); - url.Should().Be("https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search#responses"); + url.Should().Be("https://www.elastic.co/docs/api/elasticsearch/operation/operation-search#responses"); } [Test] @@ -197,7 +207,7 @@ public void CrossLink_ToAnAliasWithAnchor_KeepsTheAnchor() { var (_, url, _) = Resolve("elasticsearch://api/elasticsearch/9/operation/operation-search-1#responses"); - url.Should().Be("https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-search#responses"); + url.Should().Be("https://www.elastic.co/docs/api/elasticsearch/v9/operation/operation-search#responses"); } [Test] @@ -213,7 +223,7 @@ public void CodexAwareResolver_ForAnApiPage_LinksToThePublishedPage() ).ResolvedUri(); uri.Should().NotBeNull(); - uri!.ToString().Should().Be("https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search"); + uri!.ToString().Should().Be("https://www.elastic.co/docs/api/elasticsearch/operation/operation-search"); } } @@ -223,7 +233,7 @@ public void CrossLink_NamingAVersion_UsesTheRootThatVersionStates() var (resolved, url, _) = Resolve("elasticsearch://api/elasticsearch/8/types/legacy"); resolved.Should().BeTrue(); - url.Should().Be("https://www.elastic.co/docs/api/doc/elasticsearch/legacy-8/types/legacy"); + url.Should().Be("https://www.elastic.co/docs/api/elasticsearch/legacy-8/types/legacy"); } [Test] @@ -241,7 +251,7 @@ public void CrossLink_ToTheApiLanding_ResolvesToTheProductRoot() var (resolved, url, _) = Resolve("elasticsearch://api/elasticsearch"); resolved.Should().BeTrue(); - url.Should().Be("https://www.elastic.co/docs/api/doc/elasticsearch"); + url.Should().Be("https://www.elastic.co/docs/api/elasticsearch"); } [Test] From dd7696dfc8eea59c0d3f4777ebe3cd30ab80e912 Mon Sep 17 00:00:00 2001 From: Andrea De Pirro Date: Tue, 24 Nov 2026 11:20:15 +0100 Subject: [PATCH 4/6] Tell authors to write API links in the API Explorer form Co-Authored-By: Claude Opus 5.5 --- docs/documentation/isolated/configure/index.md | 2 +- docs/syntax/links.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/documentation/isolated/configure/index.md b/docs/documentation/isolated/configure/index.md index 85af660cf1..ba6679142e 100644 --- a/docs/documentation/isolated/configure/index.md +++ b/docs/documentation/isolated/configure/index.md @@ -243,4 +243,4 @@ Suppresses hints about links to API reference pages that don't exist in the API ### `ApiLinkLegacyPrefix` -Suppresses hints about links to API reference pages that use the legacy `/docs/api/doc/` prefix. The hint names the page's URL after the API Explorer cutover. Only valid in `docset.yml`. +Suppresses hints about links to API reference pages that use the legacy `/docs/api/doc/` prefix. The hint names the page's current URL. Only valid in `docset.yml`. diff --git a/docs/syntax/links.md b/docs/syntax/links.md index ad071d72ac..5b2e2fb952 100644 --- a/docs/syntax/links.md +++ b/docs/syntax/links.md @@ -115,15 +115,15 @@ External links display an arrow indicator next to the link text. ### Links to API reference pages -Prefer an [API cross-link](../data/openapi/api-explorer.md#api-cross-links) to an API page, because the build fails when the page is missing. A hard-coded `https://www.elastic.co/docs/api/doc/...` link still works, and the build shows a hint when it points at a page that no longer exists in the API pages of the link index. The hint doesn't fail a `--strict` build, and you can silence it with `ApiLinkMissingPage` under [`suppress`](../documentation/isolated/configure/index.md#suppress). It covers inline links, bare URLs, directive links, `redirects.yml` targets and the links between API pages in OpenAPI descriptions, which you fix in the spec. +Prefer an [API cross-link](../data/openapi/api-explorer.md#api-cross-links) to an API page, because the build fails when the page is missing. A hard-coded `https://www.elastic.co/docs/api/...` link still works, and the build shows a hint when it points at a page that no longer exists in the API pages of the link index. The hint doesn't fail a `--strict` build, and you can silence it with `ApiLinkMissingPage` under [`suppress`](../documentation/isolated/configure/index.md#suppress). It covers inline links, bare URLs, directive links, `redirects.yml` targets and the links between API pages in OpenAPI descriptions, which you fix in the spec. ```markdown -[Search API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search) +[Search API](https://www.elastic.co/docs/api/elasticsearch/operation/operation-search) ``` -If an endpoint no longer exists in the current API docs, point the link at the versioned tree that still has it, for example `https://www.elastic.co/docs/api/doc/kibana/v8/...`. Only the page is checked, not the `#anchor`, and `<...>` autolinks are not checked. An API the link index holds no pages for is not checked. Old bump.sh URLs are checked at the page the edge redirects them to. +If an endpoint no longer exists in the current API docs, point the link at the versioned tree that still has it, for example `https://www.elastic.co/docs/api/kibana/v8/...`. Only the page is checked, not the `#anchor`, and `<...>` autolinks are not checked. An API the link index holds no pages for is not checked. Old bump.sh URLs are checked at the page the edge redirects them to. -API pages are moving from `/docs/api/doc//...` to `/docs/api//...`. Until the API Explorer replaces bump.sh on `www.elastic.co`, keep writing `/docs/api/doc/...` links: they work on every environment, and the edge redirects them to the new path where the API Explorer already serves its pages. The build shows a hint with the new URL for each `/docs/api/doc/...` link, so you know what the link becomes after the cutover. You can silence it with `ApiLinkLegacyPrefix` under [`suppress`](../documentation/isolated/configure/index.md#suppress). +API pages moved from `/docs/api/doc//...` to `/docs/api//...` when the API Explorer replaced bump.sh on `www.elastic.co`. Write new links in the `/docs/api//...` form. Existing `/docs/api/doc/...` links keep working, because the edge redirects them to the new path, and the build shows a hint with the new URL for each one. You can silence it with `ApiLinkLegacyPrefix` under [`suppress`](../documentation/isolated/configure/index.md#suppress). ### Linked images From 33c050ebe365d91c37568b37f86b901ff856a6b0 Mon Sep 17 00:00:00 2001 From: Andrea De Pirro Date: Tue, 24 Nov 2026 11:25:24 +0100 Subject: [PATCH 5/6] Pin the checked-in prod flag and qualify the legacy link guarantee Co-Authored-By: Claude Opus 5.5 --- docs/syntax/links.md | 2 +- .../Elastic.Documentation.Build.Tests/FeatureFlagsTests.cs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/syntax/links.md b/docs/syntax/links.md index 5b2e2fb952..0f1272302b 100644 --- a/docs/syntax/links.md +++ b/docs/syntax/links.md @@ -123,7 +123,7 @@ Prefer an [API cross-link](../data/openapi/api-explorer.md#api-cross-links) to a If an endpoint no longer exists in the current API docs, point the link at the versioned tree that still has it, for example `https://www.elastic.co/docs/api/kibana/v8/...`. Only the page is checked, not the `#anchor`, and `<...>` autolinks are not checked. An API the link index holds no pages for is not checked. Old bump.sh URLs are checked at the page the edge redirects them to. -API pages moved from `/docs/api/doc//...` to `/docs/api//...` when the API Explorer replaced bump.sh on `www.elastic.co`. Write new links in the `/docs/api//...` form. Existing `/docs/api/doc/...` links keep working, because the edge redirects them to the new path, and the build shows a hint with the new URL for each one. You can silence it with `ApiLinkLegacyPrefix` under [`suppress`](../documentation/isolated/configure/index.md#suppress). +API pages moved from `/docs/api/doc//...` to `/docs/api//...` when the API Explorer replaced bump.sh on `www.elastic.co`. Write new links in the `/docs/api//...` form. Most existing `/docs/api/doc/...` links keep working, because the edge redirects them to the new path, and the build shows a hint with the new URL for each one. A few have no new page, such as links to `/docs/api/doc/observability-serverless/...`. For those the build shows a missing-page hint instead, so point the link at a page that exists. You can silence it with `ApiLinkLegacyPrefix` under [`suppress`](../documentation/isolated/configure/index.md#suppress). ### Linked images diff --git a/tests/Elastic.Documentation.Build.Tests/FeatureFlagsTests.cs b/tests/Elastic.Documentation.Build.Tests/FeatureFlagsTests.cs index e72262f183..7b30340a91 100644 --- a/tests/Elastic.Documentation.Build.Tests/FeatureFlagsTests.cs +++ b/tests/Elastic.Documentation.Build.Tests/FeatureFlagsTests.cs @@ -172,9 +172,7 @@ public void ProdEnvironment_EnablesAssemblerApiExplorer() var config = AssemblyConfiguration.Create(new ConfigurationFileProvider(new TestLoggerFactory(), new ConfigurationFileSystem())); var prod = config.Environments["prod"]; - var features = new FeatureFlags([]); - foreach (var (key, value) in prod.FeatureFlags) - features.Set(key, value); - features.AssemblerApiExplorerEnabled.Should().BeTrue(); + // The checked-in value, not the effective flag: CI sets FEATURE_ASSEMBLER_API_EXPLORER, which would mask a removed key. + prod.FeatureFlags.Should().Contain("ASSEMBLER_API_EXPLORER", true); } } From 98203cdb67f38269de2610892de78426cb701437 Mon Sep 17 00:00:00 2001 From: Andrea De Pirro Date: Tue, 24 Nov 2026 11:30:39 +0100 Subject: [PATCH 6/6] Name the right suppression for each API link hint in the guide Co-Authored-By: Claude Opus 5.5 --- docs/syntax/links.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/syntax/links.md b/docs/syntax/links.md index 0f1272302b..0a93b90db3 100644 --- a/docs/syntax/links.md +++ b/docs/syntax/links.md @@ -123,7 +123,7 @@ Prefer an [API cross-link](../data/openapi/api-explorer.md#api-cross-links) to a If an endpoint no longer exists in the current API docs, point the link at the versioned tree that still has it, for example `https://www.elastic.co/docs/api/kibana/v8/...`. Only the page is checked, not the `#anchor`, and `<...>` autolinks are not checked. An API the link index holds no pages for is not checked. Old bump.sh URLs are checked at the page the edge redirects them to. -API pages moved from `/docs/api/doc//...` to `/docs/api//...` when the API Explorer replaced bump.sh on `www.elastic.co`. Write new links in the `/docs/api//...` form. Most existing `/docs/api/doc/...` links keep working, because the edge redirects them to the new path, and the build shows a hint with the new URL for each one. A few have no new page, such as links to `/docs/api/doc/observability-serverless/...`. For those the build shows a missing-page hint instead, so point the link at a page that exists. You can silence it with `ApiLinkLegacyPrefix` under [`suppress`](../documentation/isolated/configure/index.md#suppress). +API pages moved from `/docs/api/doc//...` to `/docs/api//...` when the API Explorer replaced bump.sh on `www.elastic.co`. Write new links in the `/docs/api//...` form. Most existing `/docs/api/doc/...` links keep working, because the edge redirects them to the new path, and the build shows a hint with the new URL for each one. You can silence that hint with `ApiLinkLegacyPrefix` under [`suppress`](../documentation/isolated/configure/index.md#suppress). A few have no new page, such as links to `/docs/api/doc/observability-serverless/...`. For those the build shows the missing-page hint instead, which `ApiLinkMissingPage` silences, so point the link at a page that exists. ### Linked images