3

I am using Redoc to generate API docs GUI. The application is made as single page application including API docs. But there is an issue in the Redoc behaviour. When Redoc is initialized and rendered and I click on another page which is longer than the screen (it is scrollable), the URL is changing the same way as if I would be on the apidocs page. I mean following:

  1. go to apidocs page - Redoc is initialized and rendered
  2. go to another page
  3. scroll the page
  4. URL is changing like if I am on apidocs page - to current URL e.g. following is added #operation/MyResource:[GET->/my_endpoint] and whole URL is https://www.mydomain.zz/not_apidocs_page#operation/MyResource:[GET->/my_endpoint] instead of https://www.mydomain.zz/not_apidocs_page only.

Just one solution came in my mind and it is to uninitialize (destroy) Redoc everytime when I leave apidocs page and initialize it everytime I visit the page. I don't like this idea and this solution, there is no reason, why to re-initialize multiple times, but I didn't have luck in founding another solution. And moreover I didn't have any luck with looking the way how to uninitialize the Redoc. Could you help me, please? How to uninitialize (destroy) Redoc? Or is there way how to force Redoc to watch scrolling limited on one specific URL?

Thank you.

Honza
  • 939
  • 2
  • 11
  • 28

0 Answers0