Skip to content

Search route lines should match the merged operation page's routes #4663

Open

Description

@reakaleek

A search hit for an API operation should list the same routes, with the same primary route, as the operation page it links to.

What is getting in your way

Navigation can collapse interchangeable spec operations onto one page, for example GET and POST on /_search and /{index}/_search. The page builds its route list from every merged operation and leads with the merged primary route. OpenApiDocumentExporter (src/Elastic.ApiExplorer/Export/OpenApiDocumentExporter.cs) builds each indexed document from one spec operation with an empty sibling list, so each hit carries only its own route and method. The dropdown can then show a different primary route than the page header, or omit an alternate route that matched the query.

What would you like instead

Build Routes from the same merged endpoint the page renders, by reusing the navigation's grouping of interchangeable operations inside the exporter. The route line in the dropdown then matches the page header for every operation in the family.

Anything else

Raised by Libra in the review of #4574, in this comment. The grouping lives in the navigation layer today and the exporter runs before it, so moving that knowledge into the exporter is its own change.

Activity

  1. rahulsjha commented on Nov 21, 2026

    @rahulsjha

    Hi @reakaleek, I'd like to work on this. I'd make search hits for merged operation pages list the same routes and primary route as the page, built from the same merge step, with tests on the /_search case. Okay if I pick it up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions