Skip to content

Commit

Permalink
Initial swagger doc for REST API
Browse files Browse the repository at this point in the history
  • Loading branch information
dima767 committed Jul 5, 2018
1 parent 2d724c4 commit 5c1fdcd
Show file tree
Hide file tree
Showing 6 changed files with 1,185 additions and 331 deletions.
3 changes: 3 additions & 0 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,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();
}
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5c1fdcd

Please sign in to comment.