From 85f485df4cc5e0120a66705297bb2015c09110fe Mon Sep 17 00:00:00 2001 From: Madhawa Date: Thu, 12 May 2016 22:19:17 +0530 Subject: [PATCH] Few changes to interfaces with swagger annotations --- .../device/mgt/jaxrs/api/DeviceNotification.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/DeviceNotification.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/DeviceNotification.java index f17e584051..e01110ff77 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/DeviceNotification.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/DeviceNotification.java @@ -89,10 +89,9 @@ public interface DeviceNotification { httpMethod = "PUT", 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. Update the device notification status using this REST API", - response = ResponsePayload.class) + + "change from NEW to CHECKED. Update the device notification status using this REST API") @ApiResponses(value = { - @ApiResponse(code = 200, message = "Notification status updated successfully"), + @ApiResponse(code = 201, message = "Notification status updated successfully"), @ApiResponse(code = 500, message = "Error occurred while updating notification status") }) Response updateNotificationStatus( @ApiParam(name = "id", value = "Provide the ID of the notification" @@ -107,10 +106,9 @@ public interface DeviceNotification { produces = MediaType.APPLICATION_JSON + ", " + MediaType.APPLICATION_XML, httpMethod = "POST", value = "Sending a Device Notification", - notes = "Notify users on device operation failures and other information using this REST API", - response = ResponsePayload.class) + notes = "Notify users on device operation failures and other information using this REST API") @ApiResponses(value = { - @ApiResponse(code = 200, message = "NNotification has added successfully"), + @ApiResponse(code = 201, message = "NNotification has added successfully"), @ApiResponse(code = 500, message = "Error occurred while updating notification status") }) Response addNotification(Notification notification);