Skip to content

[type:fix] propagate namespaces through API registrars - #7231

Merged
Aias00 merged 2 commits into
apache:masterfrom
dengliming:fix-6664-registrar-namespaces
Oct 1, 2026
Merged

Aias00 merged 2 commits into
apache:masterfrom
dengliming:fix-6664-registrar-namespaces

Conversation

@dengliming

Copy link
Copy Markdown
Member

Summary

  • Propagate configured namespaces through the ApiBean URI and metadata registrars, publishing a distinct DTO for each namespace for both bean and method registrations.
  • Use the existing namespace separator and default-namespace fallback; preserve compatibility for custom ClientRegisterConfig implementations.
  • API documentation is currently global: ApiDocRegisterDTO and ApiDO have no namespace field. This change intentionally does not introduce a separate admin/schema migration for API documents.

Fixes #6664

Validation

  • RegistrarNamespaceTest and ApiDocRegistrarImplTest passed (7 tests).
  • Maven validate Checkstyle and RAT passed.

@Aias00 Aias00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Namespace propagation is incomplete. The generic URI/metadata registrars now expand clientRegisterConfig namespaces, but SpringMvcApiMetaRegister is built from the same config and still creates MetaDataRegisterDTO without namespaceId for both preParse and parse. Those registrations fall back to the system default namespace. Please mirror the multi-namespace expansion there and add a first;second Spring MVC registrar test.

@Aias00

Aias00 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Re-check: namespace propagation is still incomplete — the generic URI/metadata registrars expand clientRegisterConfig namespaces, but the Spring MVC API metadata path does not. Please cover the remaining registrars.

@Aias00 Aias00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed — the gap is closed. SpringMvcApiMetaRegister now participates in the same namespace expansion as the generic URI/metadata registrars, and SpringMvcApiMetaRegisterTest (+37) pins it, so this path can't silently fall back to a single namespace again. RegistrarNamespaceTest (+89) covers the registrars collectively. Approving.

@Aias00
Aias00 merged commit 550c0c3 into apache:master Oct 1, 2026
20 checks passed
@Aias00 Aias00 added this to the 2.7.2 milestone Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] New registrar path never propagates namespaceId — multi-namespace support broken in @EnableClientRegister path

2 participants