swagger-api/swagger-ui

Deep linking does not work for operations with tags containing forward slash

Open

#5.875 geöffnet am 26. Feb. 2020

Auf GitHub ansehen
 (5 Kommentare) (4 Reaktionen) (0 zugewiesene Personen)JavaScript (8.801 Forks)batch import
Hacktoberfesttype: bug

Repository-Metriken

Stars
 (25.447 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 20h 34m) (14 gemergte PRs in 30 T)

Beschreibung

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:

  1. Start the dev server with the config from above
  2. Go to http://0.0.0.0:3200/#/pet%2Flist
  3. 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