Skip to content

Commit

Permalink
Merge pull request #12536 from msm1992/master-3090
Browse files Browse the repository at this point in the history
Fix API Update Issue
  • Loading branch information
msm1992 committed Sep 9, 2024
2 parents 80ea716 + 521aa6c commit a2adbc1
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,15 @@ public PublisherAPI updateAPI(Organization org, PublisherAPI publisherAPI) throw
for (String docPath : docsPaths) {
if (!(docPath.equalsIgnoreCase(pathToContent) || docPath.equalsIgnoreCase(pathToDocFile))) {
Resource docResource = registry.get(docPath);
if (docResource instanceof org.wso2.carbon.registry.core.Collection) {
//This is a custom folder and will be ignored.
continue;
} else if (docResource != null) {
if (!APIConstants.DOCUMENT_RXT_MEDIA_TYPE.equals(docResource.getMediaType())) {
//These are custom resources and will be ignored.
continue;
}
}
GenericArtifactManager docArtifactManager = RegistryPersistenceDocUtil
.getDocumentArtifactManager(registry);
GenericArtifact docArtifact = docArtifactManager.getGenericArtifact(docResource.getUUID());
Expand Down

0 comments on commit a2adbc1

Please sign in to comment.