br.com.anteros.swagger.AnterosSwaggerConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Anteros-Spring-Swagger Show documentation
Show all versions of Anteros-Spring-Swagger Show documentation
Support Swagger for Anteros and Spring.
The newest version!
package br.com.anteros.swagger;
import org.springframework.context.annotation.Bean;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import springfox.documentation.swagger2.configuration.Swagger2DocumentationConfiguration;
@EnableSwagger2
public abstract class AnterosSwaggerConfiguration {
public abstract String title();
public abstract String description();
public abstract String version();
public abstract String termsOfServiceUrl();
public abstract String contactName();
public abstract String license();
public abstract String licenseUrl();
@Bean
public Swagger2DocumentationConfiguration getSwagger2Configuration() {
return new Swagger2DocumentationConfiguration();
}
@Bean
public springfox.documentation.spring.web.plugins.Docket docket() {
Docket docket = new Docket(springfox.documentation.spi.DocumentationType.SWAGGER_2);
return docket.apiInfo(apiInfo());
}
private ApiInfo apiInfo() {
ApiInfo apiInfo = new ApiInfo(title(), description(), version(),
termsOfServiceUrl(), contactName(), license(),
licenseUrl());
return apiInfo;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy