From: Olivier Lamy Date: Thu, 4 Oct 2012 22:49:11 +0000 (+0000) Subject: [MRM-1683] Automatic generation of REST Api documentation. X-Git-Tag: archiva-1.4-M4~832 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ded769cba91cd39284ee296eae35e8459158f1c9;p=archiva.git [MRM-1683] Automatic generation of REST Api documentation. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1394312 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml index e0956c400..199485f35 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml @@ -28,6 +28,11 @@ bundle Archiva Web :: REST support :: Api + + 1.26.1 + false + + org.apache.archiva @@ -94,6 +99,21 @@ + + + org.codehaus.enunciate + enunciate-core + provided + ${enunciate.version} + + + + org.codehaus.jackson + jackson-xc + ${jacksonVersion} + provided + + @@ -136,6 +156,34 @@ + + + + org.codehaus.enunciate + maven-enunciate-plugin + ${enunciate.version} + + + process-classes + + docs + + + + + ${project.build.outputDirectory}/docs + src/enunciate/enunciate.xml + ${enunciate.debug} + + + + org.codehaus.enunciate + enunciate-docs + ${enunciate.version} + + + + diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/enunciate/enunciate.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/enunciate/enunciate.xml new file mode 100644 index 000000000..d0d195e7e --- /dev/null +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/enunciate/enunciate.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Dependency.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Dependency.java index 2064ad27f..c02b73454 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Dependency.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Dependency.java @@ -38,6 +38,12 @@ public class Dependency private String scope; + public Dependency() + { + // no op + } + + public Dependency( String groupId, String artifactId, String version, String classifier, String type, String scope ) { this.groupId = groupId; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java index 5d518009a..735ea9279 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java @@ -58,6 +58,10 @@ public interface BrowseService @GET @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @RedbackAuthorization (noPermission = true, noRestriction = true) + /** + * @param groupId groupId to browse + * @param repositoryId optionnal (repository to browse if null all available user repositories are used) + */ BrowseResult browseGroupId( @PathParam ("groupId") String groupId, @QueryParam ("repositoryId") String repositoryId ) throws ArchivaRestServiceException; diff --git a/archiva-modules/archiva-web/archiva-rest/pom.xml b/archiva-modules/archiva-web/archiva-rest/pom.xml index 71de4b4d7..347cc45a2 100644 --- a/archiva-modules/archiva-web/archiva-rest/pom.xml +++ b/archiva-modules/archiva-web/archiva-rest/pom.xml @@ -30,5 +30,6 @@ archiva-rest-api archiva-rest-services + archiva-rest-documentor \ No newline at end of file