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
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.
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.
I'm seeing this as well, it seems to be introduced with 3.20.0. 3.19.5 works as expected with urls.primaryName.
Confirmed! Prioritizing this bug.
Looks like this was caused by aec4e37.
Thanks