fix swagger syntax issues

license
inoshperera 2 years ago
parent 223637c887
commit 259795a274

@ -26,14 +26,14 @@ import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
import java.util.List;
@ApiModel(value = "List of activities", description = "This contains a set of activities that matches a given"
@ApiModel(value = "ListOfActivities", description = "This contains a set of activities that " +
"matches a given"
+ " criteria as a collection")
public class ActivityList extends BasePaginatedResult {
private List<Activity> activities;
@ApiModelProperty(value = "Returns the list of activities that match the offset and limit parameter values"
+ " that were specified.")
@ApiModelProperty(value = "List of activity Ids")
@JsonProperty("activities")
public List<Activity> getList() {
return activities;

@ -17,9 +17,25 @@
*/
package org.wso2.carbon.device.mgt.jaxrs.beans;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel(value = "DeviceTypeVersionWrapper", description = "Provides details about the device " +
"type version and statues")
public class DeviceTypeVersionWrapper {
@ApiModelProperty(
name = "versionName",
value = "Sub version name of the device type (example OS version)",
required = true,
example = "8.1")
String versionName;
@ApiModelProperty(
name = "versionStatus",
value = "ACTIVE or INACTIVE status of this version",
required = true,
example = "ACTIVE")
String versionStatus;
public String getVersionName() {

@ -24,7 +24,7 @@ import io.swagger.annotations.ApiModelProperty;
import java.util.List;
@ApiModel(value = "Role List")
@ApiModel(value = "RoleList")
public class RoleList extends BasePaginatedResult {
private List<String> roles;

@ -18,12 +18,26 @@
package org.wso2.carbon.device.mgt.jaxrs.common;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Arrays;
import java.util.List;
@ApiModel(value = "ActivityIdList", description = "List of activity IDs")
public class ActivityIdList {
@ApiModelProperty(
name = "operationId",
value = "operation Id",
example = "1")
private String ids;
@ApiModelProperty(
name = "activityId",
value = "Activity identifiers",
required = true,
example = "ACTIVITY_1, ACTIVITY_2")
private List<String> idList;
public ActivityIdList(String ids) {

@ -37,6 +37,7 @@ import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse;
import org.wso2.carbon.device.mgt.jaxrs.common.ActivityIdList;
import org.wso2.carbon.device.mgt.jaxrs.util.Constants;
import javax.validation.Valid;
import javax.validation.constraints.Size;
import javax.ws.rs.Consumes;
import javax.ws.rs.DefaultValue;
@ -173,7 +174,8 @@ public interface ActivityInfoProviderService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:get-activity")
})
}
},
nickname = "getActivitiesByActivityIdList"
)
@ApiResponses(value = {
@ApiResponse(
@ -220,7 +222,7 @@ public interface ActivityInfoProviderService {
value = "Comma separated activity/operation IDs",
required = true,
defaultValue = "ACTIVITY_0")
@QueryParam("ids") ActivityIdList activityIdList);
ActivityIdList activityIdList);
@GET
@ -322,7 +324,8 @@ public interface ActivityInfoProviderService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:get-activity")
})
}
},
nickname = "getActivitiesByOperationCode"
)
@ApiResponses(value = {
@ApiResponse(
@ -385,7 +388,8 @@ public interface ActivityInfoProviderService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:get-activity")
})
}
},
nickname = "getActivitiesWithFilters"
)
@ApiResponses(value = {
@ApiResponse(

@ -264,7 +264,8 @@ public interface DeviceAgentService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:device:publish-event")
})
}
},
nickname = "publishEventFromAgent"
)
@ApiResponses(
value = {
@ -329,7 +330,8 @@ public interface DeviceAgentService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:device:publish-event")
})
}
},
nickname = "publishEventsByTypeAndDevice"
)
@ApiResponses(
value = {

@ -401,21 +401,25 @@ public interface DeviceManagementService {
name = "tenantDomain",
value = "The tenant domain.",
required = false)
@QueryParam("tenantDomain")
String tenantDomain,
@ApiParam(
name = "startDate",
value = "The start date.",
required = false)
@QueryParam("startDate")
Timestamp startDate,
@ApiParam(
name = "endDate",
value = "The end date.",
required = false)
@QueryParam("endDate")
Timestamp endDate,
@ApiParam(
name = "generateBill",
value = "The generate bill boolean.",
required = false)
@QueryParam("generateBill")
boolean generateBill,
@ApiParam(
name = "offset",
@ -492,21 +496,25 @@ public interface DeviceManagementService {
name = "tenantDomain",
value = "The tenant domain.",
required = false)
@QueryParam("tenantDomain")
String tenantDomain,
@ApiParam(
name = "startDate",
value = "The start date.",
required = false)
@QueryParam("startDate")
Timestamp startDate,
@ApiParam(
name = "endDate",
value = "The end date.",
required = false)
@QueryParam("endDate")
Timestamp endDate,
@ApiParam(
name = "generateBill",
value = "The generate bill boolean.",
required = false)
@QueryParam("generateBill")
boolean generateBill);
@GET
@ -862,7 +870,7 @@ public interface DeviceManagementService {
})
Response getDeviceLocationInfo(
@ApiParam(
name = "device-type",
name = "deviceType",
value = "The device type, such as ios, android, or windows.",
required = true)
@PathParam("deviceType")
@ -1286,14 +1294,14 @@ public interface DeviceManagementService {
required = true)
Device device,
@ApiParam(
name = "device-type",
name = "deviceType",
value = "The device type, such as ios, android, or windows.",
required = true)
@PathParam("deviceType")
@Size(max = 45)
String deviceType,
@ApiParam(
name = "device-id",
name = "deviceId",
value = "The device identifier of the device.",
required = true)
@PathParam("deviceId")
@ -1315,7 +1323,8 @@ public interface DeviceManagementService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:devices:delete")
})
}
},
nickname = "deleteDeviceByTypeAndId"
)
@ApiResponses(
value = {
@ -1356,14 +1365,14 @@ public interface DeviceManagementService {
})
Response deleteDevice(
@ApiParam(
name = "device-type",
name = "deviceType",
value = "The device type, such as ios, android, or windows.",
required = true)
@PathParam("deviceType")
@Size(max = 45)
String deviceType,
@ApiParam(
name = "device-id",
name = "deviceId",
value = "The device identifier of the device.",
required = true)
@PathParam("deviceId")
@ -2546,7 +2555,7 @@ public interface DeviceManagementService {
})
Response getPolicyCompliance(
@ApiParam(
name = "compliance-status",
name = "complianceStatus",
value = "Compliance status for devices. If true, devices which are compliant with policies. " +
"If false, devices which are not compliant",
required = true)
@ -2587,7 +2596,7 @@ public interface DeviceManagementService {
@ApiOperation(
produces = MediaType.APPLICATION_JSON,
httpMethod = "GET",
value = "Getting Policy Compliance Status of all devices",
value = "Getting non compliant policy features",
notes = "A policy is enforced on the devices that register with Entgra IoTS. " +
"The server checks if the settings in the device comply with the policy that is enforced on the device using this REST API.",
tags = "Device Management",
@ -2665,7 +2674,7 @@ public interface DeviceManagementService {
})
Response getApplications(
@ApiParam(
name = "device-type",
name = "deviceType",
value = "Device type (platform) of the application",
required = true)
@PathParam("deviceType")
@ -2722,7 +2731,7 @@ public interface DeviceManagementService {
})
Response getAppVersions(
@ApiParam(
name = "package-name",
name = "packageName",
value = "The package name of the app.",
required = true)
@PathParam("packageName")
@ -2771,7 +2780,7 @@ public interface DeviceManagementService {
})
Response updateOperationStatus(
@ApiParam(
name = "device-type",
name = "deviceType",
value = "The device type, such as ios, android, or windows.")
@PathParam("deviceType") String deviceType,
@ApiParam(
@ -2860,17 +2869,20 @@ public interface DeviceManagementService {
)
Response getDefaultToken(
@ApiParam(
name = "client ID",
name = "clientId",
value = "Client Id.",
required = true)
@PathParam("clientId")
String clientId,
@ApiParam(
name = "client secret",
name = "clientSecret",
value = "Client Secret",
required = true)
@PathParam("clientSecret")
String clientSecret,
@ApiParam(
name = "scopes",
value = "Oauth scopes")
@QueryParam("scopes") String scopes
);
}

@ -131,7 +131,8 @@ public interface DeviceTypeManagementService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:device-types:types")
})
}
},
nickname = "getAllDeviceTypesPaginated"
)
@ApiResponses(
value = {
@ -212,7 +213,8 @@ public interface DeviceTypeManagementService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:device-types:types")
})
}
},
nickname = "getDeviceTypeByDeviceTypeName"
)
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK. \n Successfully fetched the device type.",

