From add8570f65ee0173effab2f87a793160b43e94fd Mon Sep 17 00:00:00 2001 From: shamalka Date: Mon, 22 Jun 2020 15:33:25 +0530 Subject: [PATCH] Fix role delete --- .../device/mgt/jaxrs/service/api/RoleManagementService.java | 4 ++-- .../mgt/jaxrs/service/impl/RoleManagementServiceImpl.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java index bce387f2bfa..ebc4c49984a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java @@ -611,9 +611,9 @@ public interface RoleManagementService { @DELETE @Path("/{roleName}") + @Consumes(MediaType.WILDCARD) @ApiOperation( - consumes = MediaType.APPLICATION_JSON, - produces = MediaType.APPLICATION_JSON, + consumes = MediaType.WILDCARD, httpMethod = "DELETE", value = "Deleting a Role", notes = "Roles become obsolete over time due to various reasons. In a situation where your " + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/RoleManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/RoleManagementServiceImpl.java index 33ef151a4e6..7bedb0f8902 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/RoleManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/RoleManagementServiceImpl.java @@ -537,6 +537,7 @@ public class RoleManagementServiceImpl implements RoleManagementService { @DELETE @Path("/{roleName}") + @Consumes(MediaType.WILDCARD) @Override public Response deleteRole(@PathParam("roleName") String roleName, @QueryParam("user-store") String userStoreName) { if (userStoreName != null && !userStoreName.isEmpty()) {