-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
30 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 20 additions & 14 deletions
34
tmitocar-service/src/main/java/services/tmitocar/config/OpenApiConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,35 @@ | ||
package services.tmitocar.config; | ||
import java.util.List; | ||
|
||
import io.swagger.v3.oas.models.OpenAPI; | ||
import io.swagger.v3.oas.models.info.Contact; | ||
import io.swagger.v3.oas.models.info.Info; | ||
import io.swagger.v3.oas.models.info.License; | ||
import io.swagger.v3.oas.models.servers.Server; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class OpenApiConfig { | ||
|
||
Contact c = new Contact().email("https://tech4comp.dbis.rwth-aachen.de/").name("Alexander Tobias Neumann").url("https://tech4comp.dbis.rwth-aachen.de/"); | ||
|
||
License l = new License().name("ACIS License (BSD3)").url("https://github.com/rwth-acis/las2peer-tmitocar-Service/blob/master/LICENSE"); | ||
|
||
@Bean | ||
public OpenAPI customOpenAPI() { | ||
return new OpenAPI() | ||
.info(new Info() | ||
.title("tmitocar Service") | ||
.version("3.0.0") | ||
.description("A tmitocar wrapper service for analyzing/evaluating texts.") | ||
.termsOfService("https://tech4comp.de/") | ||
.license(l) | ||
.contact(c) | ||
); | ||
public OpenAPI openAIServiceconfig() { | ||
Server sv = new Server(); | ||
sv.setUrl("http://localhost:8080"); | ||
sv.setDescription("Development environment URL"); | ||
Contact contact = new Contact(); | ||
contact.email("[email protected]"); | ||
contact.name("Alexander Tobias Neumann, Yue Yin"); | ||
License lis = new License().name("ACIS License (BSD3)").url("https://github.com/rwth-acis/las2peer-tmitocar-Service/blob/master/LICENSE"); | ||
Info info = new Info() | ||
.title("tmitocar Service") | ||
.version("3.0.0") | ||
.contact(contact) | ||
.description("A tmitocar wrapper service for analyzing/evaluating texts.") | ||
.license(lis) | ||
.termsOfService("https://tech4comp.de/"); | ||
return new OpenAPI().info(info).servers(List.of(sv)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters