Redoc: Duplicate use of tags screws up navigation

Created on 9 Jan 2019  路  4Comments  路  Source: Redocly/redoc

I use it on open api 3 spec.

I have multiple api operations with double (or more) tags.

When i click on one though the ReDoc Viewer, it automatically moves the navigation to the top most tag in the navigation.

Say: Tag1,Tag2

operation A has tag 1 and 2.

  • i navigate Tag2 => Operation A
  • Now in the menu i'm navigated to: Tag1 => Operation A.

This is very annoying.

bug

Most helpful comment

A possible solution could be to integrate the tag name into the link instead of only relaying on operationIdlike ( #operation/operationId/tagname).

This would result in the direct links:

  1. #operation/A/Tag1
  2. #operation/A/Tag2

And to keep existing links working also make `#operation/A link to the first entry.

All 4 comments

I have experienced this behavior as well.

This is ReDoc limitation. I will think how to fix it properly.

Thanks for the issue report.

A possible solution could be to integrate the tag name into the link instead of only relaying on operationIdlike ( #operation/operationId/tagname).

This would result in the direct links:

  1. #operation/A/Tag1
  2. #operation/A/Tag2

And to keep existing links working also make `#operation/A link to the first entry.

I've done a PR to fix this https://github.com/Redocly/redoc/pull/1245. Would appreciate thumbs up on it

Was this page helpful?
0 / 5 - 0 ratings