Skip to content
Snippets Groups Projects
Commit 923d83ed authored by Eduard Ellert's avatar Eduard Ellert Committed by Tom Käsler
Browse files

SwaggerConfiguration basic configs

parent e54fe98b
1 merge request!10Interactive API documentation
package de.thm.arsnova.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableWebMvc
@EnableSwagger2
@ComponentScan(basePackages = {"de.thm.arsnova.controller","de.thm.arsnova.domain"})
public class SwaggerConfiguration {
//api version und Beschreibung einfügen
@Bean
public Docket customImplementation() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(getApiInfo());
}
private ApiInfo getApiInfo() {
return new ApiInfo("ARSnova API's", "Swagger Interface for RESTful APIs", "1.0", "",
"arsnova@thm.de", "Apache License 2.0", "");
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment