microsoft / typespec

https://typespec.io/
MIT License
4.49k stars 211 forks source link

[Feature Request] Namespace Support in REST-Level Client Emitters #4589

Open mario-guerra opened 1 month ago

mario-guerra commented 1 month ago

Requested by the London Stock Exchange Group:

Description: The current REST-level client emitters in TypeSpec do not support namespaces. This limitation creates challenges in organizing and structuring the generated code, especially for large projects with multiple APIs. Proper namespace support is crucial for avoiding naming conflicts and for logically grouping related functionalities.

Impact:

Desired Outcome:

Steps to Reproduce:

  1. Generate a REST-level client using the current emitters.
  2. Observe the lack of namespace support in the generated code.

Expected Behavior: The generated code should include namespaces that logically group related functionalities, as specified in the TypeSpec definitions.

Actual Behavior: The generated code does not include namespaces, leading to a disorganized structure.

Additional Context: This feature is essential for large-scale projects where multiple APIs need to be managed and maintained. Proper namespace support will significantly improve the developer experience and code maintainability.

Checklist

mario-guerra commented 1 month ago

Tagging @lmazuel since this involves emitters.

mario-guerra commented 1 month ago

Update - more details have been requested from LSEG to clarify the ask.