From 7235f84c3af992021913aea614e27339738e4740 Mon Sep 17 00:00:00 2001 From: inoshperera Date: Wed, 28 Sep 2022 16:20:48 +0530 Subject: [PATCH] Fixes app management related swaggers --- .../mgt/api/services/ArtifactDownloadAPI.java | 2 +- .../src/main/webapp/WEB-INF/cxf-servlet.xml | 4 ++-- .../ApplicationManagementPublisherAPI.java | 22 ++++++++++--------- .../api/services/SPApplicationService.java | 9 +++++--- .../src/main/webapp/WEB-INF/cxf-servlet.xml | 4 ++-- .../api/services/ReviewManagementAPI.java | 3 ++- .../services/SubscriptionManagementAPI.java | 13 ++++++----- .../src/main/webapp/WEB-INF/cxf-servlet.xml | 2 +- 8 files changed, 33 insertions(+), 26 deletions(-) diff --git a/components/application-mgt/io.entgra.application.mgt.api/src/main/java/io/entgra/application/mgt/api/services/ArtifactDownloadAPI.java b/components/application-mgt/io.entgra.application.mgt.api/src/main/java/io/entgra/application/mgt/api/services/ArtifactDownloadAPI.java index 2698811f7a..0c0f3ae551 100644 --- a/components/application-mgt/io.entgra.application.mgt.api/src/main/java/io/entgra/application/mgt/api/services/ArtifactDownloadAPI.java +++ b/components/application-mgt/io.entgra.application.mgt.api/src/main/java/io/entgra/application/mgt/api/services/ArtifactDownloadAPI.java @@ -88,7 +88,7 @@ public interface ArtifactDownloadAPI { required = true) @PathParam("tenantId") int tenantId, @ApiParam( - name = "hash-value", + name = "appHashValue", value = "Hash value of the application release.", required = true) @PathParam("appHashValue") String uuid, diff --git a/components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml index 8b0e0c94ad..e9c391e1de 100644 --- a/components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -41,8 +41,8 @@ - - + + diff --git a/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java index 5abce176c6..93918ae1e9 100644 --- a/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java +++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java @@ -429,7 +429,8 @@ public interface ApplicationManagementPublisherAPI { @Extension(properties = { @ExtensionProperty(name = SCOPE, value = "perm:app:publisher:update") }) - } + }, + nickname = "createCustomAppByAppWrapper" ) @ApiResponses( value = { @@ -679,7 +680,7 @@ public interface ApplicationManagementPublisherAPI { @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @ApiOperation( - consumes = MediaType.MULTIPART_FORM_DATA, + consumes = MediaType.APPLICATION_JSON, produces = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Upload artifacts", @@ -769,11 +770,11 @@ public interface ApplicationManagementPublisherAPI { ); @PUT - @Path("/ent-app-artifacts/{deviceType}/{appId}/{uuid}") + @Path("/ent-app-artifact/{deviceType}/{uuid}") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @ApiOperation( - consumes = MediaType.MULTIPART_FORM_DATA, + consumes = MediaType.APPLICATION_JSON, produces = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Upload artifacts", @@ -783,7 +784,8 @@ public interface ApplicationManagementPublisherAPI { @Extension(properties = { @ExtensionProperty(name = SCOPE, value = "perm:app:publisher:update") }) - } + }, + nickname = "updateApplicationArtifactByDeviceTypeAndUUID" ) @ApiResponses( value = { @@ -851,7 +853,7 @@ public interface ApplicationManagementPublisherAPI { }) Response updateEntAppRelease( @ApiParam( - name = "UUID", + name = "uuid", value = "Unique identifier of the ApplicationDTO Release", required = true) @PathParam("uuid") String applicationUUID, @@ -895,7 +897,7 @@ public interface ApplicationManagementPublisherAPI { }) Response updatePubAppRelease( @ApiParam( - name = "UUID", + name = "uuid", value = "Unique identifier of the ApplicationDTO Release", required = true) @PathParam("uuid") String applicationUUID, @@ -939,7 +941,7 @@ public interface ApplicationManagementPublisherAPI { }) Response updateWebAppRelease( @ApiParam( - name = "UUID", + name = "uuid", value = "Unique identifier of the ApplicationDTO Release", required = true) @PathParam("uuid") String applicationUUID, @@ -984,7 +986,7 @@ public interface ApplicationManagementPublisherAPI { }) Response updateCustomAppRelease( @ApiParam( - name = "UUID", + name = "uuid", value = "Unique identifier of the ApplicationDTO Release", required = true) @PathParam("uuid") String applicationUUID, @@ -1349,7 +1351,7 @@ public interface ApplicationManagementPublisherAPI { }) Response addApplicationTags( @ApiParam( - name = "oldTagName", + name = "appId", value = "Existing Tag Name", required = true) @PathParam("appId") int appId, diff --git a/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/SPApplicationService.java b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/SPApplicationService.java index 995c892aa5..5d4797db38 100644 --- a/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/SPApplicationService.java +++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/SPApplicationService.java @@ -309,7 +309,8 @@ public interface SPApplicationService { @Extension(properties = { @ExtensionProperty(name = SCOPE, value = "perm:app:publisher:service-provider:create") }) - } + }, + nickname = "createEntAppForSP" ) Response createEntApp(@PathParam("identity-server-id") int identityServerId, @PathParam("service-provider-id") String serviceProviderId, ApplicationWrapper app, @@ -335,7 +336,8 @@ public interface SPApplicationService { @Extension(properties = { @ExtensionProperty(name = SCOPE, value = "perm:app:publisher:service-provider:create") }) - } + }, + nickname = "createPubAppForSP" ) Response createPubApp(@PathParam("identity-server-id") int identityServerId, @PathParam("service-provider-id") String serviceProviderId, PublicAppWrapper app, @@ -358,7 +360,8 @@ public interface SPApplicationService { @Extension(properties = { @ExtensionProperty(name = SCOPE, value = "perm:app:publisher:service-provider:create") }) - } + }, + nickname = "createWebAppForSP" ) Response createWebApp(@PathParam("identity-server-id") int identityServerId, @PathParam("service-provider-id") String serviceProviderId, WebAppWrapper app, diff --git a/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/WEB-INF/cxf-servlet.xml index da39cd93a8..3269965b0d 100644 --- a/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -44,8 +44,8 @@ - - + + diff --git a/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/ReviewManagementAPI.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/ReviewManagementAPI.java index 3f0cde85f0..615173f3df 100644 --- a/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/ReviewManagementAPI.java +++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/ReviewManagementAPI.java @@ -360,7 +360,8 @@ public interface ReviewManagementAPI { @Extension(properties = { @ExtensionProperty(name = SCOPE, value = "perm:app:review:update") }) - } + }, + nickname = "deleteReviewComment" ) @ApiResponses( diff --git a/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/SubscriptionManagementAPI.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/SubscriptionManagementAPI.java index ff84467235..ec88df3714 100644 --- a/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/SubscriptionManagementAPI.java +++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/SubscriptionManagementAPI.java @@ -112,7 +112,7 @@ public interface SubscriptionManagementAPI { }) Response performAppOperationForDevices( @ApiParam( - name = "installationDetails", + name = "uuid", value = "The application ID and list of devices/users/roles", required = true ) @@ -124,8 +124,8 @@ public interface SubscriptionManagementAPI { ) @PathParam("action") String action, @ApiParam( - name = "installationDetails", - value = "The application ID and list of devices/users/roles", + name = "deviceIdentifiers", + value = "The list of device identifiers", required = true ) @Valid List deviceIdentifiers, @@ -227,7 +227,7 @@ public interface SubscriptionManagementAPI { }) Response performEntAppSubscriptionOnDevices( @ApiParam( - name = "UUID", + name = "uuid", value = "The application UUID", required = true ) @@ -239,7 +239,7 @@ public interface SubscriptionManagementAPI { ) @PathParam("action") String action, @ApiParam( - name = "installationDetails", + name = "deviceIdentifiers", value = "The list of device identifiers", required = true ) @@ -329,7 +329,8 @@ public interface SubscriptionManagementAPI { @Extension(properties = { @ExtensionProperty(name = SCOPE, value = "perm:app:subscription:uninstall") }) - } + }, + nickname = "getAppInstalledDevicesByUUID" ) @ApiResponses( value = { diff --git a/components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/WEB-INF/cxf-servlet.xml index 47d03da598..958353c196 100644 --- a/components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -45,7 +45,7 @@ - +