<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.scope.provided.exclude" value="true"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.scope.runtime.exclude" value="false"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.scope.system.exclude" value="true"/>
-<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.scope.test.exclude" value="true"/>
+<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.scope.test.exclude" value="false"/>
<intAttribute key="net.sourceforge.eclipsejetty.launcher.threadPool.limit.count" value="16"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.threadPool.limit.enabled" value="false"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.webappdir" value="src/main/webapp"/>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="LD_LIBRARY_PATH" value="/opt/libyjpagent"/>
+</mapAttribute>
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;folder nest=&quot;true&quot; path=&quot;/cdmlib-commons/src&quot;/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.folder"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;folder nest=&quot;true&quot; path=&quot;/cdmlib-ext/src&quot;/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.folder"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;folder nest=&quot;true&quot; path=&quot;/cdmlib-io/src&quot;/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.folder"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;folder nest=&quot;true&quot; path=&quot;/cdmlib-model/src&quot;/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.folder"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;folder nest=&quot;true&quot; path=&quot;/cdmlib-persistence/src&quot;/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.folder"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;folder nest=&quot;true&quot; path=&quot;/cdmlib-remote/src&quot;/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.folder"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;folder nest=&quot;true&quot; path=&quot;/cdmlib-remote-webapp/src&quot;/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.folder"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;folder nest=&quot;true&quot; path=&quot;/cdmlib-services/src&quot;/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.folder"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;default/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.default"/> </sourceContainers> </sourceLookupDirector> "/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="net.sourceforge.eclipsejetty.launcher.JettyLaunchClassPathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_60"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="net.sourceforge.eclipsejetty.starter.embedded.JettyEmbeddedLauncherMain"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="cdmlib-remote-webapp"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx500M -XX:PermSize=150m -Dlog4j.configDebug=true -Dorg.mortbay.jetty.webapp.parentLoaderPriority=true -agentlib:yjpagent"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx500M -Dlog4j.configDebug=true -Dlog4j.configuration=file:///${system_property:user.home}/.cdmLibrary/log4j.properties -agentlib:yjpagent -Dcdm.forceSchemaUpdate=true -Dspring.profiles.active=remoting"/>
</launchConfiguration>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="net.sourceforge.eclipsejetty.launcher.JettyLaunchClassPathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="net.sourceforge.eclipsejetty.starter.embedded.JettyEmbeddedLauncherMain"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="cdmlib-remote-webapp"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx4056M -XX:PermSize=150m -Dlog4j.configDebug=true -Dlog4j.configuration=file:///${system_property:user.home}/.cdmLibrary/log4j.properties -Dorg.mortbay.jetty.webapp.parentLoaderPriority=true -Dcdm.forceSchemaUpdate=true -Dspring.profiles.active=remoting"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx500M -Dlog4j.configDebug=true -Dlog4j.configuration=file:///${system_property:user.home}/.cdmLibrary/log4j.properties -Dcdm.forceSchemaUpdate=true -Dspring.profiles.active=remoting"/>
</launchConfiguration>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
+ <scope>test</scope>
</dependency>
- <!-- dependencies for swagger-springmvc, added explicitly -->
+ <!-- dependencies for springfox-swagger2, added explicitly -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<build>
<resources>
- <!-- ${basedir}/src/test/resources -->
<resource>
<!-- replace the place holders like ${...} in datasources.xml -->
- <targetPath>${project.build.directory}/test-classes</targetPath>
<filtering>true</filtering>
- <directory>${basedir}/src/test/resources</directory>
+ <directory>src/test/resources</directory>
+ <targetPath>../test-classes</targetPath>
<includes>
<include>datasources.xml</include>
</includes>
</resource>
<resource>
<!-- all other test resources without filtering -->
- <targetPath>test-classes</targetPath>
- <directory>${basedir}/src/test/resources</directory>
+ <directory>src/test/resources</directory>
+ <targetPath>../test-classes</targetPath>
<excludes>
<exclude>datasources.xml</exclude>
</excludes>
</resource>
<resource>
<!-- all main resources without filtering -->
- <targetPath>classes</targetPath>
- <directory>${basedir}/src/test/resources</directory>
+ <directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
</execution>
</executions>
</plugin>
-
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<name>cdm.beanDefinitionFile</name>
<value>${project.build.directory}/test-classes/datasources.xml</value>
</systemProperty>
+ <systemProperty>
+ <!--
+ start with swagger profile so that the swagger doc
+ can be generated
+ -->
+ <name>spring.profiles.active</name>
+ <value>swagger</value>
+ </systemProperty>
</systemProperties>
</configuration>
<executions>
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <!--
+ The war must be created after running the integration-tests,
+ since the SwaggerGroupsIT test populates the classes/api-docs-static/
+ folder with static swagger doc files. The are otherwise not packed
+ into the wae file.
+ -->
+ <phase>verify</phase>
+ <goals>
+ <goal>war</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.Import;
import org.springframework.http.MediaType;
*
*/
// @EnableWebMvc // do not add this since we are overriding WebMvcConfigurationSupport directly
-@Configuration
@Import(value={PreloadedBeans.class}) // can not be replaced by @DependsOn("...") ?
//@DependsOn("objectMapperConfigurer")
-@ComponentScan(basePackages = {
- "springfox.documentation.spring.web", // --> CdmSwaggerConfig
- "eu.etaxonomy.cdm.remote.l10n",
- "eu.etaxonomy.cdm.remote.controller",
- "eu.etaxonomy.cdm.remote.service",
- "eu.etaxonomy.cdm.remote.config"
- }
-)
-public class CdmSpringMVCConfig extends WebMvcConfigurationSupport {
+public abstract class CdmSpringMVCConfig extends WebMvcConfigurationSupport {
/**
* turn caching off FOR DEBUGING ONLY !!!!
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2016 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.remote.config;
+
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import org.springframework.context.annotation.Profile;
+
+/**
+ * @author a.kohlbecker
+ * @date Feb 22, 2016
+ *
+ */
+//@EnableWebMvc // do not add this since we are overriding WebMvcConfigurationSupport directly
+@Profile("default") // see RESERVED_DEFAULT_PROFILE_NAME
+@Configuration
+@Import(value={PreloadedBeans.class}) // can not be replaced by @DependsOn("...") ?
+//@DependsOn("objectMapperConfigurer")
+@ComponentScan(basePackages = {
+ "eu.etaxonomy.cdm.remote.l10n",
+ "eu.etaxonomy.cdm.remote.controller",
+ "eu.etaxonomy.cdm.remote.staticSwagger",
+ "eu.etaxonomy.cdm.remote.service",
+ "eu.etaxonomy.cdm.remote.config"
+ }
+)
+public class CdmSpringMVCConfigDefault extends CdmSpringMVCConfig {
+
+ public CdmSpringMVCConfigDefault() {
+ super();
+ logger.info("====================================");
+ logger.info(" CdmSpringMVCConfiguration: Default");
+ logger.info("====================================");
+ }
+
+}
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2016 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.remote.config;
+
+
+/**
+ * @author a.kohlbecker
+ * @date Feb 22, 2016
+ *
+ */
+public enum SwaggerGroupsConfig {
+
+ LSID_AUTHORITY_SERVICES("LSID authority services"),
+ DATA_EXPORT("Data export"),
+ GENERIC_REST_API("Generic REST API"),
+ WEB_PORTAL_SERVICES("Web Portal Services"),
+ CATALOGUE_SERVICES("Catalogue Services");
+
+ private String groupName;
+
+ SwaggerGroupsConfig(String groupName) {
+ this.groupName = groupName;
+ }
+
+ public String groupName() {
+ return groupName;
+ }
+
+ public static SwaggerGroupsConfig byGroupName(String groupName) {
+ for(SwaggerGroupsConfig group : SwaggerGroupsConfig.values()) {
+ if(group.groupName.equals(groupName)) {
+ return group;
+ }
+ }
+ return null;
+ }
+}
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2016 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.remote.staticSwagger;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.io.IOUtils;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import eu.etaxonomy.cdm.remote.SwaggerGroupsIT;
+import eu.etaxonomy.cdm.remote.config.SwaggerGroupsConfig;
+import eu.etaxonomy.cdm.remote.controller.HttpStatusMessage;
+
+/**
+ * This controller replaces the dynamic swagger api doc endpoint which is
+ * otherwise provided by springfox-swagger2. In contrast to the original controller
+ * this implementation serves static json files which contain the api documentation.
+ * <p>
+ * The static api doc files are created by the integration test class {@link SwaggerGroupsIT}.
+ * <p>
+ * For more details see {@link http://dev.e-taxonomy.eu/trac/wiki/cdmlib-remote-webappConfigurationAndBootstrapping}
+ *
+ * @see {@link SwaggerGroupsIT}
+ * @author a.kohlbecker
+ * @date Feb 22, 2016
+ *
+ */
+
+@Controller
+@RequestMapping(value = {"/v2/api-docs"})
+public class StaticSwaggerApiDoc {
+
+ @RequestMapping(method = RequestMethod.GET)
+ public void group(
+ @RequestParam(value = "group", required = true) String group,
+ HttpServletRequest request,
+ HttpServletResponse response) throws IOException {
+
+ SwaggerGroupsConfig groupConfig = SwaggerGroupsConfig.byGroupName(group);
+ if(groupConfig == null) {
+ HttpStatusMessage.create("Unknown swagger group name.", 400).send(response);
+ }
+ InputStream staticDocStream = getClass().getClassLoader().getResourceAsStream("api-docs-static/" + groupConfig.name());
+ if(staticDocStream == null) {
+ HttpStatusMessage.create("Static swagger api doc file for group '" + group + "' not found.", 500).send(response);
+ } else {
+ response.addHeader("Content-Type", "application/json;charset=utf-8");
+ IOUtils.copy(staticDocStream, response.getOutputStream());
+ staticDocStream.close();
+ }
+ }
+
+}
--- /dev/null
+This folder will contains static swagger api documentation files.
+
+It is initially empty and will filled automatically when the SwaggerGroupsIT integration test is run.
\ No newline at end of file
package eu.etaxonomy.cdm.remote;
import org.apache.log4j.Logger;
-import org.junit.Assert;
-import org.junit.Before;
import org.junit.Test;
-import org.springframework.web.client.RestTemplate;
/**
* @author a.kohlbecker
*
*/
-public class ClassificationIT extends Assert {
+public class ClassificationIT extends WebServiceTestBase {
public static final Logger logger = Logger.getLogger(ClassificationIT.class);
- int port = 9180;
- String baseUri = "";
- RestTemplate template = new RestTemplate();
-
- @Before
- public void setUp() {
- if(System.getProperty("sun.java.command") != null && System.getProperty("sun.java.command").startsWith("org.eclipse.jdt.internal.junit.runner.RemoteTestRunner")){
- port = 8080;
- logger.info(" setUp() : \n" +
- "==================================================================\n" +
- " Eclipse ide detected, expecting cdm remote instance at port 8080 \n" +
- "==================================================================");
- };
- baseUri = String.format("http://localhost:%1$d/", port);
- logger.info("cdm remote instance url: " + baseUri);
- }
-
-
@Test
public void checkInstanceIsOnline(){
- String response = template.getForObject(baseUri + "classification.json", String.class);
+ String response = httpGetJson("classification.json", null);
assertTrue(response.contains("My Classification"));
}
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2014 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.remote;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.log4j.Logger;
+import org.junit.Test;
+
+import eu.etaxonomy.cdm.remote.config.SwaggerGroupsConfig;
+
+/**
+ * @author a.kohlbecker
+ * @date Mar 3, 2014
+ *
+ */
+
+public class SwaggerGroupsIT extends WebServiceTestBase {
+
+ public static final Logger logger = Logger.getLogger(SwaggerGroupsIT.class);
+
+ String swagger2Endpoint= "/v2/api-docs";
+
+ @Test
+ public void fetchSwaggerGroups(){
+
+ String staticApiDocFolder = "./target/classes/api-docs-static/";
+
+ staticApiDocFolder.replace("/", File.separator);
+
+
+ for(SwaggerGroupsConfig group : SwaggerGroupsConfig.values()) {
+ logger.info(group.groupName());
+ String response = httpGetJson(swagger2Endpoint, "group=" + group.groupName());
+ try {
+ FileUtils.write(new File(staticApiDocFolder + group.name()), response);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ File pwd = new File("pom.xml");
+
+
+ System.err.println(pwd.getAbsolutePath());
+ }
+
+}
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2016 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.remote;
+
+import org.apache.log4j.Logger;
+import org.junit.Assert;
+import org.junit.Before;
+import org.springframework.web.client.RestTemplate;
+
+
+/**
+ * @author a.kohlbecker
+ * @date Feb 22, 2016
+ *
+ */
+public class WebServiceTestBase extends Assert {
+
+ public static final Logger logger = Logger.getLogger(WebServiceTestBase.class);
+
+
+ private int port = 9180;
+ private String baseUri = "";
+
+ RestTemplate template = new RestTemplate();
+
+ @Before
+ public void setUp() {
+ if(System.getProperty("sun.java.command") != null && System.getProperty("sun.java.command").startsWith("org.eclipse.jdt.internal.junit.runner.RemoteTestRunner")){
+ port = 8080;
+ logger.info(" setUp() : \n" +
+ "==================================================================\n" +
+ " Eclipse ide detected, expecting cdm remote instance at port 8080 \n" +
+ "==================================================================");
+ };
+ baseUri = String.format("http://localhost:%1$d", port);
+ logger.info("cdm remote instance url: " + baseUri);
+ }
+
+ public String getBaseUri() {
+ return baseUri;
+ }
+
+ public String httpGetJson(String endPoint, String query) {
+ StringBuilder uri = new StringBuilder(baseUri);
+ if(endPoint != null) {
+ uri.append(endPoint);
+ }
+ if(query != null) {
+ uri.append("?").append(query);
+ }
+ logger.debug("httpGetJson: " + uri.toString());
+ return template.getForObject(uri.toString(), String.class);
+ }
+
+}
--- /dev/null
+// $Id$
+/**
+ * Copyright (C) 2016 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.cdm.remote.config;
+
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import org.springframework.context.annotation.Profile;
+
+/**
+ * Activate this profile by setting the
+ * <code>spring.profiles.active=swagger</code> either as system property as the
+ * web application argument
+ *
+ * @author a.kohlbecker
+ * @date Feb 22, 2016
+ *
+ */
+@Profile("swagger")
+// @EnableWebMvc // do not add this since we are overriding
+// WebMvcConfigurationSupport directly
+@Configuration
+@Import(value = { PreloadedBeans.class })
+// can not be replaced by @DependsOn("...") ?
+// @DependsOn("objectMapperConfigurer")
+@ComponentScan(basePackages = {
+ "springfox.documentation.spring.web", // --> CdmSwaggerConfig
+ "eu.etaxonomy.cdm.remote.l10n", "eu.etaxonomy.cdm.remote.controller", "eu.etaxonomy.cdm.remote.service",
+ "eu.etaxonomy.cdm.remote.config" })
+public class CdmSpringMVCConfigWithSwagger extends CdmSpringMVCConfig {
+
+ public CdmSpringMVCConfigWithSwagger() {
+ super();
+ logger.info("====================================");
+ logger.info(" CdmSpringMVCConfiguration: Swagger");
+ logger.info("====================================");
+ }
+
+}
import org.apache.log4j.Logger;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
import org.springframework.core.type.filter.AnnotationTypeFilter;
import springfox.documentation.service.ApiInfo;
*
*
*/
+@Profile("swagger")
@EnableSwagger2
@Configuration
public class CdmSwaggerConfig {
- private static final String LSID_AUTHORITY_SERVICES = "LSID authority services";
-
- private static final String DATA_EXPORT = "Data export";
-
- private static final String GENERIC_REST_API = "Generic REST API";
-
- private static final String WEB_PORTAL_SERVICES = "Web Portal Services";
-
- private static final String CATALOGUE_SERVICES = "Catalogue Services";
-
public static final Logger logger = Logger.getLogger(CdmSwaggerConfig.class);
Collection<Class<? extends Object>> allCdmTypes = null;
logger.debug("swaggerSpringMvcPlugin");
configureModelConverters();
return new Docket(DocumentationType.SWAGGER_2)
- .groupName(GENERIC_REST_API)
+ .groupName(SwaggerGroupsConfig.GENERIC_REST_API.groupName())
.select()
.paths(not(
or(
)
)
.build()
- .apiInfo(apiInfo(GENERIC_REST_API, ""
+ .apiInfo(apiInfo(SwaggerGroupsConfig.GENERIC_REST_API.groupName(), ""
+ "<p>The CDM REST API is a RESTful interface to resources stored in the CDM."
+ " The RESTful architecture allows accessing the various resources like Taxa, "
+ "Names, References, Media, etc by stable URIs. Due to security constraints "
logger.debug("swaggerSpringMvcPlugin");
configureModelConverters();
return new Docket(DocumentationType.SWAGGER_2)
- .groupName(WEB_PORTAL_SERVICES)
+ .groupName(SwaggerGroupsConfig.WEB_PORTAL_SERVICES.groupName())
.select()
.paths(regex("/portal/.*"))
.build()
- .apiInfo(apiInfo(WEB_PORTAL_SERVICES, "<p>The Portal Service is a specialization to the "
+ .apiInfo(apiInfo(SwaggerGroupsConfig.WEB_PORTAL_SERVICES.groupName(), "<p>The Portal Service is a specialization to the "
+ "<a href=\"?group=Generic+REST+API\">Generic REST API</a> as needed by CDM Dataportal "
+ " that adds some fields like localized representations to the pure CDM entities. Another important difference "
+ " is the initialization depth of the CDM entities. The Portal Service enpoints provide far bigger parts of the "
public Docket swaggerPluginNameCatalogue(){
configureModelConverters();
return new Docket(DocumentationType.SWAGGER_2)
- .groupName(CATALOGUE_SERVICES)
+ .groupName(SwaggerGroupsConfig.CATALOGUE_SERVICES.groupName())
.select()
.paths(or(regex("/name_catalogue.*"),regex("/occurrence_catalogue.*")))
.build()
.apiInfo(apiInfo(
- CATALOGUE_SERVICES,
+ SwaggerGroupsConfig.CATALOGUE_SERVICES.groupName(),
"<p>These web services are optimized for using names taxonomic information and occurence data in workflow environments "
+ " but are suitabale for all applicatoins in which fast response times are crucial."
+ " Additional detailed documentation of these services can also be found at:</p>"
logger.debug("swaggerSpringMvcPlugin");
configureModelConverters();
return new Docket(DocumentationType.SWAGGER_2)
- .groupName(LSID_AUTHORITY_SERVICES)
+ .groupName(SwaggerGroupsConfig.LSID_AUTHORITY_SERVICES.groupName())
.select()
.paths(regex("/authority/.*"))
.build()
- .apiInfo(apiInfo(LSID_AUTHORITY_SERVICES, ""))
+ .apiInfo(apiInfo(SwaggerGroupsConfig.LSID_AUTHORITY_SERVICES.groupName(), ""))
.ignoredParameterTypes(allCdmTpyes());
}
logger.debug("swaggerSpringMvcPlugin");
configureModelConverters();
return new Docket(DocumentationType.SWAGGER_2)
- .groupName(DATA_EXPORT)
+ .groupName(SwaggerGroupsConfig.DATA_EXPORT.groupName())
.select()
.paths(or(regex("/csv/.*"), regex("/checklist.*")))
.build()
- .apiInfo(apiInfo(DATA_EXPORT, ""))
+ .apiInfo(apiInfo(SwaggerGroupsConfig.DATA_EXPORT.groupName(), ""))
.ignoredParameterTypes(allCdmTpyes());
}
# This overcomes the proxy narrow log of hibernate\r
log4j.logger.org.hibernate.engine.internal.StatefulPersistenceContext=ERROR\r
\r
+# supress HHH90000003\r
+log4j.logger.org.hibernate.orm.deprecation=ERROR\r
+\r
log4j.logger.com.mchange.v2.c3p0=WARN\r
+\r
+\r