2020-09-04 14:33:19 +02:00
|
|
|
package eu.dnetlib.broker;
|
2020-07-02 08:55:42 +02:00
|
|
|
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
|
|
2021-01-27 12:17:38 +01:00
|
|
|
import eu.dnetlib.common.app.AbstractDnetApp;
|
|
|
|
import springfox.documentation.builders.ApiInfoBuilder;
|
|
|
|
import springfox.documentation.builders.RequestHandlerSelectors;
|
|
|
|
import springfox.documentation.service.ApiInfo;
|
|
|
|
import springfox.documentation.service.Tag;
|
|
|
|
import springfox.documentation.spring.web.plugins.Docket;
|
|
|
|
|
2020-07-02 08:55:42 +02:00
|
|
|
@SpringBootApplication
|
2021-01-27 12:17:38 +01:00
|
|
|
public class LiteratureBrokerServiceApplication extends AbstractDnetApp {
|
|
|
|
|
|
|
|
public static final String TAG_EVENTS = "Events";
|
|
|
|
public static final String TAG_SUBSCRIPTIONS = "Subscriptions";
|
|
|
|
public static final String TAG_NOTIFICATIONS = "Notifications";
|
|
|
|
public static final String TAG_TOPIC_TYPES = "Topic Types";
|
|
|
|
public static final String TAG_OPENAIRE = "OpenAIRE";
|
|
|
|
public static final String TAG_MATCHING = "Subscription-Event Matching";
|
2020-07-02 08:55:42 +02:00
|
|
|
|
|
|
|
public static void main(final String[] args) {
|
|
|
|
SpringApplication.run(LiteratureBrokerServiceApplication.class, args);
|
|
|
|
}
|
2021-01-27 12:17:38 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void configSwagger(final Docket docket) {
|
|
|
|
docket.select()
|
|
|
|
.apis(RequestHandlerSelectors.any())
|
|
|
|
.paths(p -> p.startsWith("/api/"))
|
|
|
|
.build()
|
|
|
|
.tags(new Tag(TAG_EVENTS, "Events management"), new Tag(TAG_SUBSCRIPTIONS, "Subscriptions management"), new Tag(TAG_NOTIFICATIONS,
|
|
|
|
"Notifications management"), new Tag(TAG_TOPIC_TYPES, "Topic types management"), new Tag(TAG_OPENAIRE, "OpenAIRE use case"))
|
|
|
|
.apiInfo(new ApiInfoBuilder()
|
|
|
|
.title("Literature Broker Service")
|
|
|
|
.description("APIs documentation")
|
|
|
|
.version("1.1")
|
|
|
|
.contact(ApiInfo.DEFAULT_CONTACT)
|
|
|
|
.license("Apache 2.0")
|
|
|
|
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0")
|
|
|
|
.build());
|
|
|
|
|
|
|
|
}
|
2020-07-02 08:55:42 +02:00
|
|
|
}
|