Skip to content

External links to swagger-ui anchors don't work #10527

@carlin-q-scott

Description

@carlin-q-scott

Describe the bug you're encountering

When loading the Swagger UI site from an external link that includes an anchor, such as #model-Category, the router modifies the URL to separate out the hash from the anchor name: /#/model-Category; This breaks the anchor link. If you then fix the URL in the address bar and press enter, it works. So, the anchor reference works from within the page, but not from external sites.

Link to issue on demo site: https://petstore.swagger.io/#model-Category

Expected behavior

Page loads and scrolls to the section that was linked to.

Actual behavior

Page modifies the url before loading and load the top of the page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions