Skip to content

Commit

Permalink
Merged in SHIBUI-619 (pull request #109)
Browse files Browse the repository at this point in the history
Initial swagger doc for REST API

Approved-by: Bill Smith <wsmith@unicon.net>
Approved-by: Shibui Jenkins <shibui.jenkins@gmail.com>
  • Loading branch information
dima767 authored and rmathis committed Jul 24, 2018
2 parents fd41d03 + f9eaed3 commit c066847
Show file tree
Hide file tree
Showing 3 changed files with 1,045 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ dependencies {
runtimeOnly "org.postgresql:postgresql"
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client:2.2.0'

//Swagger
compile 'io.springfox:springfox-swagger2:2.9.2'

testCompile "org.springframework.boot:spring-boot-starter-test"
testCompile "org.spockframework:spock-core:1.1-groovy-2.4"
testCompile "org.spockframework:spock-spring:1.1-groovy-2.4"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package edu.internet2.tier.shibboleth.admin.ui.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@Configuration
@EnableSwagger2
public class SwaggerConfig {

@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.regex("/api/.*"))
.build();
}
}
Loading

0 comments on commit c066847

Please sign in to comment.