Skip to content
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8e0c80a
feat: migrate remaining portal APIs to OpenAPI
nobodyiam May 24, 2026
4be0b89
docs: update portal OpenAPI spec to v0.3.4
nobodyiam May 25, 2026
fb4216c
docs: add portal OpenAPI migration changelog
nobodyiam May 25, 2026
1bf846f
fix: harden portal management OpenAPI guards
nobodyiam May 25, 2026
bd74b15
fix: address portal OpenAPI review feedback
nobodyiam May 25, 2026
bd5b25a
fix: address app OpenAPI review feedback
nobodyiam May 30, 2026
4ba535b
fix: preserve app create fallback
nobodyiam May 30, 2026
99142ab
fix: align portal OpenAPI controller permissions
nobodyiam May 30, 2026
7852220
fix: address portal OpenAPI review comments
nobodyiam May 30, 2026
937983f
fix: harden portal management OpenAPI edge cases
nobodyiam May 30, 2026
8f7a871
fix: restore portal OpenAPI validation parity
nobodyiam May 30, 2026
0d49fc2
fix: preserve authorized permission init tokens
nobodyiam May 30, 2026
cb6d18f
chore: remove portal OpenAPI migration tracking
nobodyiam May 30, 2026
ef0c5a6
ci: drop removed frontend inventory test
nobodyiam May 30, 2026
5cb28dc
fix: preserve default import conflict action
nobodyiam May 30, 2026
de3acdc
fix: preserve OpenAPI audit display names
nobodyiam May 31, 2026
804bc06
fix: use updated OpenAPI audit schema
nobodyiam May 31, 2026
8e71935
fix: preserve OpenAPI item page metadata
nobodyiam May 31, 2026
8b940eb
fix: preserve OpenAPI token permission compatibility
nobodyiam May 31, 2026
d38be3b
chore: use released OpenAPI spec
nobodyiam May 31, 2026
35a12b5
fix: align openapi portal permission checks
nobodyiam May 31, 2026
2e88df2
chore: deprecate legacy portal webapi controllers
nobodyiam May 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/openapi-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
- name: Run checker tests
run: |
python3 scripts/openapi/check_openapi_compatibility_test.py
python3 scripts/openapi/collect_portal_frontend_urls_test.py
- name: Compare portal OpenAPI spec URL against base branch
env:
BASE_REF: ${{ github.base_ref }}
Expand Down
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Apollo 3.0.0
* [Change: migrate Apollo Portal namespace core UI operations to OpenAPI](https://github.com/apolloconfig/apollo/pull/5612)
* [Change: migrate Apollo Portal release, branch, and instance UI operations to OpenAPI](https://github.com/apolloconfig/apollo/pull/5616)
* [Change: migrate Apollo Portal permission and AccessKey UI operations to OpenAPI](https://github.com/apolloconfig/apollo/pull/5617)
* [Change: complete Apollo Portal UI management OpenAPI migration](https://github.com/apolloconfig/apollo/pull/5618)

------------------
All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/18?closed=1)
3 changes: 2 additions & 1 deletion apollo-portal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<artifactId>apollo-portal</artifactId>
<name>Apollo Portal</name>
<properties>
<apollo.openapi.spec.url>https://raw.githubusercontent.com/apolloconfig/apollo-openapi/refs/tags/v0.3.3/apollo-openapi.yaml</apollo.openapi.spec.url>
<apollo.openapi.spec.url>https://raw.githubusercontent.com/apolloconfig/apollo-openapi/v0.3.5/apollo-openapi.yaml</apollo.openapi.spec.url>
<github.path>${project.artifactId}</github.path>
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
</properties>
Expand All @@ -44,6 +44,7 @@
<dependency>
<groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo-openapi</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
import com.ctrip.framework.apollo.openapi.model.OpenMissEnvDTO;
import com.ctrip.framework.apollo.openapi.util.OpenApiModelConverters;
import com.ctrip.framework.apollo.portal.component.PortalSettings;
import com.ctrip.framework.apollo.portal.entity.model.AppModel;
import com.ctrip.framework.apollo.portal.enricher.adapter.OpenAppDtoUserInfoEnrichedAdapter;
import com.ctrip.framework.apollo.portal.environment.Env;
import com.ctrip.framework.apollo.portal.listener.AppDeletionEvent;
import com.ctrip.framework.apollo.portal.listener.AppInfoChangedEvent;
import com.ctrip.framework.apollo.portal.service.AdditionalUserInfoEnrichService;
import com.ctrip.framework.apollo.portal.service.AppService;
import com.ctrip.framework.apollo.portal.service.ClusterService;
import com.ctrip.framework.apollo.portal.service.RoleInitializationService;
Expand Down Expand Up @@ -61,16 +62,19 @@ public class ServerAppOpenApiService implements AppOpenApiService {
private final AppService appService;
private final ApplicationEventPublisher publisher;
private final RoleInitializationService roleInitializationService;
private final AdditionalUserInfoEnrichService additionalUserInfoEnrichService;
private static final Logger logger = LoggerFactory.getLogger(ServerAppOpenApiService.class);

public ServerAppOpenApiService(PortalSettings portalSettings, ClusterService clusterService,
AppService appService, ApplicationEventPublisher publisher,
RoleInitializationService roleInitializationService) {
RoleInitializationService roleInitializationService,
AdditionalUserInfoEnrichService additionalUserInfoEnrichService) {
this.portalSettings = portalSettings;
this.clusterService = clusterService;
this.appService = appService;
this.publisher = publisher;
this.roleInitializationService = roleInitializationService;
this.additionalUserInfoEnrichService = additionalUserInfoEnrichService;
}

private App convert(OpenAppDTO dto) {
Expand Down Expand Up @@ -137,7 +141,7 @@ public List<OpenEnvClusterInfo> getEnvClusterInfo(String appId) {
@Override
public List<OpenAppDTO> getAllApps() {
final List<App> apps = this.appService.findAll();
return OpenApiModelConverters.fromApps(apps);
return enrichApps(OpenApiModelConverters.fromApps(apps));
}

@Override
Expand All @@ -146,7 +150,7 @@ public List<OpenAppDTO> getAppsInfo(List<String> appIds) {
return Collections.emptyList();
}
final List<App> apps = this.appService.findByAppIds(new HashSet<>(appIds));
return OpenApiModelConverters.fromApps(apps);
return enrichApps(OpenApiModelConverters.fromApps(apps));
}

@Override
Expand Down Expand Up @@ -180,7 +184,7 @@ public List<OpenAppDTO> getAppsBySelf(Set<String> appIds, Integer page, Integer
return Collections.emptyList();
}
List<App> apps = appService.findByAppIds(targetAppIds, pageable);
return OpenApiModelConverters.fromApps(apps);
return enrichApps(OpenApiModelConverters.fromApps(apps));
}

/**
Expand Down Expand Up @@ -245,4 +249,10 @@ public List<OpenMissEnvDTO> findMissEnvs(String appId) {
}
return response;
}

private List<OpenAppDTO> enrichApps(List<OpenAppDTO> apps) {
additionalUserInfoEnrichService.enrichAdditionalUserInfo(apps,
OpenAppDtoUserInfoEnrichedAdapter::new);
return apps;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ public void removeItem(String appId, String env, String clusterName, String name
@Override
public OpenItemPageDTO findItemsByNamespace(String appId, String env, String clusterName,
String namespaceName, int page, int size) {
PageDTO<com.ctrip.framework.apollo.openapi.dto.OpenItemDTO> items = this.itemService
.findItemsByNamespace(appId, Env.valueOf(env), clusterName, namespaceName, page, size);
return OpenApiModelConverters.fromLegacyOpenItemPageDTO(items);
PageDTO<ItemDTO> items = this.itemService.findItemsByNamespace(appId, Env.valueOf(env),
clusterName, namespaceName, page, size);
return OpenApiModelConverters.fromItemPageDTO(items);
}

@Override
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ public void addCreateApplicationRoleToUsers(List<String> userIds, String operato
@Override
public void deleteCreateApplicationRoleFromUser(String userId, String operator) {
RequestPrecondition.checkArgumentsNotEmpty(userId);
checkUserExists(userId);
rolePermissionService.removeRoleFromUsers(SystemRoleManagerService.CREATE_APPLICATION_ROLE_NAME,
Sets.newHashSet(userId), operator);
}
Expand All @@ -265,6 +266,7 @@ public void addManageAppMasterRoleToUser(String appId, String userId, String ope
@Override
public void removeManageAppMasterRoleFromUser(String appId, String userId, String operator) {
RequestPrecondition.checkArgumentsNotEmpty(userId);
checkUserExists(userId);
roleInitializationService.initManageAppMasterRole(appId, operator);
rolePermissionService.removeRoleFromUsers(
RoleUtils.buildAppRoleName(appId, PermissionType.MANAGE_APP_MASTER),
Expand Down

This file was deleted.

Loading
Loading