diff --git a/dap-was-lib/src/main/java/io/shinhanlife/dap/lib/manifest/ToolManifestService.java b/dap-was-lib/src/main/java/io/shinhanlife/dap/lib/manifest/ToolManifestService.java index cbaf0533..dfcfece3 100644 --- a/dap-was-lib/src/main/java/io/shinhanlife/dap/lib/manifest/ToolManifestService.java +++ b/dap-was-lib/src/main/java/io/shinhanlife/dap/lib/manifest/ToolManifestService.java @@ -53,7 +53,7 @@ public class ToolManifestService { } List tools = toolSupplier.get().stream() - .filter(tool -> isMatchCategory(categoryKey, tool.getCategoryKey())) + .filter(tool -> isMatchCategory(categoryKey, tool.getCategoryKey(), bundleId)) .map(this::toManifestItem) .sorted(Comparator.comparing(ToolManifestItem::name)) .toList(); @@ -61,16 +61,21 @@ public class ToolManifestService { return new ToolManifestResponse(bundleId, revision(bundleId, tools), tools); } - private boolean isMatchCategory(String requestedCategory, String toolCategory) { + private boolean isMatchCategory(String requestedCategory, String toolCategory, String bundleId) { if (requestedCategory == null) { return true; } if (requestedCategory.equalsIgnoreCase(toolCategory)) { return true; } - if ("sys".equalsIgnoreCase(requestedCategory)) { - return "iam".equalsIgnoreCase(toolCategory) || "pct".equalsIgnoreCase(toolCategory); + + // Return all tools in this module if the requested category matches the module's bundle ID + if (bundleId != null && + (bundleId.equalsIgnoreCase(requestedCategory) || + bundleId.equalsIgnoreCase("was-" + requestedCategory))) { + return true; } + return false; }