mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
added enunciate for webservice documentation
This commit is contained in:
@@ -219,6 +219,12 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.codehaus.enunciate</groupId>
|
||||
<artifactId>enunciate-jersey-rt</artifactId>
|
||||
<version>${enunciate.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- test scope -->
|
||||
|
||||
<dependency>
|
||||
@@ -324,6 +330,7 @@
|
||||
|
||||
<properties>
|
||||
<environment.profile>default</environment.profile>
|
||||
<enunciate.version>1.24</enunciate.version>
|
||||
<aether.version>1.13</aether.version>
|
||||
<wagon.version>1.0</wagon.version>
|
||||
<maven.version>3.0.3</maven.version>
|
||||
@@ -452,6 +459,52 @@
|
||||
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>doc</id>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.enunciate</groupId>
|
||||
<artifactId>maven-enunciate-plugin</artifactId>
|
||||
<version>${enunciate.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>docs</goal>
|
||||
</goals>
|
||||
<phase>compile</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<includes>
|
||||
<param>sonia.scm.api.rest.resources.AuthenticationResource</param>
|
||||
<param>sonia.scm.api.rest.resources.ChangePasswordResource</param>
|
||||
<!--
|
||||
<param>sonia.scm.api.rest.resources.ConfigurationResource</param>
|
||||
-->
|
||||
<param>sonia.scm.api.rest.resources.GroupResource</param>
|
||||
<param>sonia.scm.api.rest.resources.UserResource</param>
|
||||
<param>sonia.scm.api.rest.resources.RepositoryResource</param>
|
||||
<param>sonia.scm.api.rest.resources.PluginResource</param>
|
||||
<param>sonia.scm.api.rest.resources.SearchResource</param>
|
||||
</includes>
|
||||
<docsDir>${project.build.directory}/docs</docsDir>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.enunciate</groupId>
|
||||
<artifactId>enunciate-jersey</artifactId>
|
||||
<version>${enunciate.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
||||
25
scm-webapp/src/main/doc/enunciate.xml
Normal file
25
scm-webapp/src/main/doc/enunciate.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Document : enunciate.xml
|
||||
Created on : October 2, 2011, 12:02 PM
|
||||
Author : sdorra
|
||||
Description:
|
||||
Purpose of the document follows.
|
||||
-->
|
||||
<!-- Enunciate configuration -->
|
||||
<enunciate label="full" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.24.xsd">
|
||||
|
||||
<modules>
|
||||
|
||||
<jersey resourceProviderFactory="com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory">
|
||||
<init-param name="com.sun.jersey.api.json.POJOMappingFeature" value="true" />
|
||||
<init-param name="com.sun.jersey.config.feature.Redirect" value="true" />
|
||||
<init-param name="com.sun.jersey.config.property.resourceConfigClass" value="sonia.scm.api.rest.UriExtensionsConfig" />
|
||||
<init-param name="com.sun.jersey.config.property.packages" value="sonia.scm.api.rest">
|
||||
</jersey>
|
||||
|
||||
</modules>
|
||||
|
||||
</enunciate>
|
||||
@@ -39,6 +39,8 @@ import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
import org.codehaus.enunciate.modules.jersey.SpringManagedLifecycle;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -72,6 +74,7 @@ import javax.ws.rs.core.Response;
|
||||
*/
|
||||
@Singleton
|
||||
@Path("authentication")
|
||||
@SpringManagedLifecycle
|
||||
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
|
||||
public class AuthenticationResource
|
||||
{
|
||||
|
||||
@@ -38,6 +38,8 @@ package sonia.scm.api.rest.resources;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
|
||||
import org.codehaus.enunciate.modules.jersey.SpringManagedLifecycle;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -66,6 +68,7 @@ import javax.ws.rs.core.Response;
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
@SpringManagedLifecycle
|
||||
@Path("action/change-password")
|
||||
public class ChangePasswordResource
|
||||
{
|
||||
|
||||
@@ -39,6 +39,8 @@ import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
import org.codehaus.enunciate.modules.jersey.SpringManagedLifecycle;
|
||||
|
||||
import sonia.scm.config.ScmConfiguration;
|
||||
import sonia.scm.util.ScmConfigurationUtil;
|
||||
import sonia.scm.util.SecurityUtil;
|
||||
@@ -62,6 +64,7 @@ import javax.ws.rs.core.UriInfo;
|
||||
*/
|
||||
@Singleton
|
||||
@Path("config")
|
||||
@SpringManagedLifecycle
|
||||
public class ConfigurationResource
|
||||
{
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
import org.codehaus.enunciate.modules.jersey.SpringManagedLifecycle;
|
||||
|
||||
import sonia.scm.group.Group;
|
||||
import sonia.scm.group.GroupException;
|
||||
import sonia.scm.group.GroupManager;
|
||||
@@ -60,6 +62,7 @@ import javax.ws.rs.core.Response;
|
||||
*/
|
||||
@Path("groups")
|
||||
@Singleton
|
||||
@SpringManagedLifecycle
|
||||
public class GroupResource
|
||||
extends AbstractManagerResource<Group, GroupException>
|
||||
{
|
||||
|
||||
@@ -38,6 +38,8 @@ package sonia.scm.api.rest.resources;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
import org.codehaus.enunciate.modules.jersey.SpringManagedLifecycle;
|
||||
|
||||
import sonia.scm.plugin.DefaultPluginManager;
|
||||
import sonia.scm.plugin.OverviewPluginFilter;
|
||||
import sonia.scm.plugin.PluginInformation;
|
||||
@@ -65,6 +67,7 @@ import javax.ws.rs.core.Response;
|
||||
*/
|
||||
@Singleton
|
||||
@Path("plugins")
|
||||
@SpringManagedLifecycle
|
||||
public class PluginResource
|
||||
{
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
import org.codehaus.enunciate.modules.jersey.SpringManagedLifecycle;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -88,6 +90,7 @@ import javax.ws.rs.core.StreamingOutput;
|
||||
*/
|
||||
@Singleton
|
||||
@Path("repositories")
|
||||
@SpringManagedLifecycle
|
||||
public class RepositoryResource
|
||||
extends AbstractManagerResource<Repository, RepositoryException>
|
||||
{
|
||||
|
||||
@@ -40,6 +40,8 @@ import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
import org.codehaus.enunciate.modules.jersey.SpringManagedLifecycle;
|
||||
|
||||
import sonia.scm.HandlerEvent;
|
||||
import sonia.scm.cache.Cache;
|
||||
import sonia.scm.cache.CacheManager;
|
||||
@@ -68,6 +70,7 @@ import javax.ws.rs.core.MediaType;
|
||||
*/
|
||||
@Singleton
|
||||
@Path("search")
|
||||
@SpringManagedLifecycle
|
||||
public class SearchResource implements UserListener, GroupListener
|
||||
{
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
import org.codehaus.enunciate.modules.jersey.SpringManagedLifecycle;
|
||||
|
||||
import sonia.scm.security.EncryptionHandler;
|
||||
import sonia.scm.user.User;
|
||||
import sonia.scm.user.UserException;
|
||||
@@ -63,6 +65,7 @@ import javax.ws.rs.core.Response;
|
||||
*/
|
||||
@Path("users")
|
||||
@Singleton
|
||||
@SpringManagedLifecycle
|
||||
public class UserResource extends AbstractManagerResource<User, UserException>
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user