package eu.dnetlib.bioschemas.api; import org.springdoc.core.GroupedOpenApi; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cache.annotation.EnableCaching; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.scheduling.annotation.EnableScheduling; import eu.dnetlib.common.app.AbstractDnetApp; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; @SpringBootApplication @EnableCaching @EnableScheduling @ComponentScan(basePackages = "eu.dnetlib") public class MainApplication extends AbstractDnetApp { public static void main(final String[] args) { SpringApplication.run(MainApplication.class, args); } @Bean public GroupedOpenApi publicApi() { return GroupedOpenApi.builder() .group("D-Net Bioschemas Service APIs") .pathsToMatch("**/api/**") .build(); } @Override protected void configSwagger(final OpenAPI openApi) { openApi.info(new Info().title("D-Net Bioschemas Service APIs") .description("APIs documentation") .version("1.1") .license(new License().name("Apache 2.0").url("http://www.apache.org/licenses/LICENSE-2.0"))); } }