add developer module
This commit is contained in:
Executable
+31
@@ -0,0 +1,31 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>de.bstly.we</groupId>
|
||||
<artifactId>webstly-main</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<springdoc-openapi-ui.version>1.6.9</springdoc-openapi-ui.version>
|
||||
</properties>
|
||||
|
||||
<name>developer</name>
|
||||
<artifactId>webstly-developer</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>de.bstly.we</groupId>
|
||||
<artifactId>webstly-core</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-ui</artifactId>
|
||||
<version>${springdoc-openapi-ui.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.developer;
|
||||
|
||||
import org.springdoc.core.GroupedOpenApi;
|
||||
import org.springdoc.core.GroupedOpenApi.Builder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.info.BuildProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import io.swagger.v3.oas.models.OpenAPI;
|
||||
import io.swagger.v3.oas.models.info.Contact;
|
||||
import io.swagger.v3.oas.models.info.Info;
|
||||
|
||||
/**
|
||||
* The SpringDocConfig Class.
|
||||
*/
|
||||
@Configuration
|
||||
public class SpringDocConfig {
|
||||
|
||||
@Autowired
|
||||
private BuildProperties buildProperties;
|
||||
|
||||
/**
|
||||
* api.
|
||||
*
|
||||
* @return GroupedOpenApi
|
||||
*/
|
||||
@Bean
|
||||
public GroupedOpenApi api() {
|
||||
Builder builder = GroupedOpenApi.builder();
|
||||
builder.group("<ALL MODULES>").packagesToScan("de.bstly.we");
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* apiInfo.
|
||||
*
|
||||
* @return OpenAPI
|
||||
*/
|
||||
@Bean
|
||||
public OpenAPI apiInfo() {
|
||||
return new OpenAPI()
|
||||
.info(new Info()
|
||||
.title("we.bstly - Api").contact(new Contact().name("Bastelei e. V.")
|
||||
.url("https://www.bstly.de").email("api@bstly.de"))
|
||||
.version(buildProperties.getVersion()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user