Skip to content

Commit

Permalink
Upgraded Swagger to version 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarman committed Aug 10, 2016
1 parent c72e391 commit 4408368
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ext {
pmdVersion = '5.5.1'
guavaVersion = '19.0'
jadiraVersion = '5.0.0.GA'
swaggerVersion = '2.3.0'
swaggerVersion = '2.5.0'
}

group = 'com.leanstacks'
Expand Down
21 changes: 8 additions & 13 deletions src/main/java/com/leanstacks/ws/ApiDocsConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
* The ApiDocsConfiguration class provides configuration beans for the Swagger
* API documentation generator.
* The ApiDocsConfiguration class provides configuration beans for the Swagger API documentation generator.
*
* @author Matt Warman
*/
Expand All @@ -27,32 +26,28 @@ public class ApiDocsConfiguration {
/**
* The project version.
*/
public static final String PROJECT_VERSION = "1.6.0";
public static final String PROJECT_VERSION = "1.6.1";
/**
* The project contact information.
*/
public static final String PROJECT_CONTACT = "LeanStacks.com";

/**
* Create a Docket class to be used by Springfox's Swagger API Documentation
* framework. See http://springfox.github.io/springfox/ for more
* information.
* Create a Docket class to be used by Springfox's Swagger API Documentation framework. See
* http://springfox.github.io/springfox/ for more information.
*
* @return A Docket instance.
*/
@Bean
public Docket docket() {
final Predicate<String> paths = PathSelectors.ant("/api/**");

final ApiInfo apiInfo = new ApiInfoBuilder()
.title("Project Skeleton for Spring Boot Web Services")
.description(
"The Spring Boot web services starter project provides a foundation "
+ "to rapidly construct a RESTful web services application.")
final ApiInfo apiInfo = new ApiInfoBuilder().title("Project Skeleton for Spring Boot Web Services")
.description("The Spring Boot web services starter project provides a foundation "
+ "to rapidly construct a RESTful web services application.")
.contact(PROJECT_CONTACT).version(PROJECT_VERSION).build();

final Docket docket = new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo).select().paths(paths).build();
final Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).select().paths(paths).build();

return docket;
}
Expand Down

0 comments on commit 4408368

Please sign in to comment.