Skip to content

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

@TehBakker

Description

@TehBakker

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions