Repository navigation
Show the root route as / in the API request line - #4909
Merged
Merged
Conversation
The request line of an operation on `/` renders the method and an empty path. This test pins the expected `/` and fails until the next commit. Co-Authored-By: Claude Fable 5.2 <[email protected]>
An operation on `/` has no path segments, and `_EndpointPath` wrote the path one segment at a time. The request line showed the method and an empty path. The partial now writes `/` when a row has no segments. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4909/ |
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.
The request line of an API operation on the root route now reads
GET /. It showed the method and an empty path.Affects: API reference
Prompt summary: The Logstash root operation page on the edge site shows
GETwhereGET /belongs. The ask is to confirm the defect, find every other place with the same effect, and fix it.Why
A route of
/has no path segments. The request line writes the path one segment at a time, so it writes nothing for the root. The LogstashGET /page shows it, and so do the ElasticsearchGET /andHEAD /pages and the rows for those operations on their group pages. The copy button next to the empty line already copiesGET /, because it reads the route string.What
Root route in the request line
A row with no segments now renders
/as its path. Rows with segments render as before. The operation page and the group page share one partial,_EndpointPath, so one change covers both.Test for the rendered partial
Render_RootRoute_ShowsSlashrenders_EndpointPathforGET /and compares the markup with an inline snapshot. The existing endpoint tests compare the route string, which was always correct, so they did not see the empty path.Out of scope — a route with a trailing slash such as
/foo/still displays as/foo. The Logstash 9.5 and Elasticsearch specs have no such route.Verify
Open
http://localhost:3000/api/doc/logstash/v9/operation/operation-root.Check on the preview
GET /.GET /.GET /_health_report, unchanged.🤖 Generated with Claude Code