You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2018/02/20 10:09:52 UTC

[1/4] syncope git commit: [SYNCOPE-1262] Prefer to properly return void but add @ApiResponse for 204

Repository: syncope
Updated Branches:
  refs/heads/2_0_X 60d5163a0 -> c646e35f0
  refs/heads/master 711d0c02c -> e725c72b3


http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
index e3c9992..2b76dfc 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
@@ -72,27 +72,23 @@ public class ResourceServiceImpl extends AbstractServiceImpl implements Resource
     }
 
     @Override
-    public Response update(final ResourceTO resourceTO) {
+    public void update(final ResourceTO resourceTO) {
         logic.update(resourceTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response setLatestSyncToken(final String key, final String anyTypeKey) {
+    public void setLatestSyncToken(final String key, final String anyTypeKey) {
         logic.setLatestSyncToken(key, anyTypeKey);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response removeSyncToken(final String key, final String anyTypeKey) {
+    public void removeSyncToken(final String key, final String anyTypeKey) {
         logic.removeSyncToken(key, anyTypeKey);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -142,9 +138,8 @@ public class ResourceServiceImpl extends AbstractServiceImpl implements Resource
     }
 
     @Override
-    public Response check(final ResourceTO resourceTO) {
+    public void check(final ResourceTO resourceTO) {
         logic.check(resourceTO);
-        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java
index 3369387..a6a3f2e 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java
@@ -62,15 +62,13 @@ public class RoleServiceImpl extends AbstractServiceImpl implements RoleService
     }
 
     @Override
-    public Response update(final RoleTO roleTO) {
+    public void update(final RoleTO roleTO) {
         logic.update(roleTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -89,10 +87,9 @@ public class RoleServiceImpl extends AbstractServiceImpl implements RoleService
     }
 
     @Override
-    public Response setConsoleLayoutInfo(final String key, final InputStream consoleLayoutIn) {
+    public void setConsoleLayoutInfo(final String key, final InputStream consoleLayoutIn) {
         try {
             logic.setConsoleLayoutInfo(key, IOUtils.toString(consoleLayoutIn, StandardCharsets.UTF_8.name()));
-            return Response.noContent().build();
         } catch (final IOException e) {
             LOG.error("While setting console layout info for role {}", key, e);
             throw new InternalServerErrorException("Could not read entity", e);
@@ -100,9 +97,8 @@ public class RoleServiceImpl extends AbstractServiceImpl implements RoleService
     }
 
     @Override
-    public Response removeConsoleLayoutInfo(final String key) {
+    public void removeConsoleLayoutInfo(final String key) {
         logic.setConsoleLayoutInfo(key, null);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
index f650839..5c74e41 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
@@ -47,9 +47,8 @@ public class SchemaServiceImpl extends AbstractServiceImpl implements SchemaServ
     }
 
     @Override
-    public Response delete(final SchemaType schemaType, final String key) {
+    public void delete(final SchemaType schemaType, final String key) {
         logic.delete(schemaType, key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -63,8 +62,7 @@ public class SchemaServiceImpl extends AbstractServiceImpl implements SchemaServ
     }
 
     @Override
-    public Response update(final SchemaType schemaType, final SchemaTO schemaTO) {
+    public void update(final SchemaType schemaType, final SchemaTO schemaTO) {
         logic.update(schemaType, schemaTO);
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java
index fbfd00a..5dca503 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java
@@ -55,15 +55,13 @@ public class SecurityQuestionServiceImpl extends AbstractServiceImpl implements
     }
 
     @Override
-    public Response update(final SecurityQuestionTO securityQuestionTO) {
+    public void update(final SecurityQuestionTO securityQuestionTO) {
         logic.update(securityQuestionTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
index cd24751..6c3a10b 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
@@ -64,9 +64,8 @@ public class TaskServiceImpl extends AbstractExecutableService implements TaskSe
     }
 
     @Override
-    public Response delete(final TaskType type, final String key) {
+    public void delete(final TaskType type, final String key) {
         logic.delete(type, key);
-        return Response.noContent().build();
     }
 
     @SuppressWarnings("unchecked")
@@ -91,9 +90,8 @@ public class TaskServiceImpl extends AbstractExecutableService implements TaskSe
     }
 
     @Override
-    public Response update(final TaskType type, final SchedTaskTO taskTO) {
+    public void update(final TaskType type, final SchedTaskTO taskTO) {
         logic.updateSchedTask(type, taskTO);
-        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java
index 92b0144..82d9cbc 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java
@@ -96,7 +96,7 @@ public class UserSelfServiceImpl extends AbstractServiceImpl implements UserSelf
     }
 
     @Override
-    public Response requestPasswordReset(final String username, final String securityAnswer) {
+    public void requestPasswordReset(final String username, final String securityAnswer) {
         if (!syncopeLogic.isPwdResetAllowed()) {
             SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.DelegatedAdministration);
             sce.getElements().add("Password reset forbidden by configuration");
@@ -104,11 +104,10 @@ public class UserSelfServiceImpl extends AbstractServiceImpl implements UserSelf
         }
 
         logic.requestPasswordReset(username, securityAnswer);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response confirmPasswordReset(final String token, final String password) {
+    public void confirmPasswordReset(final String token, final String password) {
         if (!syncopeLogic.isPwdResetAllowed()) {
             SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.DelegatedAdministration);
             sce.getElements().add("Password reset forbidden by configuration");
@@ -116,7 +115,6 @@ public class UserSelfServiceImpl extends AbstractServiceImpl implements UserSelf
         }
 
         logic.confirmPasswordReset(token, password);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
index 9833fcf..2642853 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
@@ -80,20 +80,18 @@ public class WorkflowServiceImpl extends AbstractServiceImpl implements Workflow
     }
 
     @Override
-    public Response set(final String anyType, final String key, final String definition) {
+    public void set(final String anyType, final String key, final String definition) {
         WorkflowDefinitionFormat format =
                 messageContext.getHttpHeaders().getMediaType().equals(MediaType.APPLICATION_JSON_TYPE)
                 ? WorkflowDefinitionFormat.JSON
                 : WorkflowDefinitionFormat.XML;
 
         logic.importDefinition(anyType, key, format, definition);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String anyType, final String key) {
+    public void delete(final String anyType, final String key) {
         logic.delete(anyType, key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
----------------------------------------------------------------------
diff --git a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
index 3e0913a..1da1579 100644
--- a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
+++ b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
@@ -19,6 +19,8 @@
 package org.apache.syncope.common.rest.api.service;
 
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 import io.swagger.annotations.Authorization;
 import java.util.List;
 import javax.validation.constraints.NotNull;
@@ -30,7 +32,6 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.CamelMetrics;
 import org.apache.syncope.common.lib.to.CamelRouteTO;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
@@ -74,23 +75,24 @@ public interface CamelRouteService extends JAXRSService {
      *
      * @param anyTypeKind any type kind
      * @param route to be updated
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{anyTypeKind}/{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull @PathParam("anyTypeKind") AnyTypeKind anyTypeKind, @NotNull CamelRouteTO route);
+    void update(@NotNull @PathParam("anyTypeKind") AnyTypeKind anyTypeKind, @NotNull CamelRouteTO route);
 
     /**
      * Restart the underlying Apache Camel context.
-     *
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @POST
     @Path("restartContext")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response restartContext();
+    void restartContext();
 
     /**
      * Provides Camel metrics.

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
----------------------------------------------------------------------
diff --git a/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java b/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
index eb1db19..57b9242 100644
--- a/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
+++ b/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.List;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.CamelMetrics;
 import org.apache.syncope.common.lib.to.CamelRouteTO;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
@@ -45,15 +44,13 @@ public class CamelRouteServiceImpl extends AbstractServiceImpl implements CamelR
     }
 
     @Override
-    public Response update(final AnyTypeKind anyTypeKind, final CamelRouteTO route) {
+    public void update(final AnyTypeKind anyTypeKind, final CamelRouteTO route) {
         logic.update(anyTypeKind, route);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response restartContext() {
+    public void restartContext() {
         logic.restartContext();
-        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
index a3c9bd5..fcf342a 100644
--- a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
+++ b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
@@ -19,6 +19,8 @@
 package org.apache.syncope.common.rest.api.service;
 
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 import io.swagger.annotations.Authorization;
 import java.io.InputStream;
 import java.util.List;
@@ -90,22 +92,24 @@ public interface SAML2IdPService extends JAXRSService {
      * Updates the SAML 2.0 Identity Provider with matching entityID.
      *
      * @param saml2IdpTO idp configuration to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull SAML2IdPTO saml2IdpTO);
+    void update(@NotNull SAML2IdPTO saml2IdpTO);
 
     /**
      * Deletes the SAML 2.0 Identity Provider with matching entityID.
      *
      * @param key SAML 2.0 Identity Provider's entityID
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@PathParam("key") String key);
+    void delete(@PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
index e67cc0b..4d894d0 100644
--- a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
+++ b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
@@ -19,6 +19,8 @@
 package org.apache.syncope.common.rest.api.service;
 
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 import io.swagger.annotations.Authorization;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
@@ -93,11 +95,12 @@ public interface SAML2SPService extends JAXRSService {
      * Validates the received SAML 2.0 logout response.
      *
      * @param response SAML response and relay state
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @POST
     @Path("logoutResponse")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response validateLogoutResponse(SAML2ReceivedResponseTO response);
+    void validateLogoutResponse(SAML2ReceivedResponseTO response);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java
index bd2f5f9..ebda30d 100644
--- a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java
+++ b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java
@@ -61,15 +61,13 @@ public class SAML2IdPServiceImpl extends AbstractServiceImpl implements SAML2IdP
     }
 
     @Override
-    public Response update(final SAML2IdPTO saml2IdpTO) {
+    public void update(final SAML2IdPTO saml2IdpTO) {
         logic.update(saml2IdpTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java
index b48b3aa..026f141 100644
--- a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java
+++ b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java
@@ -55,9 +55,7 @@ public class SAML2SPServiceImpl extends AbstractServiceImpl implements SAML2SPSe
     }
 
     @Override
-    public SAML2RequestTO createLoginRequest(
-            final String spEntityID, final String idpEntityID) {
-
+    public SAML2RequestTO createLoginRequest(final String spEntityID, final String idpEntityID) {
         return logic.createLoginRequest(StringUtils.appendIfMissing(spEntityID, "/"), idpEntityID);
     }
 
@@ -74,9 +72,8 @@ public class SAML2SPServiceImpl extends AbstractServiceImpl implements SAML2SPSe
     }
 
     @Override
-    public Response validateLogoutResponse(final SAML2ReceivedResponseTO response) {
+    public void validateLogoutResponse(final SAML2ReceivedResponseTO response) {
         logic.validateLogoutResponse(getJWTToken(), response);
-        return Response.noContent().build();
     }
 
     private String getJWTToken() {

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java b/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
index 3a98255..ced40ad 100644
--- a/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
+++ b/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
@@ -19,6 +19,8 @@
 package org.apache.syncope.common.rest.api.service;
 
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 import io.swagger.annotations.Authorization;
 import javax.validation.constraints.NotNull;
 import javax.ws.rs.Consumes;
@@ -27,7 +29,6 @@ import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.scim.SCIMConf;
 
 /**
@@ -52,10 +53,11 @@ public interface SCIMConfService extends JAXRSService {
      * Sets SCIM configuration.
      *
      * @param conf SCIM configuration
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response set(@NotNull SCIMConf conf);
+    void set(@NotNull SCIMConf conf);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java b/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java
index 1d14701..223aca7 100644
--- a/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java
+++ b/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java
@@ -18,7 +18,6 @@
  */
 package org.apache.syncope.core.rest.cxf.service;
 
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.scim.SCIMConf;
 import org.apache.syncope.common.rest.api.service.SCIMConfService;
 import org.apache.syncope.core.logic.scim.SCIMConfManager;
@@ -35,9 +34,8 @@ public class SCIMConfServiceImpl extends AbstractServiceImpl implements SCIMConf
     }
 
     @Override
-    public Response set(final SCIMConf conf) {
+    public void set(final SCIMConf conf) {
         manager.set(conf);
-        return Response.noContent().build();
     }
 
 }


[2/4] syncope git commit: [SYNCOPE-1262] Prefer to properly return void but add @ApiResponse for 204

Posted by il...@apache.org.
[SYNCOPE-1262] Prefer to properly return void but add @ApiResponse for 204


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

Branch: refs/heads/2_0_X
Commit: c646e35f0632447e45f8ea5a893bf6275020d1c8
Parents: 60d5163
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Feb 20 10:22:37 2018 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Feb 20 10:22:37 2018 +0100

----------------------------------------------------------------------
 .../rest/api/service/AccessTokenService.java    | 11 +++++----
 .../common/rest/api/service/AnyService.java     |  5 ++--
 .../rest/api/service/AnyTypeClassService.java   | 10 ++++----
 .../common/rest/api/service/AnyTypeService.java | 10 ++++----
 .../rest/api/service/ConfigurationService.java  | 12 ++++++----
 .../api/service/ConnectorHistoryService.java    | 13 ++++++----
 .../rest/api/service/ConnectorService.java      | 21 +++++++++-------
 .../common/rest/api/service/DomainService.java  | 10 ++++----
 .../rest/api/service/DynRealmService.java       | 10 ++++----
 .../rest/api/service/ExecutableService.java     | 13 ++++++----
 .../common/rest/api/service/LoggerService.java  | 13 ++++++----
 .../rest/api/service/MailTemplateService.java   | 15 +++++++-----
 .../rest/api/service/NotificationService.java   | 15 +++++++-----
 .../common/rest/api/service/PolicyService.java  | 10 ++++----
 .../api/service/RelationshipTypeService.java    | 10 ++++----
 .../common/rest/api/service/ReportService.java  | 10 ++++----
 .../rest/api/service/ReportTemplateService.java | 15 +++++++-----
 .../api/service/ResourceHistoryService.java     | 13 ++++++----
 .../rest/api/service/ResourceService.java       | 25 ++++++++++++--------
 .../common/rest/api/service/RoleService.java    | 20 +++++++++-------
 .../common/rest/api/service/SchemaService.java  | 10 ++++----
 .../api/service/SecurityQuestionService.java    | 10 ++++----
 .../common/rest/api/service/TaskService.java    | 12 ++++++----
 .../rest/api/service/UserSelfService.java       | 10 ++++----
 .../rest/api/service/WorkflowService.java       | 12 ++++++----
 .../rest/cxf/service/AbstractAnyService.java    |  3 +--
 .../cxf/service/AbstractExecutableService.java  |  7 ++----
 .../cxf/service/AccessTokenServiceImpl.java     |  6 ++---
 .../cxf/service/AnyTypeClassServiceImpl.java    |  6 ++---
 .../rest/cxf/service/AnyTypeServiceImpl.java    |  6 ++---
 .../cxf/service/ConfigurationServiceImpl.java   |  6 ++---
 .../service/ConnectorHistoryServiceImpl.java    |  7 ++----
 .../rest/cxf/service/ConnectorServiceImpl.java  | 12 ++++------
 .../rest/cxf/service/DomainServiceImpl.java     |  6 ++---
 .../rest/cxf/service/DynRealmServiceImpl.java   |  6 ++---
 .../rest/cxf/service/LoggerServiceImpl.java     |  7 ++----
 .../cxf/service/MailTemplateServiceImpl.java    |  9 +++----
 .../cxf/service/NotificationServiceImpl.java    |  9 +++----
 .../rest/cxf/service/PolicyServiceImpl.java     |  6 ++---
 .../service/RelationshipTypeServiceImpl.java    |  6 ++---
 .../rest/cxf/service/ReportServiceImpl.java     |  6 ++---
 .../cxf/service/ReportTemplateServiceImpl.java  |  9 +++----
 .../cxf/service/ResourceHistoryServiceImpl.java |  7 ++----
 .../rest/cxf/service/ResourceServiceImpl.java   | 15 ++++--------
 .../core/rest/cxf/service/RoleServiceImpl.java  | 12 ++++------
 .../rest/cxf/service/SchemaServiceImpl.java     |  6 ++---
 .../service/SecurityQuestionServiceImpl.java    |  6 ++---
 .../core/rest/cxf/service/TaskServiceImpl.java  |  6 ++---
 .../rest/cxf/service/UserSelfServiceImpl.java   |  6 ++---
 .../rest/cxf/service/WorkflowServiceImpl.java   |  6 ++---
 .../rest/api/service/CamelRouteService.java     | 14 ++++++-----
 .../rest/cxf/service/CamelRouteServiceImpl.java |  7 ++----
 .../rest/api/service/SAML2IdPService.java       | 12 ++++++----
 .../common/rest/api/service/SAML2SPService.java |  7 ++++--
 .../rest/cxf/service/SAML2IdPServiceImpl.java   |  6 ++---
 .../rest/cxf/service/SAML2SPServiceImpl.java    |  7 ++----
 .../rest/api/service/SCIMConfService.java       |  8 ++++---
 .../rest/cxf/service/SCIMConfServiceImpl.java   |  4 +---
 58 files changed, 283 insertions(+), 278 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
index e585403..b9a4b76 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
@@ -89,15 +89,15 @@ public interface AccessTokenService extends JAXRSService {
 
     /**
      * Invalidates the access token of the requesting user.
-     *
-     * @return an empty response if operation was successful
      */
     @ApiOperation(value = "", authorizations = {
         @Authorization(value = "Bearer") })
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @POST
     @Path("logout")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response logout();
+    void logout();
 
     /**
      * Returns a paged list of existing access tokens matching the given query.
@@ -117,13 +117,14 @@ public interface AccessTokenService extends JAXRSService {
      * Invalidates the access token matching the provided key.
      *
      * @param key access token key
-     * @return an empty response if operation was successful
      */
     @ApiOperation(value = "", authorizations = {
         @Authorization(value = "BasicAuthentication")
         , @Authorization(value = "Bearer") })
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@PathParam("key") String key);
+    void delete(@PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
index 2a2fb64..44b89f5 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
@@ -129,12 +129,13 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
      * @param key any object key or name
      * @param schemaType schema type
      * @param schema schema
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}/{schemaType}/{schema}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(
+    void delete(
             @NotNull @PathParam("key") String key,
             @NotNull @PathParam("schemaType") SchemaType schemaType,
             @NotNull @PathParam("schema") String schema);

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
index 2480f83..0fa17c4 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
@@ -90,22 +90,24 @@ public interface AnyTypeClassService extends JAXRSService {
      * Updates the anyTypeClass matching the provided key.
      *
      * @param anyTypeClassTO anyTypeClass to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull AnyTypeClassTO anyTypeClassTO);
+    void update(@NotNull AnyTypeClassTO anyTypeClassTO);
 
     /**
      * Deletes the anyTypeClass matching the provided key.
      *
      * @param key anyTypeClass key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
index 482d274..1ded784 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
@@ -89,21 +89,23 @@ public interface AnyTypeService extends JAXRSService {
      * Updates the anyType matching the provided key.
      *
      * @param anyTypeTO anyType to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull AnyTypeTO anyTypeTO);
+    void update(@NotNull AnyTypeTO anyTypeTO);
 
     /**
      * Deletes the anyType matching the provided key.
      *
      * @param key anyType key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
index a338a74..3355575 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
@@ -19,6 +19,8 @@
 package org.apache.syncope.common.rest.api.service;
 
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 import io.swagger.annotations.Authorization;
 import java.util.List;
 import javax.validation.constraints.NotNull;
@@ -75,22 +77,24 @@ public interface ConfigurationService extends JAXRSService {
      * Creates / updates the configuration parameter with the given schema.
      *
      * @param value parameter value
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{schema}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response set(@NotNull AttrTO value);
+    void set(@NotNull AttrTO value);
 
     /**
      * Deletes the configuration parameter with matching schema.
      *
      * @param schema configuration parameter schema
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{schema}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("schema") String schema);
+    void delete(@NotNull @PathParam("schema") String schema);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
index da4447a..bcfa1dc 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
@@ -19,6 +19,8 @@
 package org.apache.syncope.common.rest.api.service;
 
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 import io.swagger.annotations.Authorization;
 import java.util.List;
 import javax.validation.constraints.NotNull;
@@ -29,7 +31,6 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.ConnInstanceHistoryConfTO;
 
 /**
@@ -56,21 +57,23 @@ public interface ConnectorHistoryService extends JAXRSService {
      * Restores the connector configuration history instance matching the provided key.
      *
      * @param key connector configuration history instance key to be restored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @POST
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response restore(@NotNull @PathParam("key") String key);
+    void restore(@NotNull @PathParam("key") String key);
 
     /**
      * Deletes the connector configuration history instance matching the provided key.
      *
      * @param key connector configuration history instance key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
index 1b8d58e..82e1040 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
@@ -141,44 +141,47 @@ public interface ConnectorService extends JAXRSService {
      * Updates the connector instance matching the provided key.
      *
      * @param connInstanceTO connector instance to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull ConnInstanceTO connInstanceTO);
+    void update(@NotNull ConnInstanceTO connInstanceTO);
 
     /**
      * Deletes the connector instance matching the provided key.
      *
      * @param key connector instance key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Checks whether the connection to resource could be established.
      *
      * @param connInstanceTO connector instance to be used for connection check
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @POST
     @Path("check")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response check(@NotNull ConnInstanceTO connInstanceTO);
+    void check(@NotNull ConnInstanceTO connInstanceTO);
 
     /**
      * Reload all connector bundles and instances.
-     *
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @POST
     @Path("reload")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response reload();
+    void reload();
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
index a60ad4b..58a0045 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
@@ -90,22 +90,24 @@ public interface DomainService extends JAXRSService {
      * Updates the domain matching the provided key.
      *
      * @param domainTO domain to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull DomainTO domainTO);
+    void update(@NotNull DomainTO domainTO);
 
     /**
      * Deletes the domain matching the provided key.
      *
      * @param key domain key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
index 8c6b8b1..3bb0cef 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
@@ -90,23 +90,25 @@ public interface DynRealmService extends JAXRSService {
      * Updates the dynamic realm matching the provided key.
      *
      * @param dynDynRealmTO dynamic realm to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull DynRealmTO dynDynRealmTO);
+    void update(@NotNull DynRealmTO dynDynRealmTO);
 
     /**
      * Deletes the dynamic realm matching the provided key.
      *
      * @param key dynamic realm key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
index 22412cc..e7271b2 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
@@ -18,6 +18,8 @@
  */
 package org.apache.syncope.common.rest.api.service;
 
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 import java.util.List;
 import javax.validation.constraints.Min;
 import javax.validation.constraints.NotNull;
@@ -31,7 +33,6 @@ import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.BulkActionResult;
 import org.apache.syncope.common.lib.to.ExecTO;
 import org.apache.syncope.common.lib.to.JobTO;
@@ -69,12 +70,13 @@ public interface ExecutableService extends JAXRSService {
      * Deletes the executable execution matching the provided key.
      *
      * @param executionKey key of executable execution to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("executions/{executionKey}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response deleteExecution(@NotNull @PathParam("executionKey") String executionKey);
+    void deleteExecution(@NotNull @PathParam("executionKey") String executionKey);
 
     /**
      * Deletes the executions belonging matching the given query.
@@ -113,9 +115,10 @@ public interface ExecutableService extends JAXRSService {
      *
      * @param key executable key
      * @param action action to execute
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @POST
     @Path("jobs/{key}")
-    Response actionJob(@NotNull @PathParam("key") String key, @QueryParam("action") JobAction action);
+    void actionJob(@NotNull @PathParam("key") String key, @QueryParam("action") JobAction action);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
index 378d118..77e5b62 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
@@ -19,6 +19,8 @@
 package org.apache.syncope.common.rest.api.service;
 
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 import io.swagger.annotations.Authorization;
 import java.util.List;
 import javax.validation.constraints.NotNull;
@@ -30,7 +32,6 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.log.EventCategoryTO;
 import org.apache.syncope.common.lib.log.LogAppender;
 import org.apache.syncope.common.lib.log.LogStatementTO;
@@ -105,24 +106,26 @@ public interface LoggerService extends JAXRSService {
      *
      * @param type LoggerType to be selected
      * @param logger Logger to be created or updated
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{type}/{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull @PathParam("type") LoggerType type, @NotNull LoggerTO logger);
+    void update(@NotNull @PathParam("type") LoggerType type, @NotNull LoggerTO logger);
 
     /**
      * Deletes the logger with matching name.
      *
      * @param type LoggerType to be selected
      * @param name Logger name to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{type}/{name}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") String name);
+    void delete(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") String name);
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
index ea1dd99..a942001 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
@@ -92,12 +92,13 @@ public interface MailTemplateService extends JAXRSService {
      * Deletes the mail template matching the given key.
      *
      * @param key key for mail template to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Gets the template for the given key and format, if available.
@@ -118,12 +119,13 @@ public interface MailTemplateService extends JAXRSService {
      * @param key mail template
      * @param format template format
      * @param templateIn template to be set
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}/{format}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response setFormat(
+    void setFormat(
             @NotNull @PathParam("key") String key,
             @NotNull @PathParam("format") MailTemplateFormat format,
             InputStream templateIn);
@@ -133,12 +135,13 @@ public interface MailTemplateService extends JAXRSService {
      *
      * @param key mail template
      * @param format template format
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}/{format}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response removeFormat(
+    void removeFormat(
             @NotNull @PathParam("key") String key,
             @NotNull @PathParam("format") MailTemplateFormat format);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
index 3d23622..5015f7e 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
@@ -94,24 +94,26 @@ public interface NotificationService extends JAXRSService {
      * Updates the notification matching the given key.
      *
      * @param notificationTO notification to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull NotificationTO notificationTO);
+    void update(@NotNull NotificationTO notificationTO);
 
     /**
      * Deletes the notification matching the given key.
      *
      * @param key key for notification to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Returns details about notification job.
@@ -127,10 +129,11 @@ public interface NotificationService extends JAXRSService {
      * Executes an action on the notification job.
      *
      * @param action action to execute
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @POST
     @Path("job")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response actionJob(@QueryParam("action") JobAction action);
+    void actionJob(@QueryParam("action") JobAction action);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
index 2000a54..def5145 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
@@ -99,24 +99,26 @@ public interface PolicyService extends JAXRSService {
      *
      * @param type policy type
      * @param policyTO Policy to replace existing policy
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{type}/{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull @PathParam("type") PolicyType type, @NotNull PolicyTO policyTO);
+    void update(@NotNull @PathParam("type") PolicyType type, @NotNull PolicyTO policyTO);
 
     /**
      * Delete policy matching the given key.
      *
      * @param type policy type
      * @param key key of policy to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{type}/{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("type") PolicyType type, @NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("type") PolicyType type, @NotNull @PathParam("key") String key);
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
index 4822d72..db20a97 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
@@ -90,22 +90,24 @@ public interface RelationshipTypeService extends JAXRSService {
      * Updates the relationshipType matching the provided key.
      *
      * @param relationshipTypeTO relationshipType to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull RelationshipTypeTO relationshipTypeTO);
+    void update(@NotNull RelationshipTypeTO relationshipTypeTO);
 
     /**
      * Deletes the relationshipType matching the provided key.
      *
      * @param key relationshipType key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
index 5f5a2ad..a07ef24 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
@@ -92,24 +92,26 @@ public interface ReportService extends ExecutableService {
      * Updates report with matching key.
      *
      * @param reportTO report to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull ReportTO reportTO);
+    void update(@NotNull ReportTO reportTO);
 
     /**
      * Deletes report with matching key.
      *
      * @param key Deletes report with matching key
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Exports the report execution with matching key in the requested format.

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
index 4de84e2..da81fa2 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
@@ -91,12 +91,13 @@ public interface ReportTemplateService extends JAXRSService {
      * Deletes the report template matching the given key.
      *
      * @param key key for report template to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Gets the template for the given key and format, if available.
@@ -117,11 +118,12 @@ public interface ReportTemplateService extends JAXRSService {
      * @param key report template
      * @param format template format
      * @param templateIn template to be set
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}/{format}")
-    Response setFormat(
+    void setFormat(
             @NotNull @PathParam("key") String key,
             @NotNull @PathParam("format") ReportTemplateFormat format,
             InputStream templateIn);
@@ -131,11 +133,12 @@ public interface ReportTemplateService extends JAXRSService {
      *
      * @param key report template
      * @param format template format
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}/{format}")
-    Response removeFormat(
+    void removeFormat(
             @NotNull @PathParam("key") String key,
             @NotNull @PathParam("format") ReportTemplateFormat format);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
index 9412522..76e38df 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
@@ -19,6 +19,8 @@
 package org.apache.syncope.common.rest.api.service;
 
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 import io.swagger.annotations.Authorization;
 import java.util.List;
 import javax.validation.constraints.NotNull;
@@ -29,7 +31,6 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.ResourceHistoryConfTO;
 
 /**
@@ -56,21 +57,23 @@ public interface ResourceHistoryService extends JAXRSService {
      * Restores the resource configuration history matching the provided key.
      *
      * @param key resource configuration history key to be restored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @POST
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response restore(@NotNull @PathParam("key") String key);
+    void restore(@NotNull @PathParam("key") String key);
 
     /**
      * Deletes the resource configuration history matching the provided key.
      *
      * @param key resource configuration history key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
index e36f7a5..758947f 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
@@ -129,13 +129,14 @@ public interface ResourceService extends JAXRSService {
      * Updates the resource matching the given name.
      *
      * @param resourceTO resource to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull ResourceTO resourceTO);
+    void update(@NotNull ResourceTO resourceTO);
 
     /**
      * Queries the connector underlying the given resource for the latest sync token value associated to the given any
@@ -143,12 +144,13 @@ public interface ResourceService extends JAXRSService {
      *
      * @param key resource
      * @param anyTypeKey any type
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @POST
     @Path("{key}/{anyTypeKey}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response setLatestSyncToken(
+    void setLatestSyncToken(
             @NotNull @PathParam("key") String key,
             @NotNull @PathParam("anyTypeKey") String anyTypeKey);
 
@@ -157,12 +159,13 @@ public interface ResourceService extends JAXRSService {
      *
      * @param key resource
      * @param anyTypeKey any type
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}/{anyTypeKey}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response removeSyncToken(
+    void removeSyncToken(
             @NotNull @PathParam("key") String key,
             @NotNull @PathParam("anyTypeKey") String anyTypeKey);
 
@@ -170,25 +173,27 @@ public interface ResourceService extends JAXRSService {
      * Deletes the resource matching the given name.
      *
      * @param key name of resource to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Checks whether the connection to resource could be established.
      *
      * @param resourceTO resource to be checked
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @POST
     @Path("check")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response check(@NotNull ResourceTO resourceTO);
+    void check(@NotNull ResourceTO resourceTO);
 
     /**
      * De-associate any objects from the given resource.

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
index 61d6144..fe65840 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
@@ -91,24 +91,26 @@ public interface RoleService extends JAXRSService {
      * Updates the role matching the provided key.
      *
      * @param roleTO role to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull RoleTO roleTO);
+    void update(@NotNull RoleTO roleTO);
 
     /**
      * Deletes the role matching the provided key.
      *
      * @param key role key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Gets the console layout information as JSON string for the role with the given key, if available.
@@ -126,22 +128,24 @@ public interface RoleService extends JAXRSService {
      *
      * @param key role key
      * @param consoleLayoutInfoIn console layout information to be set
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}/consoleLayout")
     @Consumes({ MediaType.APPLICATION_JSON })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response setConsoleLayoutInfo(@NotNull @PathParam("key") String key, InputStream consoleLayoutInfoIn);
+    void setConsoleLayoutInfo(@NotNull @PathParam("key") String key, InputStream consoleLayoutInfoIn);
 
     /**
      * Removes the console layout information for the role with the given key, if available.
      *
      * @param key role key
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}/consoleLayout")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response removeConsoleLayoutInfo(@NotNull @PathParam("key") String key);
+    void removeConsoleLayoutInfo(@NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
index c925290..f0cd4a6 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
@@ -102,23 +102,25 @@ public interface SchemaService extends JAXRSService {
      *
      * @param type type for schemas to be updated
      * @param schemaTO updated schema to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{type}/{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull @PathParam("type") SchemaType type, @NotNull SchemaTO schemaTO);
+    void update(@NotNull @PathParam("type") SchemaType type, @NotNull SchemaTO schemaTO);
 
     /**
      * Deletes the schema matching the given type and key.
      *
      * @param type type for schema to be deleted
      * @param key name of schema to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{type}/{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("type") SchemaType type, @NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("type") SchemaType type, @NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
index ae1b635..b19f07f 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
@@ -90,24 +90,26 @@ public interface SecurityQuestionService extends JAXRSService {
      * Updates the security question matching the provided key.
      *
      * @param securityQuestionTO security question to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull SecurityQuestionTO securityQuestionTO);
+    void update(@NotNull SecurityQuestionTO securityQuestionTO);
 
     /**
      * Deletes the security question matching the provided key.
      *
      * @param key security question key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Ask for security question configured for the user matching the given username, if any.

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/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 006a3c3..b065a861 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
@@ -102,6 +102,7 @@ public interface TaskService extends ExecutableService {
     @POST
     @Path("{type}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     Response create(@NotNull @PathParam("type") TaskType type, @NotNull SchedTaskTO taskTO);
 
     /**
@@ -109,24 +110,27 @@ public interface TaskService extends ExecutableService {
      *
      * @param type task type
      * @param taskTO updated task to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{type}/{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull @PathParam("type") TaskType type, @NotNull SchedTaskTO taskTO);
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    void update(@NotNull @PathParam("type") TaskType type, @NotNull SchedTaskTO taskTO);
 
     /**
      * Deletes the task matching the provided key.
      *
      * @param type task type
      * @param key key of task to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{type}/{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("type") TaskType type, @NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("type") TaskType type, @NotNull @PathParam("key") String key);
 
     /**
      * Executes the provided bulk action.

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
index 699a270..3ac6cf5 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
@@ -226,12 +226,13 @@ public interface UserSelfService extends JAXRSService {
      *
      * @param username username for which the security answer is provided
      * @param securityAnswer actual answer text
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @POST
     @Path("requestPasswordReset")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response requestPasswordReset(@NotNull @QueryParam("username") String username, String securityAnswer);
+    void requestPasswordReset(@NotNull @QueryParam("username") String username, String securityAnswer);
 
     /**
      * Reset the password value for the user matching the provided token, if available and still valid.
@@ -241,10 +242,11 @@ public interface UserSelfService extends JAXRSService {
      *
      * @param token password reset token
      * @param password new password to be set
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @POST
     @Path("confirmPasswordReset")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response confirmPasswordReset(@NotNull @QueryParam("token") String token, String password);
+    void confirmPasswordReset(@NotNull @QueryParam("token") String token, String password);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
index 74febf5..0da9727 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
@@ -19,6 +19,8 @@
 package org.apache.syncope.common.rest.api.service;
 
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 import io.swagger.annotations.Authorization;
 import java.util.List;
 import javax.validation.constraints.NotNull;
@@ -88,13 +90,14 @@ public interface WorkflowService extends JAXRSService {
      * @param anyType any object type
      * @param key workflow definition key
      * @param definition workflow definition for matching kind
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @PUT
     @Path("{anyType}/{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response set(
+    void set(
             @NotNull @PathParam("anyType") String anyType,
             @NotNull @PathParam("key") String key,
             @NotNull String definition);
@@ -104,12 +107,13 @@ public interface WorkflowService extends JAXRSService {
      *
      * @param anyType any object type
      * @param key workflow definition key
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(code = 204, message = "Operation was successful"))
     @DELETE
     @Path("{anyType}/{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(
+    void delete(
             @NotNull @PathParam("anyType") String anyType,
             @NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java
index 133dad3..e7be4f7 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java
@@ -202,11 +202,10 @@ public abstract class AbstractAnyService<TO extends AnyTO, P extends AnyPatch>
     }
 
     @Override
-    public Response delete(final String key, final SchemaType schemaType, final String schema) {
+    public void delete(final String key, final SchemaType schemaType, final String schema) {
         String actualKey = getActualKey(key);
         addUpdateOrReplaceAttr(
                 actualKey, schemaType, new AttrTO.Builder().schema(schema).build(), PatchOperation.DELETE);
-        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java
index c5f3c89..aadbaf3 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.List;
-import javax.ws.rs.core.Response;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.syncope.common.lib.to.BulkActionResult;
 import org.apache.syncope.common.lib.to.ExecTO;
@@ -52,9 +51,8 @@ public abstract class AbstractExecutableService extends AbstractServiceImpl impl
     }
 
     @Override
-    public Response deleteExecution(final String executionKey) {
+    public void deleteExecution(final String executionKey) {
         getExecutableLogic().deleteExecution(executionKey);
-        return Response.noContent().build();
     }
 
     @Override
@@ -78,9 +76,8 @@ public abstract class AbstractExecutableService extends AbstractServiceImpl impl
     }
 
     @Override
-    public Response actionJob(final String key, final JobAction action) {
+    public void actionJob(final String key, final JobAction action) {
         getExecutableLogic().actionJob(key, action);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java
index 1508298..2b09324 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java
@@ -59,9 +59,8 @@ public class AccessTokenServiceImpl extends AbstractServiceImpl implements Acces
     }
 
     @Override
-    public Response logout() {
+    public void logout() {
         logic.logout();
-        return Response.noContent().build();
     }
 
     @Override
@@ -74,9 +73,8 @@ public class AccessTokenServiceImpl extends AbstractServiceImpl implements Acces
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java
index 336cea4..bd3149f 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java
@@ -54,15 +54,13 @@ public class AnyTypeClassServiceImpl extends AbstractServiceImpl implements AnyT
     }
 
     @Override
-    public Response update(final AnyTypeClassTO anyTypeTO) {
+    public void update(final AnyTypeClassTO anyTypeTO) {
         logic.update(anyTypeTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java
index c580241..9dd4982 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java
@@ -54,15 +54,13 @@ public class AnyTypeServiceImpl extends AbstractServiceImpl implements AnyTypeSe
     }
 
     @Override
-    public Response update(final AnyTypeTO anyTypeTO) {
+    public void update(final AnyTypeTO anyTypeTO) {
         logic.update(anyTypeTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
index db09e01..8c8473d 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
@@ -58,9 +58,8 @@ public class ConfigurationServiceImpl extends AbstractServiceImpl implements Con
     }
 
     @Override
-    public Response delete(final String schema) {
+    public void delete(final String schema) {
         logic.delete(schema);
-        return Response.noContent().build();
     }
 
     @Override
@@ -74,8 +73,7 @@ public class ConfigurationServiceImpl extends AbstractServiceImpl implements Con
     }
 
     @Override
-    public Response set(final AttrTO value) {
+    public void set(final AttrTO value) {
         logic.set(value);
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java
index 205b3e0..3424c5e 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.List;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.ConnInstanceHistoryConfTO;
 import org.apache.syncope.common.rest.api.service.ConnectorHistoryService;
 import org.apache.syncope.core.logic.ConnectorHistoryLogic;
@@ -38,15 +37,13 @@ public class ConnectorHistoryServiceImpl extends AbstractServiceImpl implements
     }
 
     @Override
-    public Response restore(final String key) {
+    public void restore(final String key) {
         logic.restore(key);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
index 082d89e..45da758 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
@@ -46,9 +46,8 @@ public class ConnectorServiceImpl extends AbstractServiceImpl implements Connect
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -79,20 +78,17 @@ public class ConnectorServiceImpl extends AbstractServiceImpl implements Connect
     }
 
     @Override
-    public Response update(final ConnInstanceTO connInstanceTO) {
+    public void update(final ConnInstanceTO connInstanceTO) {
         logic.update(connInstanceTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response check(final ConnInstanceTO connInstanceTO) {
+    public void check(final ConnInstanceTO connInstanceTO) {
         logic.check(connInstanceTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response reload() {
+    public void reload() {
         logic.reload();
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java
index 168c3cd..daa8aad 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java
@@ -54,15 +54,13 @@ public class DomainServiceImpl extends AbstractServiceImpl implements DomainServ
     }
 
     @Override
-    public Response update(final DomainTO anyTypeTO) {
+    public void update(final DomainTO anyTypeTO) {
         logic.update(anyTypeTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java
index dec464b..41e3bad 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java
@@ -54,15 +54,13 @@ public class DynRealmServiceImpl extends AbstractServiceImpl implements DynRealm
     }
 
     @Override
-    public Response update(final DynRealmTO roleTO) {
+    public void update(final DynRealmTO roleTO) {
         logic.update(roleTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java
index 4f8c2f4..a347dac 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java
@@ -21,7 +21,6 @@ package org.apache.syncope.core.rest.cxf.service;
 import java.text.ParseException;
 import java.util.List;
 import javax.ws.rs.BadRequestException;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.log.EventCategoryTO;
 import org.apache.syncope.common.lib.log.LogAppender;
 import org.apache.syncope.common.lib.log.LogStatementTO;
@@ -51,7 +50,7 @@ public class LoggerServiceImpl extends AbstractServiceImpl implements LoggerServ
     }
 
     @Override
-    public Response delete(final LoggerType type, final String name) {
+    public void delete(final LoggerType type, final String name) {
         switch (type) {
             case LOG:
                 logic.deleteLog(name);
@@ -68,7 +67,6 @@ public class LoggerServiceImpl extends AbstractServiceImpl implements LoggerServ
             default:
                 throw new BadRequestException();
         }
-        return Response.noContent().build();
     }
 
     @Override
@@ -101,7 +99,7 @@ public class LoggerServiceImpl extends AbstractServiceImpl implements LoggerServ
     }
 
     @Override
-    public Response update(final LoggerType type, final LoggerTO logger) {
+    public void update(final LoggerType type, final LoggerTO logger) {
         switch (type) {
             case LOG:
                 logic.setLogLevel(logger.getKey(), logger.getLevel().getLevel());
@@ -118,7 +116,6 @@ public class LoggerServiceImpl extends AbstractServiceImpl implements LoggerServ
             default:
                 throw new BadRequestException();
         }
-        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java
index a68bf9e..ba1b0f1 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java
@@ -62,9 +62,8 @@ public class MailTemplateServiceImpl extends AbstractServiceImpl implements Mail
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -83,10 +82,9 @@ public class MailTemplateServiceImpl extends AbstractServiceImpl implements Mail
     }
 
     @Override
-    public Response setFormat(final String key, final MailTemplateFormat format, final InputStream templateIn) {
+    public void setFormat(final String key, final MailTemplateFormat format, final InputStream templateIn) {
         try {
             logic.setFormat(key, format, IOUtils.toString(templateIn, StandardCharsets.UTF_8));
-            return Response.noContent().build();
         } catch (final IOException e) {
             LOG.error("While setting format {} for mail template {}", format, key, e);
             throw new InternalServerErrorException("Could not read entity", e);
@@ -94,8 +92,7 @@ public class MailTemplateServiceImpl extends AbstractServiceImpl implements Mail
     }
 
     @Override
-    public Response removeFormat(final String key, final MailTemplateFormat format) {
+    public void removeFormat(final String key, final MailTemplateFormat format) {
         logic.setFormat(key, format, null);
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java
index 9671f93..874f138 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java
@@ -56,15 +56,13 @@ public class NotificationServiceImpl extends AbstractServiceImpl implements Noti
     }
 
     @Override
-    public Response update(final NotificationTO notificationTO) {
+    public void update(final NotificationTO notificationTO) {
         logic.update(notificationTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -73,8 +71,7 @@ public class NotificationServiceImpl extends AbstractServiceImpl implements Noti
     }
 
     @Override
-    public Response actionJob(final JobAction action) {
+    public void actionJob(final JobAction action) {
         logic.actionJob(action);
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java
index c115ca6..2616163 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java
@@ -45,9 +45,8 @@ public class PolicyServiceImpl extends AbstractServiceImpl implements PolicyServ
     }
 
     @Override
-    public Response delete(final PolicyType type, final String key) {
+    public void delete(final PolicyType type, final String key) {
         logic.delete(type, key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -61,8 +60,7 @@ public class PolicyServiceImpl extends AbstractServiceImpl implements PolicyServ
     }
 
     @Override
-    public Response update(final PolicyType type, final PolicyTO policyTO) {
+    public void update(final PolicyType type, final PolicyTO policyTO) {
         logic.update(type, policyTO);
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java
index ffff1b3..1cdc1d4 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java
@@ -54,15 +54,13 @@ public class RelationshipTypeServiceImpl extends AbstractServiceImpl implements
     }
 
     @Override
-    public Response update(final RelationshipTypeTO anyTypeTO) {
+    public void update(final RelationshipTypeTO anyTypeTO) {
         logic.update(anyTypeTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
index 8aad740..867502c 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
@@ -56,9 +56,8 @@ public class ReportServiceImpl extends AbstractExecutableService implements Repo
     }
 
     @Override
-    public Response update(final ReportTO reportTO) {
+    public void update(final ReportTO reportTO) {
         logic.update(reportTO);
-        return Response.noContent().build();
     }
 
     @Override
@@ -89,8 +88,7 @@ public class ReportServiceImpl extends AbstractExecutableService implements Repo
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java
index 5dfbe41..bd8b0d5 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java
@@ -63,9 +63,8 @@ public class ReportTemplateServiceImpl extends AbstractServiceImpl implements Re
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -84,10 +83,9 @@ public class ReportTemplateServiceImpl extends AbstractServiceImpl implements Re
     }
 
     @Override
-    public Response setFormat(final String key, final ReportTemplateFormat format, final InputStream templateIn) {
+    public void setFormat(final String key, final ReportTemplateFormat format, final InputStream templateIn) {
         try {
             logic.setFormat(key, format, IOUtils.toString(templateIn, StandardCharsets.UTF_8.name()));
-            return Response.noContent().build();
         } catch (final IOException e) {
             LOG.error("While setting format {} for report template {}", format, key, e);
             throw new InternalServerErrorException("Could not read entity", e);
@@ -95,8 +93,7 @@ public class ReportTemplateServiceImpl extends AbstractServiceImpl implements Re
     }
 
     @Override
-    public Response removeFormat(final String key, final ReportTemplateFormat format) {
+    public void removeFormat(final String key, final ReportTemplateFormat format) {
         logic.setFormat(key, format, null);
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c646e35f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java
index ef5aead..b69b5be 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.List;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.ResourceHistoryConfTO;
 import org.apache.syncope.common.rest.api.service.ResourceHistoryService;
 import org.apache.syncope.core.logic.ResourceHistoryLogic;
@@ -38,15 +37,13 @@ public class ResourceHistoryServiceImpl extends AbstractServiceImpl implements R
     }
 
     @Override
-    public Response restore(final String key) {
+    public void restore(final String key) {
         logic.restore(key);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }


[4/4] syncope git commit: [SYNCOPE-1262] Prefer to properly return void but add @ApiResponse for 204

Posted by il...@apache.org.
[SYNCOPE-1262] Prefer to properly return void but add @ApiResponse for 204


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

Branch: refs/heads/master
Commit: e725c72b30ce44e4bde02fac6b456a0b01318950
Parents: 711d0c0
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Feb 20 10:22:37 2018 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Feb 20 11:09:44 2018 +0100

----------------------------------------------------------------------
 .../rest/api/service/AccessTokenService.java    | 11 +++++----
 .../common/rest/api/service/AnyService.java     |  5 ++--
 .../rest/api/service/AnyTypeClassService.java   | 10 ++++----
 .../common/rest/api/service/AnyTypeService.java | 10 ++++----
 .../rest/api/service/ConfigurationService.java  | 12 ++++++----
 .../api/service/ConnectorHistoryService.java    | 13 ++++++----
 .../rest/api/service/ConnectorService.java      | 21 +++++++++-------
 .../common/rest/api/service/DomainService.java  | 10 ++++----
 .../rest/api/service/DynRealmService.java       | 10 ++++----
 .../rest/api/service/ExecutableService.java     | 13 ++++++----
 .../common/rest/api/service/LoggerService.java  | 13 ++++++----
 .../rest/api/service/MailTemplateService.java   | 15 +++++++-----
 .../rest/api/service/NotificationService.java   | 15 +++++++-----
 .../common/rest/api/service/PolicyService.java  | 10 ++++----
 .../api/service/RelationshipTypeService.java    | 10 ++++----
 .../common/rest/api/service/ReportService.java  | 10 ++++----
 .../rest/api/service/ReportTemplateService.java | 15 +++++++-----
 .../api/service/ResourceHistoryService.java     | 13 ++++++----
 .../rest/api/service/ResourceService.java       | 25 ++++++++++++--------
 .../common/rest/api/service/RoleService.java    | 20 +++++++++-------
 .../common/rest/api/service/SchemaService.java  | 10 ++++----
 .../api/service/SecurityQuestionService.java    | 10 ++++----
 .../common/rest/api/service/TaskService.java    | 12 ++++++----
 .../rest/api/service/UserSelfService.java       | 10 ++++----
 .../rest/api/service/WorkflowService.java       | 12 ++++++----
 .../rest/cxf/service/AbstractAnyService.java    |  3 +--
 .../cxf/service/AbstractExecutableService.java  |  7 ++----
 .../cxf/service/AccessTokenServiceImpl.java     |  6 ++---
 .../cxf/service/AnyTypeClassServiceImpl.java    |  6 ++---
 .../rest/cxf/service/AnyTypeServiceImpl.java    |  6 ++---
 .../cxf/service/ConfigurationServiceImpl.java   |  6 ++---
 .../service/ConnectorHistoryServiceImpl.java    |  7 ++----
 .../rest/cxf/service/ConnectorServiceImpl.java  | 12 ++++------
 .../rest/cxf/service/DomainServiceImpl.java     |  6 ++---
 .../rest/cxf/service/DynRealmServiceImpl.java   |  6 ++---
 .../rest/cxf/service/LoggerServiceImpl.java     |  7 ++----
 .../cxf/service/MailTemplateServiceImpl.java    |  9 +++----
 .../cxf/service/NotificationServiceImpl.java    |  9 +++----
 .../rest/cxf/service/PolicyServiceImpl.java     |  6 ++---
 .../service/RelationshipTypeServiceImpl.java    |  6 ++---
 .../rest/cxf/service/ReportServiceImpl.java     |  6 ++---
 .../cxf/service/ReportTemplateServiceImpl.java  |  9 +++----
 .../cxf/service/ResourceHistoryServiceImpl.java |  7 ++----
 .../rest/cxf/service/ResourceServiceImpl.java   | 15 ++++--------
 .../core/rest/cxf/service/RoleServiceImpl.java  | 12 ++++------
 .../rest/cxf/service/SchemaServiceImpl.java     |  6 ++---
 .../service/SecurityQuestionServiceImpl.java    |  6 ++---
 .../core/rest/cxf/service/TaskServiceImpl.java  |  6 ++---
 .../rest/cxf/service/UserSelfServiceImpl.java   |  6 ++---
 .../rest/cxf/service/WorkflowServiceImpl.java   |  6 ++---
 .../rest/api/service/CamelRouteService.java     | 14 ++++++-----
 .../rest/cxf/service/CamelRouteServiceImpl.java |  7 ++----
 .../rest/api/service/SAML2IdPService.java       | 12 ++++++----
 .../common/rest/api/service/SAML2SPService.java |  7 ++++--
 .../rest/cxf/service/SAML2IdPServiceImpl.java   |  6 ++---
 .../rest/cxf/service/SAML2SPServiceImpl.java    |  7 ++----
 .../rest/api/service/SCIMConfService.java       |  8 ++++---
 .../rest/cxf/service/SCIMConfServiceImpl.java   |  4 +---
 58 files changed, 283 insertions(+), 278 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
index 81728f1..2a72028 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
@@ -93,15 +93,15 @@ public interface AccessTokenService extends JAXRSService {
 
     /**
      * Invalidates the access token of the requesting user.
-     *
-     * @return an empty response if operation was successful
      */
     @Operation(security = {
         @SecurityRequirement(name = "Bearer") })
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @POST
     @Path("logout")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response logout();
+    void logout();
 
     /**
      * Returns a paged list of existing access tokens matching the given query.
@@ -121,13 +121,14 @@ public interface AccessTokenService extends JAXRSService {
      * Invalidates the access token matching the provided key.
      *
      * @param key access token key
-     * @return an empty response if operation was successful
      */
     @Operation(security = {
         @SecurityRequirement(name = "BasicAuthentication")
         , @SecurityRequirement(name = "Bearer") })
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@PathParam("key") String key);
+    void delete(@PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
index b526d36..3f0f294 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
@@ -131,12 +131,13 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
      * @param key any object key or name
      * @param schemaType schema type
      * @param schema schema
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}/{schemaType}/{schema}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(
+    void delete(
             @NotNull @PathParam("key") String key,
             @NotNull @PathParam("schemaType") SchemaType schemaType,
             @NotNull @PathParam("schema") String schema);

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
index 6eb97a1..b3b750a 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
@@ -95,22 +95,24 @@ public interface AnyTypeClassService extends JAXRSService {
      * Updates the anyTypeClass matching the provided key.
      *
      * @param anyTypeClassTO anyTypeClass to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull AnyTypeClassTO anyTypeClassTO);
+    void update(@NotNull AnyTypeClassTO anyTypeClassTO);
 
     /**
      * Deletes the anyTypeClass matching the provided key.
      *
      * @param key anyTypeClass key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
index b193245..b40f3c9 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
@@ -94,21 +94,23 @@ public interface AnyTypeService extends JAXRSService {
      * Updates the anyType matching the provided key.
      *
      * @param anyTypeTO anyType to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull AnyTypeTO anyTypeTO);
+    void update(@NotNull AnyTypeTO anyTypeTO);
 
     /**
      * Deletes the anyType matching the provided key.
      *
      * @param key anyType key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
index 55979f0..dec0b29 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
@@ -18,6 +18,8 @@
  */
 package org.apache.syncope.common.rest.api.service;
 
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
 import io.swagger.v3.oas.annotations.security.SecurityRequirement;
 import io.swagger.v3.oas.annotations.security.SecurityRequirements;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -77,22 +79,24 @@ public interface ConfigurationService extends JAXRSService {
      * Creates / updates the configuration parameter with the given schema.
      *
      * @param value parameter value
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{schema}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response set(@NotNull AttrTO value);
+    void set(@NotNull AttrTO value);
 
     /**
      * Deletes the configuration parameter with matching schema.
      *
      * @param schema configuration parameter schema
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{schema}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("schema") String schema);
+    void delete(@NotNull @PathParam("schema") String schema);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
index 1a30f9b..4d5c3a6 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
@@ -18,6 +18,8 @@
  */
 package org.apache.syncope.common.rest.api.service;
 
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
 import io.swagger.v3.oas.annotations.security.SecurityRequirement;
 import io.swagger.v3.oas.annotations.security.SecurityRequirements;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -30,7 +32,6 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.ConnInstanceHistoryConfTO;
 
 /**
@@ -58,21 +59,23 @@ public interface ConnectorHistoryService extends JAXRSService {
      * Restores the connector configuration history instance matching the provided key.
      *
      * @param key connector configuration history instance key to be restored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @POST
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response restore(@NotNull @PathParam("key") String key);
+    void restore(@NotNull @PathParam("key") String key);
 
     /**
      * Deletes the connector configuration history instance matching the provided key.
      *
      * @param key connector configuration history instance key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
index 63a55fc..6e79963 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
@@ -146,44 +146,47 @@ public interface ConnectorService extends JAXRSService {
      * Updates the connector instance matching the provided key.
      *
      * @param connInstanceTO connector instance to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull ConnInstanceTO connInstanceTO);
+    void update(@NotNull ConnInstanceTO connInstanceTO);
 
     /**
      * Deletes the connector instance matching the provided key.
      *
      * @param key connector instance key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Checks whether the connection to resource could be established.
      *
      * @param connInstanceTO connector instance to be used for connection check
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @POST
     @Path("check")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response check(@NotNull ConnInstanceTO connInstanceTO);
+    void check(@NotNull ConnInstanceTO connInstanceTO);
 
     /**
      * Reload all connector bundles and instances.
-     *
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @POST
     @Path("reload")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response reload();
+    void reload();
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
index a9945a5..7da4922 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
@@ -95,22 +95,24 @@ public interface DomainService extends JAXRSService {
      * Updates the domain matching the provided key.
      *
      * @param domainTO domain to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull DomainTO domainTO);
+    void update(@NotNull DomainTO domainTO);
 
     /**
      * Deletes the domain matching the provided key.
      *
      * @param key domain key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
index 69342e2..920282b 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
@@ -95,23 +95,25 @@ public interface DynRealmService extends JAXRSService {
      * Updates the dynamic realm matching the provided key.
      *
      * @param dynDynRealmTO dynamic realm to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull DynRealmTO dynDynRealmTO);
+    void update(@NotNull DynRealmTO dynDynRealmTO);
 
     /**
      * Deletes the dynamic realm matching the provided key.
      *
      * @param key dynamic realm key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
index 22412cc..2b09d49 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
@@ -18,6 +18,8 @@
  */
 package org.apache.syncope.common.rest.api.service;
 
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
 import java.util.List;
 import javax.validation.constraints.Min;
 import javax.validation.constraints.NotNull;
@@ -31,7 +33,6 @@ import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.BulkActionResult;
 import org.apache.syncope.common.lib.to.ExecTO;
 import org.apache.syncope.common.lib.to.JobTO;
@@ -69,12 +70,13 @@ public interface ExecutableService extends JAXRSService {
      * Deletes the executable execution matching the provided key.
      *
      * @param executionKey key of executable execution to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("executions/{executionKey}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response deleteExecution(@NotNull @PathParam("executionKey") String executionKey);
+    void deleteExecution(@NotNull @PathParam("executionKey") String executionKey);
 
     /**
      * Deletes the executions belonging matching the given query.
@@ -113,9 +115,10 @@ public interface ExecutableService extends JAXRSService {
      *
      * @param key executable key
      * @param action action to execute
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @POST
     @Path("jobs/{key}")
-    Response actionJob(@NotNull @PathParam("key") String key, @QueryParam("action") JobAction action);
+    void actionJob(@NotNull @PathParam("key") String key, @QueryParam("action") JobAction action);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
index f923200..5d040f3 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
@@ -18,6 +18,8 @@
  */
 package org.apache.syncope.common.rest.api.service;
 
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
 import io.swagger.v3.oas.annotations.security.SecurityRequirement;
 import io.swagger.v3.oas.annotations.security.SecurityRequirements;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -31,7 +33,6 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.log.EventCategoryTO;
 import org.apache.syncope.common.lib.log.LogAppender;
 import org.apache.syncope.common.lib.log.LogStatementTO;
@@ -107,24 +108,26 @@ public interface LoggerService extends JAXRSService {
      *
      * @param type LoggerType to be selected
      * @param logger Logger to be created or updated
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{type}/{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull @PathParam("type") LoggerType type, @NotNull LoggerTO logger);
+    void update(@NotNull @PathParam("type") LoggerType type, @NotNull LoggerTO logger);
 
     /**
      * Deletes the logger with matching name.
      *
      * @param type LoggerType to be selected
      * @param name Logger name to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{type}/{name}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") String name);
+    void delete(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") String name);
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
index 0e83a90..1453872 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
@@ -97,12 +97,13 @@ public interface MailTemplateService extends JAXRSService {
      * Deletes the mail template matching the given key.
      *
      * @param key key for mail template to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Gets the template for the given key and format, if available.
@@ -123,12 +124,13 @@ public interface MailTemplateService extends JAXRSService {
      * @param key mail template
      * @param format template format
      * @param templateIn template to be set
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}/{format}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response setFormat(
+    void setFormat(
             @NotNull @PathParam("key") String key,
             @NotNull @PathParam("format") MailTemplateFormat format,
             InputStream templateIn);
@@ -138,12 +140,13 @@ public interface MailTemplateService extends JAXRSService {
      *
      * @param key mail template
      * @param format template format
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}/{format}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response removeFormat(
+    void removeFormat(
             @NotNull @PathParam("key") String key,
             @NotNull @PathParam("format") MailTemplateFormat format);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
index 343a0c8..b000f42 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
@@ -98,24 +98,26 @@ public interface NotificationService extends JAXRSService {
      * Updates the notification matching the given key.
      *
      * @param notificationTO notification to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull NotificationTO notificationTO);
+    void update(@NotNull NotificationTO notificationTO);
 
     /**
      * Deletes the notification matching the given key.
      *
      * @param key key for notification to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Returns details about notification job.
@@ -131,10 +133,11 @@ public interface NotificationService extends JAXRSService {
      * Executes an action on the notification job.
      *
      * @param action action to execute
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @POST
     @Path("job")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response actionJob(@QueryParam("action") JobAction action);
+    void actionJob(@QueryParam("action") JobAction action);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
index c2b7c33..5e84118 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
@@ -104,24 +104,26 @@ public interface PolicyService extends JAXRSService {
      *
      * @param type policy type
      * @param policyTO Policy to replace existing policy
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{type}/{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull @PathParam("type") PolicyType type, @NotNull PolicyTO policyTO);
+    void update(@NotNull @PathParam("type") PolicyType type, @NotNull PolicyTO policyTO);
 
     /**
      * Delete policy matching the given key.
      *
      * @param type policy type
      * @param key key of policy to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{type}/{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("type") PolicyType type, @NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("type") PolicyType type, @NotNull @PathParam("key") String key);
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
index a5f4987..78764ca 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
@@ -95,22 +95,24 @@ public interface RelationshipTypeService extends JAXRSService {
      * Updates the relationshipType matching the provided key.
      *
      * @param relationshipTypeTO relationshipType to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull RelationshipTypeTO relationshipTypeTO);
+    void update(@NotNull RelationshipTypeTO relationshipTypeTO);
 
     /**
      * Deletes the relationshipType matching the provided key.
      *
      * @param key relationshipType key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
index 2c5f3f1..0f8726f 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
@@ -97,24 +97,26 @@ public interface ReportService extends ExecutableService {
      * Updates report with matching key.
      *
      * @param reportTO report to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull ReportTO reportTO);
+    void update(@NotNull ReportTO reportTO);
 
     /**
      * Deletes report with matching key.
      *
      * @param key Deletes report with matching key
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Exports the report execution with matching key in the requested format.

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
index f85f133..37b2889 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
@@ -96,12 +96,13 @@ public interface ReportTemplateService extends JAXRSService {
      * Deletes the report template matching the given key.
      *
      * @param key key for report template to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Gets the template for the given key and format, if available.
@@ -122,11 +123,12 @@ public interface ReportTemplateService extends JAXRSService {
      * @param key report template
      * @param format template format
      * @param templateIn template to be set
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}/{format}")
-    Response setFormat(
+    void setFormat(
             @NotNull @PathParam("key") String key,
             @NotNull @PathParam("format") ReportTemplateFormat format,
             InputStream templateIn);
@@ -136,11 +138,12 @@ public interface ReportTemplateService extends JAXRSService {
      *
      * @param key report template
      * @param format template format
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}/{format}")
-    Response removeFormat(
+    void removeFormat(
             @NotNull @PathParam("key") String key,
             @NotNull @PathParam("format") ReportTemplateFormat format);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
index a30b136..01f569a 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
@@ -18,6 +18,8 @@
  */
 package org.apache.syncope.common.rest.api.service;
 
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
 import io.swagger.v3.oas.annotations.security.SecurityRequirement;
 import io.swagger.v3.oas.annotations.security.SecurityRequirements;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -30,7 +32,6 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.ResourceHistoryConfTO;
 
 /**
@@ -58,21 +59,23 @@ public interface ResourceHistoryService extends JAXRSService {
      * Restores the resource configuration history matching the provided key.
      *
      * @param key resource configuration history key to be restored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @POST
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response restore(@NotNull @PathParam("key") String key);
+    void restore(@NotNull @PathParam("key") String key);
 
     /**
      * Deletes the resource configuration history matching the provided key.
      *
      * @param key resource configuration history key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
index cc86628..b20c61b 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
@@ -134,13 +134,14 @@ public interface ResourceService extends JAXRSService {
      * Updates the resource matching the given name.
      *
      * @param resourceTO resource to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull ResourceTO resourceTO);
+    void update(@NotNull ResourceTO resourceTO);
 
     /**
      * Queries the connector underlying the given resource for the latest sync token value associated to the given any
@@ -148,12 +149,13 @@ public interface ResourceService extends JAXRSService {
      *
      * @param key resource
      * @param anyTypeKey any type
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @POST
     @Path("{key}/{anyTypeKey}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response setLatestSyncToken(
+    void setLatestSyncToken(
             @NotNull @PathParam("key") String key,
             @NotNull @PathParam("anyTypeKey") String anyTypeKey);
 
@@ -162,12 +164,13 @@ public interface ResourceService extends JAXRSService {
      *
      * @param key resource
      * @param anyTypeKey any type
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}/{anyTypeKey}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response removeSyncToken(
+    void removeSyncToken(
             @NotNull @PathParam("key") String key,
             @NotNull @PathParam("anyTypeKey") String anyTypeKey);
 
@@ -175,25 +178,27 @@ public interface ResourceService extends JAXRSService {
      * Deletes the resource matching the given name.
      *
      * @param key name of resource to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Checks whether the connection to resource could be established.
      *
      * @param resourceTO resource to be checked
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @POST
     @Path("check")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response check(@NotNull ResourceTO resourceTO);
+    void check(@NotNull ResourceTO resourceTO);
 
     /**
      * De-associate any objects from the given resource.

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
index a3ead88..b57b0a4 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
@@ -96,24 +96,26 @@ public interface RoleService extends JAXRSService {
      * Updates the role matching the provided key.
      *
      * @param roleTO role to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull RoleTO roleTO);
+    void update(@NotNull RoleTO roleTO);
 
     /**
      * Deletes the role matching the provided key.
      *
      * @param key role key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Gets the console layout information as JSON string for the role with the given key, if available.
@@ -131,22 +133,24 @@ public interface RoleService extends JAXRSService {
      *
      * @param key role key
      * @param consoleLayoutInfoIn console layout information to be set
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}/consoleLayout")
     @Consumes({ MediaType.APPLICATION_JSON })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response setConsoleLayoutInfo(@NotNull @PathParam("key") String key, InputStream consoleLayoutInfoIn);
+    void setConsoleLayoutInfo(@NotNull @PathParam("key") String key, InputStream consoleLayoutInfoIn);
 
     /**
      * Removes the console layout information for the role with the given key, if available.
      *
      * @param key role key
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}/consoleLayout")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response removeConsoleLayoutInfo(@NotNull @PathParam("key") String key);
+    void removeConsoleLayoutInfo(@NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
index dc832b3..4b901fe 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
@@ -107,23 +107,25 @@ public interface SchemaService extends JAXRSService {
      *
      * @param type type for schemas to be updated
      * @param schemaTO updated schema to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{type}/{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull @PathParam("type") SchemaType type, @NotNull SchemaTO schemaTO);
+    void update(@NotNull @PathParam("type") SchemaType type, @NotNull SchemaTO schemaTO);
 
     /**
      * Deletes the schema matching the given type and key.
      *
      * @param type type for schema to be deleted
      * @param key name of schema to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{type}/{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("type") SchemaType type, @NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("type") SchemaType type, @NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
index 2a2e0ab..681921b 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
@@ -95,24 +95,26 @@ public interface SecurityQuestionService extends JAXRSService {
      * Updates the security question matching the provided key.
      *
      * @param securityQuestionTO security question to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull SecurityQuestionTO securityQuestionTO);
+    void update(@NotNull SecurityQuestionTO securityQuestionTO);
 
     /**
      * Deletes the security question matching the provided key.
      *
      * @param key security question key to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Ask for security question configured for the user matching the given username, if any.

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/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 60abb51..7d76d55 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
@@ -107,6 +107,7 @@ public interface TaskService extends ExecutableService {
     @POST
     @Path("{type}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     Response create(@NotNull @PathParam("type") TaskType type, @NotNull SchedTaskTO taskTO);
 
     /**
@@ -114,24 +115,27 @@ public interface TaskService extends ExecutableService {
      *
      * @param type task type
      * @param taskTO updated task to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{type}/{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull @PathParam("type") TaskType type, @NotNull SchedTaskTO taskTO);
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    void update(@NotNull @PathParam("type") TaskType type, @NotNull SchedTaskTO taskTO);
 
     /**
      * Deletes the task matching the provided key.
      *
      * @param type task type
      * @param key key of task to be deleted
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{type}/{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@NotNull @PathParam("type") TaskType type, @NotNull @PathParam("key") String key);
+    void delete(@NotNull @PathParam("type") TaskType type, @NotNull @PathParam("key") String key);
 
     /**
      * Executes the provided bulk action.

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
index 6ba8fd3..17ff01e 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
@@ -242,12 +242,13 @@ public interface UserSelfService extends JAXRSService {
      *
      * @param username username for which the security answer is provided
      * @param securityAnswer actual answer text
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @POST
     @Path("requestPasswordReset")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response requestPasswordReset(@NotNull @QueryParam("username") String username, String securityAnswer);
+    void requestPasswordReset(@NotNull @QueryParam("username") String username, String securityAnswer);
 
     /**
      * Reset the password value for the user matching the provided token, if available and still valid.
@@ -257,10 +258,11 @@ public interface UserSelfService extends JAXRSService {
      *
      * @param token password reset token
      * @param password new password to be set
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @POST
     @Path("confirmPasswordReset")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response confirmPasswordReset(@NotNull @QueryParam("token") String token, String password);
+    void confirmPasswordReset(@NotNull @QueryParam("token") String token, String password);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
index 15f406b..316009d 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
@@ -18,6 +18,8 @@
  */
 package org.apache.syncope.common.rest.api.service;
 
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
 import io.swagger.v3.oas.annotations.security.SecurityRequirement;
 import io.swagger.v3.oas.annotations.security.SecurityRequirements;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -90,13 +92,14 @@ public interface WorkflowService extends JAXRSService {
      * @param anyType any object type
      * @param key workflow definition key
      * @param definition workflow definition for matching kind
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{anyType}/{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response set(
+    void set(
             @NotNull @PathParam("anyType") String anyType,
             @NotNull @PathParam("key") String key,
             @NotNull String definition);
@@ -106,12 +109,13 @@ public interface WorkflowService extends JAXRSService {
      *
      * @param anyType any object type
      * @param key workflow definition key
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{anyType}/{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(
+    void delete(
             @NotNull @PathParam("anyType") String anyType,
             @NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java
index c8c0572..92d2aad 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java
@@ -202,11 +202,10 @@ public abstract class AbstractAnyService<TO extends AnyTO, P extends AnyPatch>
     }
 
     @Override
-    public Response delete(final String key, final SchemaType schemaType, final String schema) {
+    public void delete(final String key, final SchemaType schemaType, final String schema) {
         String actualKey = getActualKey(key);
         addUpdateOrReplaceAttr(
                 actualKey, schemaType, new AttrTO.Builder().schema(schema).build(), PatchOperation.DELETE);
-        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java
index c5f3c89..aadbaf3 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.List;
-import javax.ws.rs.core.Response;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.syncope.common.lib.to.BulkActionResult;
 import org.apache.syncope.common.lib.to.ExecTO;
@@ -52,9 +51,8 @@ public abstract class AbstractExecutableService extends AbstractServiceImpl impl
     }
 
     @Override
-    public Response deleteExecution(final String executionKey) {
+    public void deleteExecution(final String executionKey) {
         getExecutableLogic().deleteExecution(executionKey);
-        return Response.noContent().build();
     }
 
     @Override
@@ -78,9 +76,8 @@ public abstract class AbstractExecutableService extends AbstractServiceImpl impl
     }
 
     @Override
-    public Response actionJob(final String key, final JobAction action) {
+    public void actionJob(final String key, final JobAction action) {
         getExecutableLogic().actionJob(key, action);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java
index 1508298..2b09324 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java
@@ -59,9 +59,8 @@ public class AccessTokenServiceImpl extends AbstractServiceImpl implements Acces
     }
 
     @Override
-    public Response logout() {
+    public void logout() {
         logic.logout();
-        return Response.noContent().build();
     }
 
     @Override
@@ -74,9 +73,8 @@ public class AccessTokenServiceImpl extends AbstractServiceImpl implements Acces
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java
index 336cea4..bd3149f 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java
@@ -54,15 +54,13 @@ public class AnyTypeClassServiceImpl extends AbstractServiceImpl implements AnyT
     }
 
     @Override
-    public Response update(final AnyTypeClassTO anyTypeTO) {
+    public void update(final AnyTypeClassTO anyTypeTO) {
         logic.update(anyTypeTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java
index c580241..9dd4982 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java
@@ -54,15 +54,13 @@ public class AnyTypeServiceImpl extends AbstractServiceImpl implements AnyTypeSe
     }
 
     @Override
-    public Response update(final AnyTypeTO anyTypeTO) {
+    public void update(final AnyTypeTO anyTypeTO) {
         logic.update(anyTypeTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
index befd5b3..4a40a75 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
@@ -50,9 +50,8 @@ public class ConfigurationServiceImpl extends AbstractServiceImpl implements Con
     }
 
     @Override
-    public Response delete(final String schema) {
+    public void delete(final String schema) {
         logic.delete(schema);
-        return Response.noContent().build();
     }
 
     @Override
@@ -66,8 +65,7 @@ public class ConfigurationServiceImpl extends AbstractServiceImpl implements Con
     }
 
     @Override
-    public Response set(final AttrTO value) {
+    public void set(final AttrTO value) {
         logic.set(value);
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java
index 205b3e0..3424c5e 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.List;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.ConnInstanceHistoryConfTO;
 import org.apache.syncope.common.rest.api.service.ConnectorHistoryService;
 import org.apache.syncope.core.logic.ConnectorHistoryLogic;
@@ -38,15 +37,13 @@ public class ConnectorHistoryServiceImpl extends AbstractServiceImpl implements
     }
 
     @Override
-    public Response restore(final String key) {
+    public void restore(final String key) {
         logic.restore(key);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
index 082d89e..45da758 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
@@ -46,9 +46,8 @@ public class ConnectorServiceImpl extends AbstractServiceImpl implements Connect
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -79,20 +78,17 @@ public class ConnectorServiceImpl extends AbstractServiceImpl implements Connect
     }
 
     @Override
-    public Response update(final ConnInstanceTO connInstanceTO) {
+    public void update(final ConnInstanceTO connInstanceTO) {
         logic.update(connInstanceTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response check(final ConnInstanceTO connInstanceTO) {
+    public void check(final ConnInstanceTO connInstanceTO) {
         logic.check(connInstanceTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response reload() {
+    public void reload() {
         logic.reload();
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java
index 168c3cd..daa8aad 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java
@@ -54,15 +54,13 @@ public class DomainServiceImpl extends AbstractServiceImpl implements DomainServ
     }
 
     @Override
-    public Response update(final DomainTO anyTypeTO) {
+    public void update(final DomainTO anyTypeTO) {
         logic.update(anyTypeTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java
index dec464b..41e3bad 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java
@@ -54,15 +54,13 @@ public class DynRealmServiceImpl extends AbstractServiceImpl implements DynRealm
     }
 
     @Override
-    public Response update(final DynRealmTO roleTO) {
+    public void update(final DynRealmTO roleTO) {
         logic.update(roleTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java
index 4f8c2f4..a347dac 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java
@@ -21,7 +21,6 @@ package org.apache.syncope.core.rest.cxf.service;
 import java.text.ParseException;
 import java.util.List;
 import javax.ws.rs.BadRequestException;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.log.EventCategoryTO;
 import org.apache.syncope.common.lib.log.LogAppender;
 import org.apache.syncope.common.lib.log.LogStatementTO;
@@ -51,7 +50,7 @@ public class LoggerServiceImpl extends AbstractServiceImpl implements LoggerServ
     }
 
     @Override
-    public Response delete(final LoggerType type, final String name) {
+    public void delete(final LoggerType type, final String name) {
         switch (type) {
             case LOG:
                 logic.deleteLog(name);
@@ -68,7 +67,6 @@ public class LoggerServiceImpl extends AbstractServiceImpl implements LoggerServ
             default:
                 throw new BadRequestException();
         }
-        return Response.noContent().build();
     }
 
     @Override
@@ -101,7 +99,7 @@ public class LoggerServiceImpl extends AbstractServiceImpl implements LoggerServ
     }
 
     @Override
-    public Response update(final LoggerType type, final LoggerTO logger) {
+    public void update(final LoggerType type, final LoggerTO logger) {
         switch (type) {
             case LOG:
                 logic.setLogLevel(logger.getKey(), logger.getLevel().getLevel());
@@ -118,7 +116,6 @@ public class LoggerServiceImpl extends AbstractServiceImpl implements LoggerServ
             default:
                 throw new BadRequestException();
         }
-        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java
index ff5cb13..2c1a434 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java
@@ -61,9 +61,8 @@ public class MailTemplateServiceImpl extends AbstractServiceImpl implements Mail
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -77,10 +76,9 @@ public class MailTemplateServiceImpl extends AbstractServiceImpl implements Mail
     }
 
     @Override
-    public Response setFormat(final String key, final MailTemplateFormat format, final InputStream templateIn) {
+    public void setFormat(final String key, final MailTemplateFormat format, final InputStream templateIn) {
         try {
             logic.setFormat(key, format, IOUtils.toString(templateIn, StandardCharsets.UTF_8));
-            return Response.noContent().build();
         } catch (final IOException e) {
             LOG.error("While setting format {} for mail template {}", format, key, e);
             throw new InternalServerErrorException("Could not read entity", e);
@@ -88,8 +86,7 @@ public class MailTemplateServiceImpl extends AbstractServiceImpl implements Mail
     }
 
     @Override
-    public Response removeFormat(final String key, final MailTemplateFormat format) {
+    public void removeFormat(final String key, final MailTemplateFormat format) {
         logic.setFormat(key, format, null);
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java
index 9671f93..874f138 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java
@@ -56,15 +56,13 @@ public class NotificationServiceImpl extends AbstractServiceImpl implements Noti
     }
 
     @Override
-    public Response update(final NotificationTO notificationTO) {
+    public void update(final NotificationTO notificationTO) {
         logic.update(notificationTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -73,8 +71,7 @@ public class NotificationServiceImpl extends AbstractServiceImpl implements Noti
     }
 
     @Override
-    public Response actionJob(final JobAction action) {
+    public void actionJob(final JobAction action) {
         logic.actionJob(action);
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java
index c115ca6..2616163 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java
@@ -45,9 +45,8 @@ public class PolicyServiceImpl extends AbstractServiceImpl implements PolicyServ
     }
 
     @Override
-    public Response delete(final PolicyType type, final String key) {
+    public void delete(final PolicyType type, final String key) {
         logic.delete(type, key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -61,8 +60,7 @@ public class PolicyServiceImpl extends AbstractServiceImpl implements PolicyServ
     }
 
     @Override
-    public Response update(final PolicyType type, final PolicyTO policyTO) {
+    public void update(final PolicyType type, final PolicyTO policyTO) {
         logic.update(type, policyTO);
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java
index ffff1b3..1cdc1d4 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java
@@ -54,15 +54,13 @@ public class RelationshipTypeServiceImpl extends AbstractServiceImpl implements
     }
 
     @Override
-    public Response update(final RelationshipTypeTO anyTypeTO) {
+    public void update(final RelationshipTypeTO anyTypeTO) {
         logic.update(anyTypeTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
index 65e1b43..5a44cb0 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
@@ -54,9 +54,8 @@ public class ReportServiceImpl extends AbstractExecutableService implements Repo
     }
 
     @Override
-    public Response update(final ReportTO reportTO) {
+    public void update(final ReportTO reportTO) {
         logic.update(reportTO);
-        return Response.noContent().build();
     }
 
     @Override
@@ -82,8 +81,7 @@ public class ReportServiceImpl extends AbstractExecutableService implements Repo
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java
index 98dbc16..9fc47d0 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java
@@ -62,9 +62,8 @@ public class ReportTemplateServiceImpl extends AbstractServiceImpl implements Re
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -78,10 +77,9 @@ public class ReportTemplateServiceImpl extends AbstractServiceImpl implements Re
     }
 
     @Override
-    public Response setFormat(final String key, final ReportTemplateFormat format, final InputStream templateIn) {
+    public void setFormat(final String key, final ReportTemplateFormat format, final InputStream templateIn) {
         try {
             logic.setFormat(key, format, IOUtils.toString(templateIn, StandardCharsets.UTF_8.name()));
-            return Response.noContent().build();
         } catch (final IOException e) {
             LOG.error("While setting format {} for report template {}", format, key, e);
             throw new InternalServerErrorException("Could not read entity", e);
@@ -89,8 +87,7 @@ public class ReportTemplateServiceImpl extends AbstractServiceImpl implements Re
     }
 
     @Override
-    public Response removeFormat(final String key, final ReportTemplateFormat format) {
+    public void removeFormat(final String key, final ReportTemplateFormat format) {
         logic.setFormat(key, format, null);
-        return Response.noContent().build();
     }
 }


[3/4] syncope git commit: [SYNCOPE-1262] Prefer to properly return void but add @ApiResponse for 204

Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java
index ef5aead..b69b5be 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.List;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.ResourceHistoryConfTO;
 import org.apache.syncope.common.rest.api.service.ResourceHistoryService;
 import org.apache.syncope.core.logic.ResourceHistoryLogic;
@@ -38,15 +37,13 @@ public class ResourceHistoryServiceImpl extends AbstractServiceImpl implements R
     }
 
     @Override
-    public Response restore(final String key) {
+    public void restore(final String key) {
         logic.restore(key);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
index e3c9992..2b76dfc 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
@@ -72,27 +72,23 @@ public class ResourceServiceImpl extends AbstractServiceImpl implements Resource
     }
 
     @Override
-    public Response update(final ResourceTO resourceTO) {
+    public void update(final ResourceTO resourceTO) {
         logic.update(resourceTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response setLatestSyncToken(final String key, final String anyTypeKey) {
+    public void setLatestSyncToken(final String key, final String anyTypeKey) {
         logic.setLatestSyncToken(key, anyTypeKey);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response removeSyncToken(final String key, final String anyTypeKey) {
+    public void removeSyncToken(final String key, final String anyTypeKey) {
         logic.removeSyncToken(key, anyTypeKey);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -142,9 +138,8 @@ public class ResourceServiceImpl extends AbstractServiceImpl implements Resource
     }
 
     @Override
-    public Response check(final ResourceTO resourceTO) {
+    public void check(final ResourceTO resourceTO) {
         logic.check(resourceTO);
-        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java
index b31b4e1..6a0a75a 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java
@@ -61,15 +61,13 @@ public class RoleServiceImpl extends AbstractServiceImpl implements RoleService
     }
 
     @Override
-    public Response update(final RoleTO roleTO) {
+    public void update(final RoleTO roleTO) {
         logic.update(roleTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -83,10 +81,9 @@ public class RoleServiceImpl extends AbstractServiceImpl implements RoleService
     }
 
     @Override
-    public Response setConsoleLayoutInfo(final String key, final InputStream consoleLayoutIn) {
+    public void setConsoleLayoutInfo(final String key, final InputStream consoleLayoutIn) {
         try {
             logic.setConsoleLayoutInfo(key, IOUtils.toString(consoleLayoutIn, StandardCharsets.UTF_8.name()));
-            return Response.noContent().build();
         } catch (final IOException e) {
             LOG.error("While setting console layout info for role {}", key, e);
             throw new InternalServerErrorException("Could not read entity", e);
@@ -94,9 +91,8 @@ public class RoleServiceImpl extends AbstractServiceImpl implements RoleService
     }
 
     @Override
-    public Response removeConsoleLayoutInfo(final String key) {
+    public void removeConsoleLayoutInfo(final String key) {
         logic.setConsoleLayoutInfo(key, null);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
index f650839..5c74e41 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
@@ -47,9 +47,8 @@ public class SchemaServiceImpl extends AbstractServiceImpl implements SchemaServ
     }
 
     @Override
-    public Response delete(final SchemaType schemaType, final String key) {
+    public void delete(final SchemaType schemaType, final String key) {
         logic.delete(schemaType, key);
-        return Response.noContent().build();
     }
 
     @Override
@@ -63,8 +62,7 @@ public class SchemaServiceImpl extends AbstractServiceImpl implements SchemaServ
     }
 
     @Override
-    public Response update(final SchemaType schemaType, final SchemaTO schemaTO) {
+    public void update(final SchemaType schemaType, final SchemaTO schemaTO) {
         logic.update(schemaType, schemaTO);
-        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java
index fbfd00a..5dca503 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java
@@ -55,15 +55,13 @@ public class SecurityQuestionServiceImpl extends AbstractServiceImpl implements
     }
 
     @Override
-    public Response update(final SecurityQuestionTO securityQuestionTO) {
+    public void update(final SecurityQuestionTO securityQuestionTO) {
         logic.update(securityQuestionTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
index cd24751..6c3a10b 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
@@ -64,9 +64,8 @@ public class TaskServiceImpl extends AbstractExecutableService implements TaskSe
     }
 
     @Override
-    public Response delete(final TaskType type, final String key) {
+    public void delete(final TaskType type, final String key) {
         logic.delete(type, key);
-        return Response.noContent().build();
     }
 
     @SuppressWarnings("unchecked")
@@ -91,9 +90,8 @@ public class TaskServiceImpl extends AbstractExecutableService implements TaskSe
     }
 
     @Override
-    public Response update(final TaskType type, final SchedTaskTO taskTO) {
+    public void update(final TaskType type, final SchedTaskTO taskTO) {
         logic.updateSchedTask(type, taskTO);
-        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java
index 92b0144..82d9cbc 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java
@@ -96,7 +96,7 @@ public class UserSelfServiceImpl extends AbstractServiceImpl implements UserSelf
     }
 
     @Override
-    public Response requestPasswordReset(final String username, final String securityAnswer) {
+    public void requestPasswordReset(final String username, final String securityAnswer) {
         if (!syncopeLogic.isPwdResetAllowed()) {
             SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.DelegatedAdministration);
             sce.getElements().add("Password reset forbidden by configuration");
@@ -104,11 +104,10 @@ public class UserSelfServiceImpl extends AbstractServiceImpl implements UserSelf
         }
 
         logic.requestPasswordReset(username, securityAnswer);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response confirmPasswordReset(final String token, final String password) {
+    public void confirmPasswordReset(final String token, final String password) {
         if (!syncopeLogic.isPwdResetAllowed()) {
             SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.DelegatedAdministration);
             sce.getElements().add("Password reset forbidden by configuration");
@@ -116,7 +115,6 @@ public class UserSelfServiceImpl extends AbstractServiceImpl implements UserSelf
         }
 
         logic.confirmPasswordReset(token, password);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
index b67e5bb..2321e0a 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
@@ -66,20 +66,18 @@ public class WorkflowServiceImpl extends AbstractServiceImpl implements Workflow
     }
 
     @Override
-    public Response set(final String anyType, final String key, final String definition) {
+    public void set(final String anyType, final String key, final String definition) {
         WorkflowDefinitionFormat format =
                 messageContext.getHttpHeaders().getMediaType().equals(MediaType.APPLICATION_JSON_TYPE)
                 ? WorkflowDefinitionFormat.JSON
                 : WorkflowDefinitionFormat.XML;
 
         logic.importDefinition(anyType, key, format, definition);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String anyType, final String key) {
+    public void delete(final String anyType, final String key) {
         logic.delete(anyType, key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
----------------------------------------------------------------------
diff --git a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
index 9dd5bca..2d53b88 100644
--- a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
+++ b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
@@ -18,6 +18,8 @@
  */
 package org.apache.syncope.common.rest.api.service;
 
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
 import io.swagger.v3.oas.annotations.security.SecurityRequirement;
 import io.swagger.v3.oas.annotations.security.SecurityRequirements;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -31,7 +33,6 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.CamelMetrics;
 import org.apache.syncope.common.lib.to.CamelRouteTO;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
@@ -76,23 +77,24 @@ public interface CamelRouteService extends JAXRSService {
      *
      * @param anyTypeKind any type kind
      * @param route to be updated
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{anyTypeKind}/{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull @PathParam("anyTypeKind") AnyTypeKind anyTypeKind, @NotNull CamelRouteTO route);
+    void update(@NotNull @PathParam("anyTypeKind") AnyTypeKind anyTypeKind, @NotNull CamelRouteTO route);
 
     /**
      * Restart the underlying Apache Camel context.
-     *
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @POST
     @Path("restartContext")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response restartContext();
+    void restartContext();
 
     /**
      * Provides Camel metrics.

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
----------------------------------------------------------------------
diff --git a/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java b/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
index eb1db19..57b9242 100644
--- a/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
+++ b/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.List;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.CamelMetrics;
 import org.apache.syncope.common.lib.to.CamelRouteTO;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
@@ -45,15 +44,13 @@ public class CamelRouteServiceImpl extends AbstractServiceImpl implements CamelR
     }
 
     @Override
-    public Response update(final AnyTypeKind anyTypeKind, final CamelRouteTO route) {
+    public void update(final AnyTypeKind anyTypeKind, final CamelRouteTO route) {
         logic.update(anyTypeKind, route);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response restartContext() {
+    public void restartContext() {
         logic.restartContext();
-        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
index 90c79e2..3123808 100644
--- a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
+++ b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
@@ -18,6 +18,8 @@
  */
 package org.apache.syncope.common.rest.api.service;
 
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
 import io.swagger.v3.oas.annotations.security.SecurityRequirement;
 import io.swagger.v3.oas.annotations.security.SecurityRequirements;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -92,22 +94,24 @@ public interface SAML2IdPService extends JAXRSService {
      * Updates the SAML 2.0 Identity Provider with matching entityID.
      *
      * @param saml2IdpTO idp configuration to be stored
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response update(@NotNull SAML2IdPTO saml2IdpTO);
+    void update(@NotNull SAML2IdPTO saml2IdpTO);
 
     /**
      * Deletes the SAML 2.0 Identity Provider with matching entityID.
      *
      * @param key SAML 2.0 Identity Provider's entityID
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @DELETE
     @Path("{key}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response delete(@PathParam("key") String key);
+    void delete(@PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
index 0718538..3cfbbc2 100644
--- a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
+++ b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
@@ -18,6 +18,8 @@
  */
 package org.apache.syncope.common.rest.api.service;
 
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
 import io.swagger.v3.oas.annotations.security.SecurityRequirement;
 import io.swagger.v3.oas.annotations.security.SecurityRequirements;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -95,11 +97,12 @@ public interface SAML2SPService extends JAXRSService {
      * Validates the received SAML 2.0 logout response.
      *
      * @param response SAML response and relay state
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @POST
     @Path("logoutResponse")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response validateLogoutResponse(SAML2ReceivedResponseTO response);
+    void validateLogoutResponse(SAML2ReceivedResponseTO response);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java
index bd2f5f9..ebda30d 100644
--- a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java
+++ b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java
@@ -61,15 +61,13 @@ public class SAML2IdPServiceImpl extends AbstractServiceImpl implements SAML2IdP
     }
 
     @Override
-    public Response update(final SAML2IdPTO saml2IdpTO) {
+    public void update(final SAML2IdPTO saml2IdpTO) {
         logic.update(saml2IdpTO);
-        return Response.noContent().build();
     }
 
     @Override
-    public Response delete(final String key) {
+    public void delete(final String key) {
         logic.delete(key);
-        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java
index 93cd87b..3b8c847 100644
--- a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java
+++ b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java
@@ -47,9 +47,7 @@ public class SAML2SPServiceImpl extends AbstractServiceImpl implements SAML2SPSe
     }
 
     @Override
-    public SAML2RequestTO createLoginRequest(
-            final String spEntityID, final String idpEntityID) {
-
+    public SAML2RequestTO createLoginRequest(final String spEntityID, final String idpEntityID) {
         return logic.createLoginRequest(StringUtils.appendIfMissing(spEntityID, "/"), idpEntityID);
     }
 
@@ -66,9 +64,8 @@ public class SAML2SPServiceImpl extends AbstractServiceImpl implements SAML2SPSe
     }
 
     @Override
-    public Response validateLogoutResponse(final SAML2ReceivedResponseTO response) {
+    public void validateLogoutResponse(final SAML2ReceivedResponseTO response) {
         logic.validateLogoutResponse(getJWTToken(), response);
-        return Response.noContent().build();
     }
 
     private String getJWTToken() {

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java b/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
index 7bdc050..353ea34 100644
--- a/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
+++ b/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
@@ -18,6 +18,8 @@
  */
 package org.apache.syncope.common.rest.api.service;
 
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
 import io.swagger.v3.oas.annotations.security.SecurityRequirement;
 import io.swagger.v3.oas.annotations.security.SecurityRequirements;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -28,7 +30,6 @@ import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.scim.SCIMConf;
 
 /**
@@ -54,10 +55,11 @@ public interface SCIMConfService extends JAXRSService {
      * Sets SCIM configuration.
      *
      * @param conf SCIM configuration
-     * @return an empty response if operation was successful
      */
+    @ApiResponses(
+            @ApiResponse(responseCode = "204", description = "Operation was successful"))
     @PUT
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    Response set(@NotNull SCIMConf conf);
+    void set(@NotNull SCIMConf conf);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e725c72b/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java b/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java
index 1d14701..223aca7 100644
--- a/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java
+++ b/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java
@@ -18,7 +18,6 @@
  */
 package org.apache.syncope.core.rest.cxf.service;
 
-import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.scim.SCIMConf;
 import org.apache.syncope.common.rest.api.service.SCIMConfService;
 import org.apache.syncope.core.logic.scim.SCIMConfManager;
@@ -35,9 +34,8 @@ public class SCIMConfServiceImpl extends AbstractServiceImpl implements SCIMConf
     }
 
     @Override
-    public Response set(final SCIMConf conf) {
+    public void set(final SCIMConf conf) {
         manager.set(conf);
-        return Response.noContent().build();
     }
 
 }