Redocly / Redocly/redoc

Links overwriting react routes

Open
#2,013 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We have an application, that uses react routes. Now, consider following flow:
Paths -> Requests (get, post etc) -> Security

For above flow, redoc is creating href to security schemas. On click of the href, the browser url is changed with #content id. This affects the react routing of our application. Is there a way to avoid this? If not, is it possible to override this behavior?

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 by reproducing the reported flow from Paths through Requests and Security in a React-routed application, then inspect how Redoc creates href links to security schemas. Determine whether the resulting #content URL changes the application's React route and document a clear way to avoid or override that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.