From c95a78bb33cf1473e269c6855a2ef0d1adee508e Mon Sep 17 00:00:00 2001 From: Tjark Wilhelm Hoeck <tjark.hoeck@mni.thm.de> Date: Thu, 4 Jun 2015 13:09:51 +0200 Subject: [PATCH] Finished SwaggerConfiguration class and payed technical debts --- .../arsnova/config/SwaggerConfiguration.java | 33 ++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/src/main/java/de/thm/arsnova/config/SwaggerConfiguration.java b/src/main/java/de/thm/arsnova/config/SwaggerConfiguration.java index ab3d0df0..f6a059e8 100644 --- a/src/main/java/de/thm/arsnova/config/SwaggerConfiguration.java +++ b/src/main/java/de/thm/arsnova/config/SwaggerConfiguration.java @@ -1,19 +1,30 @@ +/* + * This file is part of ARSnova Backend. + * Copyright (C) 2012-2015 The ARSnova Team + * + * ARSnova Backend is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ARSnova Backend is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ 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 { @Bean @@ -23,7 +34,13 @@ public class SwaggerConfiguration { } private ApiInfo getApiInfo() { - return new ApiInfo("ARSnova API's", "Swagger Interface for RESTful APIs", "1.0", "", - "arsnova@thm.de", "Apache License 2.0", ""); + return new ApiInfo( + "ARSnova Backend", + "This is the REST API documentation of the ARSnova Backend, created with the SpringFox Framework", + "1.0", + "ARSnova API terms of service", + "arsnova@thm.de", + "GNU General Public License", + "http://www.gnu.org/licenses/"); } } -- GitLab