Fix(WEB-9483): Index HTTP Method + Path (GET /<path>) for API Search#37784
Open
onceLearner wants to merge 10 commits into
Open
Fix(WEB-9483): Index HTTP Method + Path (GET /<path>) for API Search#37784onceLearner wants to merge 10 commits into
onceLearner wants to merge 10 commits into
Conversation
Append the HTTP method and REST path to each API endpoint's search content so users can find endpoints by typing the path. Capture the method and path in api-pages-full-index.json and pass them to the per-endpoint indexer.
Remove the endpoint path/method indexing changes so this branch builds the master baseline search.json for diffing. To be re-added later.
Compare anchorized summaries in the v1/v2 disambiguation so endpoints whose translated summaries differ only by punctuation (e.g. trailing period) still get a unique -v1/-v2 anchor instead of colliding on one objectID and churning on every sync.
Contributor
Preview links (active after the
|
Forward $endpoint_path/$method into api-page-index.json and add a commented-out append to the content field. Disabled by default (uncomment one line to enable); output is unchanged from baseline.
Append "METHOD /path" to each API endpoint record's content so endpoint REST paths are searchable. Appended at the end to keep it out of the start of the auto-embedded content.
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.
What does this PR do? What is the motivation?
Previously, only the endpoint description was indexed, consequence: searching the endpoints yields in no result: https://docs.datadoghq.com/search/?s=%2Fapi%2Fv2%2Fip_allowlist
This change adds the HTTP method and path to the search index, allowing searches such as
GET /<path>to return the corresponding endpoint.Merge readiness
For Datadog employees:
<name>/<description>convention and include the forward slash (/). If you've already created your PR with an incorrect branch name, please rename your branch and open a fresh PR./reviewto run an automated check that catches common issues before a Documentation team member reviews your PR.AI assistance
Additional notes