mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Adding more improvements to swagger annotations
This commit is contained in:
parent
479acf3b45
commit
44aa3a93a9
@ -42,7 +42,7 @@ public interface DeviceManagementAdminService {
|
|||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
consumes = MediaType.APPLICATION_JSON,
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "POST",
|
httpMethod = "POST",
|
||||||
value = "Adding a Device Lock on Android Devices",
|
value = "Adds a Device Lock on Android Devices",
|
||||||
notes = "Using this API you have the option of hard locking an Android device, where the Administrator " +
|
notes = "Using this API you have the option of hard locking an Android device, where the Administrator " +
|
||||||
"permanently locks the device or screen locking an Android device"
|
"permanently locks the device or screen locking an Android device"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -108,7 +108,7 @@ public interface DeviceManagementService {
|
|||||||
@ResponseHeader(name = "Location", description = "URL of the device enrolled")}),
|
@ResponseHeader(name = "Location", description = "URL of the device enrolled")}),
|
||||||
@ApiResponse(code = 400, message = "Bad Request. \n Invalid request or validation error."),
|
@ApiResponse(code = 400, message = "Bad Request. \n Invalid request or validation error."),
|
||||||
@ApiResponse(code = 500, message = "Internal Server Error. \n " +
|
@ApiResponse(code = 500, message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while enrolling the device."),
|
"Server error occurred while enrolling the device.")
|
||||||
})
|
})
|
||||||
Response enrollDevice(@ApiParam(name = "device", value = "Device Information to be enroll") Device device);
|
Response enrollDevice(@ApiParam(name = "device", value = "Device Information to be enroll") Device device);
|
||||||
|
|
||||||
@ -144,17 +144,25 @@ public interface DeviceManagementService {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "OK. \n Device enrollment has been updated successfully",
|
@ApiResponse(code = 200, message = "OK. \n Device enrollment has been updated successfully",
|
||||||
responseHeaders = {
|
responseHeaders = {
|
||||||
@ResponseHeader(name = "Location", description = "The URL of the updated device."),
|
@ResponseHeader(name = "Content-Location", description = "The URL of the updated device."),
|
||||||
@ResponseHeader(name = "Content-Type", description = "The content type of the body"),
|
@ResponseHeader(name = "Content-Type", description = "The content type of the body"),
|
||||||
@ResponseHeader(name = "ETag", description = "Entity Tag of the response resource.\n" +
|
@ResponseHeader(name = "ETag", description = "Entity Tag of the response resource.\n" +
|
||||||
"Used by caches, or in conditional requests."),
|
"Used by caches, or in conditional requests."),
|
||||||
@ResponseHeader(name = "Last-Modified",
|
@ResponseHeader(name = "Last-Modified",
|
||||||
description = "Date and time the resource has been modified the last time.\n" +
|
description = "Date and time the resource has been modified the last time.\n" +
|
||||||
"Used by caches, or in conditional requests.")}),
|
"Used by caches, or in conditional requests.")}),
|
||||||
@ApiResponse(code = 204, message = "No Content. \n Enrollment of the device has not been updated"),
|
@ApiResponse(
|
||||||
@ApiResponse(code = 400, message = "Bad Request. \n Invalid request or validation error."),
|
code = 204,
|
||||||
@ApiResponse(code = 404, message = "Not Found. \n Resource to be deleted does not exist."),
|
message = "No Content. \n Enrollment of the device has not been updated"),
|
||||||
@ApiResponse(code = 500, message = "Internal Server Error. \n " +
|
@ApiResponse(
|
||||||
|
code = 400,
|
||||||
|
message = "Bad Request. \n Invalid request or validation error."),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 404,
|
||||||
|
message = "Not Found. \n Resource to be deleted does not exist."),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 500,
|
||||||
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while modifying the current enrollment of the device.")
|
"Server error occurred while modifying the current enrollment of the device.")
|
||||||
})
|
})
|
||||||
Response modifyEnrollment(@ApiParam(name = "id", value = "Device Identifier") @PathParam("id") String id,
|
Response modifyEnrollment(@ApiParam(name = "id", value = "Device Identifier") @PathParam("id") String id,
|
||||||
|
|||||||
@ -18,10 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.wso2.carbon.mdm.services.android.services;
|
package org.wso2.carbon.mdm.services.android.services;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.*;
|
||||||
import io.swagger.annotations.ApiParam;
|
|
||||||
import io.swagger.annotations.ApiResponse;
|
|
||||||
import io.swagger.annotations.ApiResponses;
|
|
||||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
|
||||||
import org.wso2.carbon.mdm.services.android.exception.AndroidAgentException;
|
import org.wso2.carbon.mdm.services.android.exception.AndroidAgentException;
|
||||||
|
|
||||||
@ -29,6 +26,8 @@ import javax.ws.rs.*;
|
|||||||
import javax.ws.rs.core.MediaType;
|
import javax.ws.rs.core.MediaType;
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
|
|
||||||
|
@Api(value = "Android Configuration Management API", description = "This API carries all resource associated with " +
|
||||||
|
"manipulating the general configurations of Android platform")
|
||||||
@Path("/configuration")
|
@Path("/configuration")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@ -69,7 +68,7 @@ public interface DeviceTypeConfigurationService {
|
|||||||
notes = "Update the Android platform configurations using this REST API"
|
notes = "Update the Android platform configurations using this REST API"
|
||||||
)
|
)
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "Created"),
|
@ApiResponse(code = 200, message = "OK. \n Platform configuration has successfully been updated"),
|
||||||
@ApiResponse(code = 500, message = "Error occurred while modifying configuration settings of " +
|
@ApiResponse(code = 500, message = "Error occurred while modifying configuration settings of " +
|
||||||
"Android platform")
|
"Android platform")
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user