-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Description
Q&A
- OS: macOS
- Browser: chrome
- Version: 71
- Method of installation: dist assets
- Swagger-UI version: 3.20.1
- Swagger/OpenAPI version: Swagger 2.0
Content & configuration
Swagger-UI configuration options:
SwaggerUI({
configUrl: document.location.origin + '/swagger-config.yaml',
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl,
SwaggerUIBundle.plugins.Topbar
],
operationsSorter: "alpha",
tagsSorter: "alpha",
layout: "StandaloneLayout",
validatorUrl: null
})
swagger-config.yaml
urls:
- name: common
url: /api/common/index.json
- name: v1
url: /api/v1/index.json
- name: v2
url: /api/v2/index.yaml
urls.primaryName: v1
Describe the bug you're encountering
TopBar display correctly with urls.primaryName
matched spec in the dropdown list, URL include ?urls.primaryName=v1
in the address bar of browser, but only the first spec of urls list will be loaded, not v1.
Expected behavior
With urls.primaryName
option, Swagger-UI should process the matched spec name. So the v1 spec should be loaded when visit the UI initial page.