Redocly / Redocly/redoc

Inaccurate generic-search response in rendered Open API documentation

Open
#2,740 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

Description of the Bug
I do not get accurate search results when I search or a keyword or term from the Search option present on the left side panel on the rendered Redocly API documentation. This happens especially when I search for a parameter or field name that is present in a nested object of a schema.

Expected Behaviour
I should be able to see the count of occurrences or at least the highlighted occurrences of a keyword or term, even when I search from the search option present on the left side panel.

Minimal reproducible OpenAPI snippet(if possible)
I have used the Redocly default demo Museum API which is open source available.
I tried searching the timeOpen parameter found in the 200 response schema, but the search shows "No records found"

I have even tried using the generic Ctrl+F search way and it showed inconsistent results.

  • If I am at the top of the document and search for timeOpen in your demo Museum API, it does not return the result from the 200 response schema.

-When I expand the 200 response schema, it highlights the option only then.

Screenshots
Some screenshots from the tests done are attached.

Additional context
Customers and internal stakeholders find it difficult to search the documentation which should be simple to access information not available in the index or higher level headings.

Image Image Image Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Redocly default Museum API and reproduce the generic search for the nested timeOpen field in the 200 response schema, both from the left search panel and with Ctrl+F. Done means the search reports or highlights occurrences in nested schemas without requiring the schema to be expanded first.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation, frontend, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.