From b45d11bfdc872cd3a11c680bb876f9dea9461eac Mon Sep 17 00:00:00 2001 From: lasanthaDLPDS Date: Tue, 20 Mar 2018 09:54:24 +0530 Subject: [PATCH] Fix issues in swagger definition --- .../publisher/api/services/ApplicationManagementAPI.java | 7 +++---- .../api/services/impl/ApplicationManagementAPIImpl.java | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementAPI.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementAPI.java index 80629b310b7..c22132d5131 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementAPI.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementAPI.java @@ -260,10 +260,9 @@ public interface ApplicationManagementAPI { message = "OK. \n Successfully created an application.", response = Application.class), @ApiResponse( - code = 304, - message = "Not Modified. \n " + - "Empty body because the client already has the latest version of the requested " - + "resource."), + code = 400, + message = "Bad Request. \n " + + "Application creating payload contains unacceptable or vulnerable data"), @ApiResponse( code = 500, message = "Internal Server Error. \n Error occurred while getting the application list.", diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementAPIImpl.java index a96b4087198..6ecd44cba76 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementAPIImpl.java @@ -98,8 +98,6 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI { } return Response.status(Response.Status.OK).entity(application).build(); - } catch (NotFoundException e) { - return Response.status(Response.Status.NOT_FOUND).build(); } catch (ApplicationManagementException e) { log.error("Error occurred while getting application with the uuid " + appType, e); return APIUtil.getResponse(e, Response.Status.INTERNAL_SERVER_ERROR);