@ -419,7 +419,7 @@ public interface GeoLocationBasedService {
required = true)
@PathParam("deviceId") String deviceId,
@ApiParam(
name = "device-type",
name = "deviceType",
value = "The device type, such as ios, android, or windows.",
required = true)
@PathParam("deviceType")
@ -538,7 +538,7 @@ public interface GeoLocationBasedService {
required = true)
@PathParam("deviceId") String deviceId,
@ApiParam(
name = "device-type",
name = "deviceType",
value = "The device type, such as ios, android, or windows.",
required = true)
@PathParam("deviceType")
@ -655,7 +655,7 @@ public interface GeoLocationBasedService {
required = true)
@PathParam("deviceId") String deviceId,
@ApiParam(
name = "device-type",
name = "deviceType",
value = "The device type, such as ios, android. or windows.",
required = true)
@PathParam("deviceType")
@ -1022,7 +1022,8 @@ public interface GeoLocationBasedService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:geo-service:geo-fence")
})
}
},
nickname = "getGeofenceByFenceId"
)
@ApiResponses(value = {
@ApiResponse(

@ -213,7 +213,8 @@ public interface GroupManagementService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:groups:groups")
})
}
},
nickname = "getGroupsWithFilter"
)
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK. \n Successfully fetched the list of device groups.",
@ -287,7 +288,8 @@ public interface GroupManagementService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:groups:groups")
})
}
},
nickname = "getGroupsWithHierarchyNonAdmin"
)
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK. \n Successfully fetched the list of device hierarchical groups.",
@ -367,7 +369,8 @@ public interface GroupManagementService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:groups:count")
})
}
},
nickname = "getGroupCountNonAdmin"
)
@ApiResponses(value = {
@ -411,7 +414,8 @@ public interface GroupManagementService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:groups:add")
})
}
},
nickname = "createGroupByGroupObject"
)
@ApiResponses(
value = {
@ -545,7 +549,8 @@ public interface GroupManagementService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:groups:groups-view")
})
}
},
nickname = "getGroupByGroupNameFilter"
)
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK. \n Successfully fetched the device group.",
@ -760,7 +765,7 @@ public interface GroupManagementService {
response = ErrorResponse.class)
})
Response manageGroupSharing(@ApiParam(
name = "groupName",
name = "groupId",
value = "Name of the group to be shared or unshared.",
required = true)
@PathParam("groupId") int groupId,
@ -1130,7 +1135,8 @@ public interface GroupManagementService {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:groups:device")
})
}
},
nickname = "getGroupsNonAdmin"
)
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK.",

