dnet-applications/apps/dhp-broker-public-application/src/main/java/eu/dnetlib/broker/BrokerPublicApplication.java

42 lines
1.0 KiB
Java
Raw Normal View History

2020-09-04 14:33:19 +02:00
package eu.dnetlib.broker;
2020-08-28 09:40:04 +02:00
2022-08-30 08:59:01 +02:00
import java.util.Arrays;
2022-08-19 11:20:13 +02:00
import java.util.List;
import org.springdoc.core.GroupedOpenApi;
2020-08-28 09:40:04 +02:00
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
2022-08-19 11:20:13 +02:00
import org.springframework.context.annotation.Bean;
2020-08-28 09:40:04 +02:00
2021-01-27 12:17:38 +01:00
import eu.dnetlib.common.app.AbstractDnetApp;
2022-08-19 11:20:13 +02:00
import io.swagger.v3.oas.models.tags.Tag;
2021-01-27 12:17:38 +01:00
2020-08-28 09:40:04 +02:00
@SpringBootApplication
2021-01-27 12:17:38 +01:00
public class BrokerPublicApplication extends AbstractDnetApp {
public static final String OA_PUBLIC_APIS = "Openaire Broker Public API";
2020-08-28 09:40:04 +02:00
public static void main(final String[] args) {
SpringApplication.run(BrokerPublicApplication.class, args);
}
2021-01-27 12:17:38 +01:00
2022-08-19 11:20:13 +02:00
@Bean
public GroupedOpenApi publicApi() {
return GroupedOpenApi.builder()
.group("Broker Public APIs")
2022-09-01 08:57:26 +02:00
.pathsToMatch("/**")
2022-08-19 11:20:13 +02:00
.build();
}
2021-01-27 12:17:38 +01:00
2022-08-19 11:20:13 +02:00
@Override
2022-08-30 08:59:01 +02:00
protected String swaggerTitle() {
return "OpenAIRE Public Broker API";
}
@Override
protected List<Tag> swaggerTags() {
return Arrays.asList(new Tag().name(OA_PUBLIC_APIS).description(OA_PUBLIC_APIS));
2021-01-27 12:17:38 +01:00
}
2022-08-19 11:20:13 +02:00
2020-08-28 09:40:04 +02:00
}