When you start Swagger UI with Springfox in a Spring Boot app, it looks like this:
How do you configure the title and description ("Api Documentation") and the license (Apache 2.0).
When you start Swagger UI with Springfox in a Spring Boot app, it looks like this:
How do you configure the title and description ("Api Documentation") and the license (Apache 2.0).
Swagger config class (Spring boot):
@Configuration
public class SpringFoxConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build();
}
ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("Demo Test API")
.description("Demo test API task")
.license("© 2021 by my")
.build();
}
}
You can set these values by passing the ApiInfo object to your docket.
ApiInfo's constructor accepts several details about your API. In you case, you should look at title, description, and license parameters.