From c14047f913ae3fa81872e26c6588b4bf53e66933 Mon Sep 17 00:00:00 2001 From: inoshperera Date: Tue, 27 Sep 2022 07:13:46 +0530 Subject: [PATCH] Fix issues in the swagger related to URLs --- .../wso2/carbon/device/mgt/jaxrs/beans/PermissionList.java | 2 +- .../org/wso2/carbon/device/mgt/jaxrs/beans/UserStoreList.java | 2 +- .../device/mgt/jaxrs/service/api/DeviceManagementService.java | 3 ++- .../device/mgt/jaxrs/service/api/PolicyManagementService.java | 3 ++- .../device/mgt/jaxrs/service/api/RemoteSessionService.java | 2 +- .../device/mgt/jaxrs/service/api/ReportManagementService.java | 4 ++-- .../device/mgt/jaxrs/service/api/UserManagementService.java | 3 ++- 7 files changed, 11 insertions(+), 8 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/PermissionList.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/PermissionList.java index 9ec30f2eba..19747441f0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/PermissionList.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/PermissionList.java @@ -24,7 +24,7 @@ import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; import java.util.List; -@ApiModel(value = "Permission List") +@ApiModel(value = "PermissionList") public class PermissionList implements Serializable { private List permissions; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/UserStoreList.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/UserStoreList.java index b33feb8b97..9b0efa5aa2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/UserStoreList.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/UserStoreList.java @@ -24,7 +24,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.List; -@ApiModel(value = "User Store List") +@ApiModel(value = "UserStoreList") public class UserStoreList extends BasePaginatedResult { private List userStores; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java index c1fcbd1965..335c75f9bf 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java @@ -1035,7 +1035,8 @@ public interface DeviceManagementService { @Extension(properties = { @ExtensionProperty(name = Constants.SCOPE, value = "perm:devices:view") }) - } + }, + nickname = "isEnrolledByType" ) @ApiResponses( value = { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java index 9960b3cbc7..fc04b0bb61 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java @@ -793,7 +793,8 @@ public interface PolicyManagementService { @Extension(properties = { @ExtensionProperty(name = Constants.SCOPE, value = "perm:policies:get-details") }) - } + }, + nickname = "getPoliciesFilteredByType" ) @ApiResponses( value = { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RemoteSessionService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RemoteSessionService.java index cc8f2b5a1e..370ff2d08e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RemoteSessionService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RemoteSessionService.java @@ -74,7 +74,7 @@ public interface RemoteSessionService { * Retrieve Analytics for the device type */ @GET - @Path("connection/{deviceType}/{deviceId}") + @Path("connect/{deviceType}/{deviceId}") @ApiOperation( consumes = "application/json", produces = "application/json", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ReportManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ReportManagementService.java index 526e6967af..cbec6b47c9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ReportManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ReportManagementService.java @@ -471,10 +471,10 @@ public interface ReportManagementService { }) Response getAppNotInstalledDevices( @ApiParam( - name = "deviceType", + name = "device-type", value = "The device type name, such as ios, android, windows, or fire-alarm.", required = true) - @PathParam("deviceType") + @PathParam("device-type") String deviceType, @ApiParam( name = "package-name", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/UserManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/UserManagementService.java index e557ff7b43..17508e195e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/UserManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/UserManagementService.java @@ -591,7 +591,8 @@ public interface UserManagementService { @Extension(properties = { @ExtensionProperty(name = Constants.SCOPE, value = "perm:users:user-details") }) - } + }, + nickname = "getUsersByFilter" ) @ApiResponses(value = { @ApiResponse(