Skip to content

Ability to disable TopbarPlugin via SwaggerUIBundle parameter #3229

Closed
@tleyden

Description

@tleyden

There 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:

screen shot 2017-06-10 at 1 30 48 pm

after:

screen shot 2017-06-10 at 1 30 22 pm

swagger-ui version: commit 212396f

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions