question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] How can you modify page title or header title of the swagger-ui page

See original GitHub issue

Please take the time to search the repository, if your question has already been asked or answered.

  • What version of the library are you using? 2.6.1

What kind of issue is this?

  • [ X] Question.

I can’t find how to replace the title of the HTML page (which is “Swagger UI”) nor the title in the header which is “Swagger”.

I’m definiting my swagger properties through the ApiInfo bean

` Docket api() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage(MyApiImpl.class.getPackage().getName())) .paths(PathSelectors.any()) .build() // To Hide some path from SwaggerUi, add the ApiIgnore annotation. .ignoredParameterTypes(ApiIgnore.class) .apiInfo(getApiInfo()); }

private ApiInfo getApiInfo() {
    return new ApiInfo(
            applicationName,
            applicationDescription,
            applicationVersion,
            null,
            new Contact(company, infoUrl, contactMail), null, null);
}`

Title is displayed under the header fine but I want to remove the “swagger”, the one in the logo__title span in the header and can’t find how to do it.

Thanks for your help

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:8
  • Comments:21 (2 by maintainers)

github_iconTop GitHub Comments

13reactions
cookieMrcommented, Jan 9, 2020

I will just add one more argument to this thread: In a world of microservices i have 3 or 4 Swagger UI opened in my browser. And all of them are titled the same.

8reactions
dilipkrishcommented, Mar 17, 2018

Seems like a nice feature to add. Currently its not customizable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changing title and description of Swagger UI using Springfox
But in my Swagger UI, both the title and the description say "API Documentation". I have tried using the @SwaggerDefinition annotation, but it ......
Read more >
How change default heading in swagger UI - Boomi Community
In the Swagger Visualization Portal, is it possible to rename the "default" group to something else? I want to name it something more ......
Read more >
Extending OpenAPI - FastAPI - tiangolo
If you already know that you need to modify the generated OpenAPI schema, ... openapi_url=app.openapi_url, title=app.title + " - Swagger UI", ...
Read more >
Configuration - Swagger Documentation
When using urls , you can use this subparameter. If the value matches the name of a spec provided in urls , that...
Read more >
Swagger UI
We record and report service issues on our status page. ... Q: Does the contact info have to be a real name? ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found