swagger-api / swagger-api/swagger-ui
Deep linking does not work for operations with tags containing forward slash
Open
Nobody has claimed this yet.
Hacktoberfest
type: bug
- 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: Windows
- Browser: Chrome
- Version: latest
- Method of installation: dist
- Swagger-UI version: 3.18.3
- Swagger/OpenAPI version: OpenAPI 3.0
Content & configuration
Example Swagger/OpenAPI definition:
openapi: 3.0.0
info:
version: 0.0.1
title: "Swagger Petstore"
tags:
- name: "pet/list"
description: "Everything about your Pets"
paths:
/pet:
get:
tags:
- "pet/list"
summary: "Returns all pets"
responses:
"200":
description: OK
Swagger-UI configuration options:
const ui = SwaggerUIBundle({
url: "/docs/rest-api-swagger.yaml",
dom_id: '#swagger-ui',
deepLinking: true,
docExpansion: "none",
validatorUrl: null,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
]
layout: "StandaloneLayout"
)
?yourQueryStringConfig
Describe the bug you're encountering
To reproduce...
Steps to reproduce the behavior:
- Start the dev server with the config from above
- Go to http://0.0.0.0:3200/#/pet%2Flist
- Observe that the pet operation is not unfolded
Expected behavior
Deep linking works
Additional context or thoughts
Similar issue has been reported for spaces and that has been fixed:
https://github.com/swagger-api/swagger-ui/issues/4120
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 the Swagger UI dev server with the provided OpenAPI YAML and deepLinking configuration, then reproduce the navigation to /#/pet%2Flist in Chrome. Trace the deep-linking entry point that handles the encoded tag and verify that the pet operation unfolds for the tag named "pet/list".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100