Skip to content

[Azure] Support Generating Multiple Top-Level Clients for Multi-Namespace Services #7120

@joheredi

Description

@joheredi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions