From 2136ebbeee7a5ca20e207bbc5e685570e509166a Mon Sep 17 00:00:00 2001 From: madhawap Date: Mon, 4 Jul 2016 13:38:32 +0530 Subject: [PATCH] changes to 'updateNotificationStatus' swagger annotations --- .../api/NotificationManagementService.java | 33 ++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/NotificationManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/NotificationManagementService.java index 669f7aace0..47ab30198c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/NotificationManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/NotificationManagementService.java @@ -125,13 +125,38 @@ public interface NotificationManagementService { int limit); @PUT - @Path("{id}/{status}") + @Path("{id}/mark-checked") @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "PUT", - value = "", - notes = "", + value = "Updating the Device Notification Status", + notes = "When a user has read the the device notification the device notification status must " + + "change from NEW to CHECKED. This API is used to update device notification status.", tags = "Device Notification Management") + @ApiResponses( + value = { + @ApiResponse( + code = 200, + message = "OK", + response = Notification.class), + @ApiResponse( + code = 200, + message = "Notification updated successfully. But the retrial of the updated " + + "notification failed."), + @ApiResponse( + code = 500, + message = "Error occurred while updating notification status.") + } + ) + @Permission( + scope = "", + permissions = { "" } + ) Response updateNotificationStatus( - @PathParam("id") int id); + @ApiParam( + name = "id", + value = "Notification ID.", + required = true) + @PathParam("id") + int id); }