@ -785,7 +785,8 @@ public interface PolicyManagementService {
httpMethod = "GET",
value = "Getting Details of Policies",
responseContainer = "List",
notes = "Retrieve the details of all the policies filtered by policy type in WSO2 EMM.",
notes = "Retrieve the details of all the policies filtered by policy type in Entgra " +
"EMM.",
response = Policy.class,
tags = "Device Policy Management",
extensions = {

@ -122,7 +122,7 @@ public interface RemoteSessionService {
required = true)
@PathParam("deviceId") String deviceId,
@ApiParam(
name = "device-type",
name = "deviceType",
value = "The device type, such as ios, android, or windows.",
required = true)
@PathParam("deviceType")

@ -471,10 +471,10 @@ public interface ReportManagementService {
})
Response getAppNotInstalledDevices(
@ApiParam(
name = "device-type",
name = "deviceType",
value = "The device type name, such as ios, android, windows, or fire-alarm.",
required = true)
@PathParam("device-type")
@PathParam("deviceType")
String deviceType,
@ApiParam(
name = "package-name",

@ -386,7 +386,7 @@ public interface DeviceTypeManagementAdminService {
@POST
@Path("/versions")
@Path("/{deviceTypeName}/versions")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@ApiOperation(

Loading…
Cancel
Save