microsoft / microsoft/typespec
[Azure] Support Generating Multiple Top-Level Clients for Multi-Namespace Services
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
**Problem**:
Azure services like **Azure Search** require multiple top-level clients (e.g., `SearchClient` and `SearchIndexClient`) to align with existing SDKs. Currently, the JS Azure emitter does not support this scenario, as it treats TypeSpec namespaces as a mechanism for name collision resolution rather than client separation.
Currently the emitter will generate everything under a single root client.
**Proposed Solution**:
- Resolve this as part of the **Azure emitter’s migration to EFv2**, which includes unbranded multi-namespace support.
- Validate that migrated Azure emitters generate separate clients for distinct namespaces (e.g., `azure.search.documents` vs. `azure.search.documents.indexes`).
- implement explicit support for `@clientNamespace` decorators or emitter configuration to **remap namespaces to distinct clients**.
**Acceptance Criteria**:
- Generated JS clients for multi-namespace services (e.g., Azure Search) match existing SDK structures.
**Dependencies**:
- EFv2 migration timeline for the Azure emitter.
**Original Proposal**:
https://gist.github.com/srnagar/a695faa1a4d8a5dbf44af826f05916f0
Contributor guide
Assessment
This issue has not been assessed yet.