syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [1/2] syncope git commit: Adding support for CXF-6695
Date Mon, 30 Nov 2015 15:20:19 GMT
Repository: syncope
Updated Branches:
  refs/heads/master b3d131dd9 -> 234819b6e


Adding support for CXF-6695


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/83a864f2
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/83a864f2
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/83a864f2

Branch: refs/heads/master
Commit: 83a864f2691b2a8a0699250e8e52cd2fe02539bc
Parents: b3d131d
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Mon Nov 30 16:18:58 2015 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Mon Nov 30 16:18:58 2015 +0100

----------------------------------------------------------------------
 .../common/rest/api/beans/TaskQuery.java        |  2 ++
 .../common/rest/api/service/TaskService.java    |  2 +-
 core/rest-cxf/pom.xml                           |  6 +++-
 ext/swagger-ui/pom.xml                          | 37 ++++++++++++++++++++
 pom.xml                                         |  8 ++++-
 5 files changed, 52 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/83a864f2/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/TaskQuery.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/TaskQuery.java
b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/TaskQuery.java
index 523da53..145384e 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/TaskQuery.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/TaskQuery.java
@@ -19,6 +19,7 @@
 package org.apache.syncope.common.rest.api.beans;
 
 import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
 import javax.ws.rs.MatrixParam;
 import javax.ws.rs.QueryParam;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
@@ -78,6 +79,7 @@ public class TaskQuery extends AbstractQuery {
         return type;
     }
 
+    @NotNull
     @MatrixParam("type")
     public void setType(final TaskType type) {
         this.type = type;

http://git-wip-us.apache.org/repos/asf/syncope/blob/83a864f2/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
index 0f2b8dd..5337d44 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
@@ -156,7 +156,7 @@ public interface TaskService extends JAXRSService {
     @GET
     @Path("jobs")
     @Produces({ JAXRSService.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<TaskExecTO> listJobs(@MatrixParam("type") JobStatusType type);
+    List<TaskExecTO> listJobs(@NotNull @MatrixParam("type") JobStatusType type);
 
     /**
      * Executes an action on an existing task's job.

http://git-wip-us.apache.org/repos/asf/syncope/blob/83a864f2/core/rest-cxf/pom.xml
----------------------------------------------------------------------
diff --git a/core/rest-cxf/pom.xml b/core/rest-cxf/pom.xml
index 808c7dd..5985ffc 100644
--- a/core/rest-cxf/pom.xml
+++ b/core/rest-cxf/pom.xml
@@ -110,7 +110,11 @@ under the License.
       <groupId>io.swagger</groupId>
       <artifactId>swagger-jaxrs</artifactId>
     </dependency>
-        
+    <dependency>
+      <groupId>io.swagger</groupId>
+      <artifactId>swagger-hibernate-validations</artifactId>
+    </dependency>
+
     <dependency>
       <groupId>org.apache.syncope.core</groupId>
       <artifactId>syncope-core-logic</artifactId>

http://git-wip-us.apache.org/repos/asf/syncope/blob/83a864f2/ext/swagger-ui/pom.xml
----------------------------------------------------------------------
diff --git a/ext/swagger-ui/pom.xml b/ext/swagger-ui/pom.xml
index 0b6299b..a625099 100644
--- a/ext/swagger-ui/pom.xml
+++ b/ext/swagger-ui/pom.xml
@@ -83,6 +83,7 @@ under the License.
                   <directory>${project.build.directory}/swagger-ui/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}</directory>
                   <excludes>
                     <exclude>index.html</exclude>
+                    <exclude>swagger-ui.min.js</exclude>
                   </excludes>
                 </resource>
               </resources>
@@ -93,6 +94,42 @@ under the License.
     
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <inherited>true</inherited>
+        <executions>
+          <execution>
+            <id>addMatrixParamSupport</id>
+            <phase>process-resources</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <replace file="${project.build.directory}/swagger-ui/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}/swagger-ui.js"
+                         token="return url + requestUrl + querystring;"
+                         value="&#10;var matrixstring = '';&#10;
+  for (var i = 0; i &lt; this.parameters.length; i++) {&#10;
+    var param = this.parameters[i];&#10;
+&#10;
+    if (param.in === 'matrix') {&#10;
+      matrixstring += ';' + this.encodeQueryParam(param.name) + '=' + this.encodeQueryParam(args[param.name]);&#10;
+    }&#10;
+  }&#10;
+&#10;
+  var url = this.scheme + '://' + this.host;&#10;
+&#10;
+  if (this.basePath !== '/') {&#10;
+    url += this.basePath;&#10;
+  }&#10;
+  return url + requestUrl + matrixstring + querystring;"/>
+              </target>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+          
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
       </plugin>
     </plugins>

http://git-wip-us.apache.org/repos/asf/syncope/blob/83a864f2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 10f35ea..ab1ed51 100644
--- a/pom.xml
+++ b/pom.xml
@@ -371,6 +371,7 @@ under the License.
     <log.directory>${project.build.directory}/log</log.directory>
     <activiti-modeler.directory>${project.build.directory}/activiti-modeler</activiti-modeler.directory>
 
+    <swagger-core.version>1.5.4</swagger-core.version>    
     <swagger-ui.version>2.1.3</swagger-ui.version>    
     <jquery.version>2.1.4</jquery.version>
     <jquery-ui.version>1.11.4</jquery-ui.version>
@@ -519,7 +520,7 @@ under the License.
       <dependency>
         <groupId>io.swagger</groupId>
         <artifactId>swagger-jaxrs</artifactId>
-        <version>1.5.4</version>
+        <version>${swagger-core.version}</version>
         <exclusions>
           <exclusion>
             <groupId>javax.ws.rs</groupId>
@@ -527,6 +528,11 @@ under the License.
           </exclusion>
         </exclusions>
       </dependency>
+      <dependency>
+        <groupId>io.swagger</groupId>
+        <artifactId>swagger-hibernate-validations</artifactId>
+        <version>${swagger-core.version}</version>
+      </dependency>
       <!-- /CXF -->
       
       <!-- Camel -->


Mime
View raw message