Skip to content

Commit a4e1b25

Browse files
committed
Uplift swagger to 3.0.0
1 parent 0497eda commit a4e1b25

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

pom.xml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -292,19 +292,11 @@
292292
<artifactId>httpclient</artifactId>
293293
<version>4.5.13</version>
294294
</dependency>
295-
296-
<dependency>
297-
<groupId>io.springfox</groupId>
298-
<artifactId>springfox-swagger-ui</artifactId>
299-
<version>2.6.1</version>
300-
<scope>compile</scope>
301-
</dependency>
302-
295+
303296
<dependency>
304297
<groupId>io.springfox</groupId>
305-
<artifactId>springfox-swagger2</artifactId>
306-
<version>2.6.1</version>
307-
<scope>compile</scope>
298+
<artifactId>springfox-boot-starter</artifactId>
299+
<version>3.0.0</version>
308300
</dependency>
309301

310302
<dependency>

src/main/java/com/ericsson/ei/config/SwaggerConfig.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@
3030
import springfox.documentation.spring.web.plugins.Docket;
3131
import springfox.documentation.swagger2.annotations.EnableSwagger2;
3232

33+
import java.util.ArrayList;
34+
3335
@Configuration
34-
@EnableSwagger2
3536
public class SwaggerConfig {
3637

3738
private static final String CONTACT_NAME = "Eiffel Intelligence Maintainers";
@@ -59,7 +60,8 @@ private ApiInfo metaData() {
5960
"Terms of service",
6061
new Contact(CONTACT_NAME, CONTACT_URL, CONTACT_EMAIL),
6162
"Apache License Version 2.0",
62-
"https://www.apache.org/licenses/LICENSE-2.0");
63+
"https://www.apache.org/licenses/LICENSE-2.0",
64+
new ArrayList<>());
6365
return apiInfo;
6466
}
6567
}

src/main/java/com/ericsson/ei/controller/EIHomeController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ public class EIHomeController {
3232
@ApiOperation(value="", hidden = true)
3333
@RequestMapping(value = "/", method = RequestMethod.GET)
3434
public String home() {
35-
return "redirect:/swagger-ui.html";
35+
return "redirect:/swagger-ui/index.html";
3636
}
3737
}

0 commit comments

Comments
 (0)