swagger-api / swagger-api/swagger-ui
swagger-ui route in SPA
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Q&A (please complete the following information)
- OS: [macOS]
- Browser: [chrome]
- Version: [latest]
- Method of installation: [npm]
- Swagger-UI version: [3.23.4]
- Swagger/OpenAPI version: [OpenAPI 3.0]
Content & configuration
Swagger/OpenAPI definition: petstore oas 3 (not important)
Swagger-UI configuration options (very basic, nothing specific):
SwaggerUI({
dom_id: '#swaggerContainer',
spec: swagger,
docExpansion: 'list',
});
Screenshots
none
How can we help?
We are rendering SwaggerUI in one of our pages in SPA (React + React-router), lets say https://my.awesome.app/path/to/page/1 but as soon as I navigate to this page swagger component changing route (probably when it renders) to https://my.awesome.app/# which is breaking our users experience.
Any guidelines / hints how to prevent this from happening?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SwaggerUI configuration shown in the issue and the React/React-router page navigation that renders it. Reproduce the transition to the page with the OpenAPI 3 petstore definition, then trace which Swagger UI behavior adds the /# route; done means the SPA URL remains unchanged when the component renders.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100