Show Base URL and version on API product landings - #4034
Open
reakaleek wants to merge 1 commit into
Open
Conversation
The landing printed an empty License line and hid the servers list. Readers could not copy a Base URL. Co-Authored-By: Cursor Grok 4.6 <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4034/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
API product landings now show a copyable Base URL, license, and version when those fields exist on the OpenAPI document. The catalog table stays in place. An empty
License:line no longer appears when the spec has no license.Affects: API reference, Site UI
Prompt summary: Implement https://github.com/elastic/docs-eng-team/issues/814. Add a Base URL row with copy on the product landing when
document.Serversis present. Show license and version only when those fields exist oninfo. Keep the operation catalog. Do not replace the landing with the Introduction topic.Why
The product landing already prints title, description, and a full operation catalog. It does not show servers, so a reader cannot copy the Base URL. It always prints
License:even wheninfo.licenseis missing. Operation pages already list servers, but.server-urlhas no copy control.Implements https://github.com/elastic/docs-eng-team/issues/814.
What
Landing extras
LandingInfoNoteis built once from the OpenAPI document. The landing view prints Base URL, license, and version only when those values exist. License becomes a link wheninfo.license.urlis set. Source and last-update stay out. OpenAPIinfodoes not have those fields.Copy on server URLs
initCopyButtonalso targets.server-url. The button is appended inside that chip so hover CSS can show it. Code-block buttons still insert after thepre. Operation pages pick up the same copy control.Markdown export
LandingCommonMark.Producttakes the sameLandingInfoNoteand writes matching Base URL, license, and version lines.Verify
dotnet test tests/Elastic.ApiExplorer.Tests/Run against local preview or staging. Production
/docs/api/*still proxies to bump.sh.Out of scope: Source and last-update rows. Those fields are not on OpenAPI
info.Made with Cursor