swagger-api / swagger-api/swagger-ui

Support Deep Linking Page Scrolling on route updates for Single Page Applications

Open
#5,970 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat: deep linking type: feature
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Content & configuration

Swagger-UI configuration options:

SwaggerUI({
  dom_id: '#swagger-ui',
  docExpansion: 'none',
  deepLinking: true,
})
Is your feature request related to a problem?

I am trying to create my own side navigation for a Swagger-UI project. The problem is that with deepLinking: true, the correct section is only scrolled into view on initial page load.

Describe the solution you'd like

It would be great if the UI would scroll to the correct section on route changes instead of only firing on initialization for SPAs.

Additional context

I am using Vue for this project.

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 from the SwaggerUI configuration's deepLinking behavior and trace how the correct section is selected during initialization. Check how route changes are handled in a single-page application, then verify that navigation updates scroll the matching section into view rather than only doing so on initial load.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.