Redocly / Redocly/redoc

Adding hash navigation corrupts the endpoint url on redoc

Open
#1,620 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I'm currently using Redoc with React. I noticed that when I add a hash navigation such as localhost:8000/dashboard/apis#section then all my endpoint URLs for GET, POST is corrupted since hash is added at the end of the link whereas if I navigate directly to the page and expand the GET url then I see the expected link: localhost:8000/dashboard/apis. Currently, there is no easy way for me to edit or modify the link for GET/POST/PUT methods as there isn't a consistent identifier to retrieve the element.

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

Reproduce the issue in the React setup using a URL with a hash such as /dashboard/apis#section, then trace where endpoint links are generated and where hash navigation is handled. Done means GET, POST, and PUT endpoint URLs remain correct when the documentation page includes a hash, with a regression test covering the case.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.