org.bidib.wizard.server.config.SwaggerConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bidibwizard-server Show documentation
Show all versions of bidibwizard-server Show documentation
jBiDiB BiDiB Wizard Server POM
package org.bidib.wizard.server.config;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springdoc.core.GroupedOpenApi;
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.Info;
import io.swagger.v3.oas.models.info.License;
@Configuration(proxyBeanMethods = false)
public class SwaggerConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(SwaggerConfig.class);
@Bean
GroupedOpenApi api() {
LOGGER.info("Create the swagger2 api bean.");
// @formatter:off
return GroupedOpenApi.builder()
.group("bidib-wizard-api")
.pathsToMatch("/api/**")
.build();
// @formatter:on
}
@Bean
OpenAPI bidibWizardAPI() {
// @formatter:off
return new OpenAPI()
.info(new Info().title("BiDiB-Wizard API")
.description("BiDiB-Wizard sample application")
.version("v0.1")
.license(new License().name("GNU GPLv3")));
// @formatter:on
}
}