Skip to content

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

@mario-guerra

Description

@mario-guerra

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:

  • Difficulty in maintaining a clean and organized codebase.
  • Increased risk of naming conflicts.
  • Challenges in navigating and managing large codebases.

Desired Outcome:

  • Emitters should generate code with proper namespace support based on the TypeSpec specifications.
  • This feature will enable developers to maintain a well-organized and easily navigable codebase.

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

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    emitter:client:csharpIssue for the C# client emitter: @typespec/http-client-csharpemitter:client:javaIssue for the Java client emitter: @typespec/http-client-javaemitter:client:pythonIssue for the Python client emitter: @typespec/http-client-pythonfeatureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions