swagger-api / swagger-api/swagger-ui
DeepLinking breaks angular 8 routing
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Hi,
I have a very annoying problem with angular 8 and swagger deepLinking feature, which i want to use for sharing exact tag/operation description.
My swagger-UI configuration options:
this.ui = SwaggerUIBundle({
url: "http://petstore.swagger.io/v2/swagger.json",
domNode: this.el.nativeElement.querySelector('.swagger-container'),
deepLinking: true,
filter: true,
presets: [
SwaggerUIBundle.presets.apis,
],
validatorUrl: null,
plugins: [
...
],
docExpansion: 'none',
displayOperationId: true
});
The problem is:
When the deepLinkng is set to true, the deep-linking plugin helper (setHash), overrides the url: host/pathname to host/#/tag-clicked.
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 by examining the deep-linking plugin helper setHash and the Angular 8 integration shown in the report. Reproduce the configuration with deepLinking enabled and verify how the host/pathname changes when a tag or operation is selected. Done means preserving Angular routing while still sharing the selected Swagger UI location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100