[Question] How can you modify page title or header title of the swagger-ui page
See original GitHub issuePlease 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:
- Created 6 years ago
- Reactions:8
- Comments:21 (2 by maintainers)
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.
Seems like a nice feature to add. Currently its not customizable.