-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Description
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: stringSwagger-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