Skip to content

Request to support tag with / in deep-linking #10566

@krissss

Description

@krissss

Content & configuration

Swagger/OpenAPI definition:

openapi: 3.0.0
info:
 title: test
 version: 1.0.0

paths:
 /test:
   get:
     tags:
       - abc/xyz
     responses:
       '200':
         description: OK
         content:
           text/plain:
             schema:
               type: string

Swagger-UI configuration options:

SwaggerUI({
  'deepLinking' => true,
})
#/abc%2Fxyz/get_test

Is your feature request related to a problem?

When click the get interface, the browser url will display hash like #/abc%2Fxyz/get_test, but after refreshing the page, the browser url will change, like #/abc/xyz.

Describe the solution you'd like

I check the deep-linking code.
Current code decodeURIComponent first for hash, this will change #/abc%2Fxyz/get_test to #/abc/xyz/get_test

const hash = decodeURIComponent(window.location.hash)

And then in urlHashArrayFromIsShownKey and isShownKeyFromUrlHashArray, they only get first one or two splice

urlHashArrayFromIsShownKey(state, isShownKey) {

I think this can be simple changed for support tag has / in.

Possiable change is to split / first,then decodeURIComponent.

Describe alternatives you've considered

I checked the existing configuration and found no relevant configuration.

Swagger-ui also did not make it clear that deep-linking does not support /.

Some API management tools support the / in tag as the basis for grouping, such as ApiFox

Additional context

Nothing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions