| Q | A
| ------------------------------- | -------
| Bug or feature request? | Bug
| Which Swagger/OpenAPI version? | 2.0
| Which Swagger-UI version? | 3.9.1 (current)
| How did you install Swagger-UI? | Built using npm run build, copied dist folder
| Which browser & version? | Chrome 63.0.3239.132, Edge 41.16299.15.0
| Which operating system? | Windows 10
Change the tag "pet" in the sample petstore.json to be "pet v1" or any other value containing a space.
Example operation: POST /pet with the tag "pet v1"
The link http://localhost:3200/#/pet_v1/addPet (replace localhost with whatever the host is) should result in the UI scrolling to the operation POST /pet.
The UI does not scroll to the linked operation when the operation tag contains a space. In this example, the id of the html element for the operation POST /pet is "operations-pet v1-addPet".
In this example, the element id of the operation POST /pet is "operations-pet v1-addPet". The space in this id breaks linking. The element id in this example should probably instead be "operations-pet_v1-addPet".
Users expect that the linked operation should be scrolled to.
Also bumped into this. Would be great if it was fixed.
If I change this line into
let isShownKey = ["operations", tag.replace(/ /g, "_"), operationId]
it starts working. But I think it isn't meant to be solved that way.
Too bad I don't have the spare time to properly get accustomed with the source code to do a proper merge request.
This is causing issues on the CURL the issue was reported on #4263
Also a hash (#) on the tags causes a problem with the links as well:
http://swagger-net-test.azurewebsites.net/swagger/ui/index?filter=Sample
Is there any progress on the pull request? Or any update if this will be fixed soon?
Same question here.any target date to resolve this?
Most helpful comment
4953 should solve this 馃槃 thanks for the report!