From 5ff23bec023ea778b27922354036b239bbc37c98 Mon Sep 17 00:00:00 2001 From: Yohan Avishke Date: Fri, 20 Dec 2019 11:09:21 +0530 Subject: [PATCH] Update api paths with a leading forward slash --- .../api/admin/DeviceTypeManagementAdminService.java | 6 +++--- .../impl/admin/DeviceTypeManagementAdminServiceImpl.java | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceTypeManagementAdminService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceTypeManagementAdminService.java index 22432abe94..355f40fea0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceTypeManagementAdminService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceTypeManagementAdminService.java @@ -487,7 +487,7 @@ public interface DeviceTypeManagementAdminService { @PUT @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) - @Path("{deviceTypeName}/versions") + @Path("/{deviceTypeName}/versions") @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "PUT", @@ -541,7 +541,7 @@ public interface DeviceTypeManagementAdminService { @DELETE - @Path("{deviceTypeName}/versions/{version}") + @Path("/{deviceTypeName}/versions/{version}") @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "DELETE", @@ -594,7 +594,7 @@ public interface DeviceTypeManagementAdminService { @DELETE - @Path("{deviceTypeName}/delete") + @Path("/{deviceTypeName}/delete") @ApiOperation( httpMethod = "DELETE", value = "Delete device type.", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceTypeManagementAdminServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceTypeManagementAdminServiceImpl.java index 909f998d52..0ced60caf0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceTypeManagementAdminServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceTypeManagementAdminServiceImpl.java @@ -188,7 +188,7 @@ public class DeviceTypeManagementAdminServiceImpl implements DeviceTypeManagemen @Override @POST - @Path("{deviceTypeName}/versions") + @Path("/{deviceTypeName}/versions") public Response addDeviceTypeVersion(@PathParam("deviceTypeName") String deviceTypeName, DeviceTypeVersionWrapper versionWrapper) { if (versionWrapper != null && deviceTypeName != null && !deviceTypeName.isEmpty() @@ -245,7 +245,7 @@ public class DeviceTypeManagementAdminServiceImpl implements DeviceTypeManagemen @Override @PUT - @Path("{deviceTypeName}/versions") + @Path("/{deviceTypeName}/versions") public Response updateDeviceTypeVersion(@PathParam("deviceTypeName") String deviceTypeName, DeviceTypeVersionWrapper deviceTypeVersion) { if (deviceTypeVersion != null && deviceTypeVersion.getVersionName() == null || deviceTypeVersion @@ -285,7 +285,7 @@ public class DeviceTypeManagementAdminServiceImpl implements DeviceTypeManagemen @Override @DELETE - @Path("{deviceTypeName}/versions/{version}") + @Path("/{deviceTypeName}/versions/{version}") public Response deleteDeviceTypeVersion(@PathParam("deviceTypeName") String deviceTypeName, @PathParam("version") String version) { if (version == null || version.isEmpty()) { @@ -320,7 +320,7 @@ public class DeviceTypeManagementAdminServiceImpl implements DeviceTypeManagemen @Override @DELETE - @Path("{deviceTypeName}/delete") + @Path("/{deviceTypeName}/delete") public Response deleteDeviceType(@PathParam("deviceTypeName") String deviceTypeName) { try { DeviceManagementProviderService deviceManagementProviderService =