From 8ef180e7ce1eaa01acc820a4352cf50e5dff8357 Mon Sep 17 00:00:00 2001 From: Thenujan-Nagaratnam Date: Sat, 23 Mar 2024 19:52:44 +0530 Subject: [PATCH] changed endpoint to marketplace-assistant --- .../v1/{AiApi.java => MarketplaceAssistantApi.java} | 12 ++++++------ ...vice.java => MarketplaceAssistantApiService.java} | 2 +- ....java => MarketplaceAssistantApiServiceImpl.java} | 5 +++-- .../src/main/resources/devportal-api.yaml | 4 ++-- .../src/main/webapp/WEB-INF/web.xml | 3 ++- 5 files changed, 14 insertions(+), 12 deletions(-) rename components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/{AiApi.java => MarketplaceAssistantApi.java} (89%) rename components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/{AiApiService.java => MarketplaceAssistantApiService.java} (95%) rename components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/impl/{AiApiServiceImpl.java => MarketplaceAssistantApiServiceImpl.java} (97%) diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/AiApi.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/MarketplaceAssistantApi.java similarity index 89% rename from components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/AiApi.java rename to components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/MarketplaceAssistantApi.java index 1fce2dfe3a15..869d54c5cd0c 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/AiApi.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/MarketplaceAssistantApi.java @@ -4,8 +4,8 @@ import org.wso2.carbon.apimgt.rest.api.store.v1.dto.MarketplaceAssistantApiCountResponseDTO; import org.wso2.carbon.apimgt.rest.api.store.v1.dto.MarketplaceAssistantRequestDTO; import org.wso2.carbon.apimgt.rest.api.store.v1.dto.MarketplaceAssistantResponseDTO; -import org.wso2.carbon.apimgt.rest.api.store.v1.AiApiService; -import org.wso2.carbon.apimgt.rest.api.store.v1.impl.AiApiServiceImpl; +import org.wso2.carbon.apimgt.rest.api.store.v1.MarketplaceAssistantApiService; +import org.wso2.carbon.apimgt.rest.api.store.v1.impl.MarketplaceAssistantApiServiceImpl; import org.wso2.carbon.apimgt.api.APIManagementException; import javax.ws.rs.*; @@ -24,18 +24,18 @@ import java.util.Map; import java.util.List; import javax.validation.constraints.*; -@Path("/ai") +@Path("/marketplace-assistant") -@Api(description = "the ai API") +@Api(description = "the marketplace-assistant API") -public class AiApi { +public class MarketplaceAssistantApi { @Context MessageContext securityContext; -AiApiService delegate = new AiApiServiceImpl(); +MarketplaceAssistantApiService delegate = new MarketplaceAssistantApiServiceImpl(); @GET diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/AiApiService.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/MarketplaceAssistantApiService.java similarity index 95% rename from components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/AiApiService.java rename to components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/MarketplaceAssistantApiService.java index a90cebe47e16..c9ec95dea707 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/AiApiService.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/MarketplaceAssistantApiService.java @@ -22,7 +22,7 @@ import javax.ws.rs.core.SecurityContext; -public interface AiApiService { +public interface MarketplaceAssistantApiService { public Response getMarketplaceAssistantApiCount(MessageContext messageContext) throws APIManagementException; public Response marketplaceAssistantExecute(MarketplaceAssistantRequestDTO marketplaceAssistantRequestDTO, MessageContext messageContext) throws APIManagementException; } diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/impl/AiApiServiceImpl.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/impl/MarketplaceAssistantApiServiceImpl.java similarity index 97% rename from components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/impl/AiApiServiceImpl.java rename to components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/impl/MarketplaceAssistantApiServiceImpl.java index d7464bd75e7b..e4c2d000970e 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/impl/AiApiServiceImpl.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/impl/MarketplaceAssistantApiServiceImpl.java @@ -36,9 +36,10 @@ import javax.ws.rs.core.SecurityContext; -public class AiApiServiceImpl implements AiApiService { +public class MarketplaceAssistantApiServiceImpl implements MarketplaceAssistantApiService { - private static final Log log = LogFactory.getLog(AiApiServiceImpl.class); + + private static final Log log = LogFactory.getLog(MarketplaceAssistantApiServiceImpl.class); private static MarketplaceAssistantConfigurationDto marketplaceAssistantConfigurationDto; diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/devportal-api.yaml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/devportal-api.yaml index fa185612f220..121a13640033 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/devportal-api.yaml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/devportal-api.yaml @@ -3655,7 +3655,7 @@ paths: ###################################################### # The "Marketplace Assistant Feature" resource APIs ###################################################### - '/ai/api-count': + '/marketplace-assistant/api-count': #----------------------------------------------------- # Get No of apis in the VectorDB @@ -3685,7 +3685,7 @@ paths: Internal Server Error. An error occurred while checking the health status of API Chat service. - '/ai/chat': + '/marketplace-assistant/chat': #----------------------------------------------------- # Chat with Marketplace Assistant diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/webapp/WEB-INF/web.xml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/webapp/WEB-INF/web.xml index 704f87cb8b17..a82b26da74e6 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/webapp/WEB-INF/web.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/webapp/WEB-INF/web.xml @@ -48,7 +48,8 @@ org.wso2.carbon.apimgt.rest.api.store.v1.RecommendationsApi, org.wso2.carbon.apimgt.rest.api.store.v1.KeyManagersApi, org.wso2.carbon.apimgt.rest.api.store.v1.MeApi, - org.wso2.carbon.apimgt.rest.api.store.v1.WebhooksApi + org.wso2.carbon.apimgt.rest.api.store.v1.WebhooksApi, + org.wso2.carbon.apimgt.rest.api.store.v1.MarketplaceAssistantApi