Skip to content

Commit eb99cb4

Browse files
committed
Add debug logging for API operation mappings and MCP server validation
1 parent 9e46264 commit eb99cb4

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

  • components/apimgt
    • org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao
    • org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings

components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20880,6 +20880,10 @@ public void restoreAPIRevision(APIRevision apiRevision, String organization) thr
2088020880
Map<String, List<Integer>> apiOperationMappingsReferencedByAPIID =
2088120881
getAPIOperationMappingsReferencedByAPIID(apiId);
2088220882
if (!apiOperationMappingsReferencedByAPIID.isEmpty()) {
20883+
if (log.isDebugEnabled()) {
20884+
log.debug("Removing API Operation Mappings references for API ID: " + apiId +
20885+
" before removing URL mappings.");
20886+
}
2088320887
removeAPIOperationMappingsReferencedByAPIID(connection, apiOperationMappingsReferencedByAPIID);
2088420888
}
2088520889

components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,9 @@ private static API prepareForUpdateApi(API originalAPI, APIDTO apiDtoToUpdate, A
751751
List<API> usedMcpServers =
752752
apiProvider.getMCPServersUsedByAPI(originalAPI.getUuid(), originalAPI.getOrganization());
753753
if (!usedMcpServers.isEmpty()) {
754+
if (log.isDebugEnabled()) {
755+
log.debug("API: " + originalAPI.getUuid() + " is using MCP servers. Validating MCP resources.");
756+
}
754757
List<APIOperationsDTO> updatedOperations = apiDtoToUpdate.getOperations();
755758
if (updatedOperations != null && !updatedOperations.isEmpty()) {
756759
Set<URITemplate> updatedUriTemplates =

0 commit comments

Comments
 (0)