Ability to disable TopbarPlugin via SwaggerUIBundle parameter
See original GitHub issueThere are README instructions on how to disable the TopBar, which is really helpful.
Would a PR be considered that would make it even easier – for example a parameter in SwaggerUIBundle?
// Build a system
const ui = SwaggerUIBundle({
...
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
presets_config: {
SwaggerUIStandalonePreset: {
TopbarPlugin: false
}
}
...
})
window.ui = ui
}
There would be a new section called presets_config that would allow parameters to be passed for things like disabling the TopbarPlugin. This is just a rough idea, and I haven’t really looked much at the swagger-ui codebase at all.
Here’s the before vs after:

after:

swagger-ui version: commit https://github.com/swagger-api/swagger-ui/commit/212396f24d0d0f072d06c6af71087d6fddef9134
Issue Analytics
- State:
- Created 6 years ago
- Reactions:11
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Swagger UI - Hide definition URL path - Stack Overflow
In Swagger UI 3.x, you can hide the top bar in one the following ways. Option 1. Edit dist\index.html and find this code:...
Read more >Configuration - Swagger Documentation
When used and Topbar plugin is enabled, the url parameter will not be parsed. ... Enables overriding configuration parameters via URL search params....
Read more >Fix Swagger Validator errors in Power Platform connectors
Operations using the “GET” HTTP method can't have a body or form data. ... Your swagger needs to remove operation parameter duplicates.
Read more >springdoc-openapi v2.0.2
Automatically generates documentation in JSON/YAML and HTML format APIs. This documentation can be completed by comments using swagger-api ...
Read more >arnoldad/swagger-ui - Docker Image
As a node module, swagger-ui-dist also exports the swagger-ui-bundle and ... When used and Topbar plugin is enabled, the url parameter will not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Drop it here since it may help. I managed to remove the top bar on the latest version by simply doing:
Looks like a hack, but works out of the box.
@nfroidure, removing
SwaggerUIStandalonePresetentirely, along withlayout: "StandaloneLayout", should work as well 😄