Skip to content

[Bug]: .NET Generated REST Clients Use Incorrect Namespaces #9314

@efrainretana

Description

@efrainretana

Describe the bug

Image

Generating code works, but the namespaces of REST client files are incorrectly generating namespaces.
The Namespace of the normal models are Azure.Search.Documents.Models but the REST client seems to do something weird and ends up as Azure.Azure.Search.Documents.Documents...

Reproduction

Delete autorest.md located in Azure.Search.Documents/src/autorest.md
Add a new tsp-location.yaml file in Azure.Search.Documents/:

repo: Azure/azure-rest-api-specs
commit: 9178d923b13fd9a226fe83be1e31b70651fc35bd
directory: specification/search/data-plane/Search
emitterPackageJsonPath: eng/azure-typespec-http-client-csharp-emitter-package.json

Within the /search folder in https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/search/Azure.Search.Documents , run dotnet build /t:GenerateCode

Checklist

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingemitter:client:csharpIssue for the C# client emitter: @typespec/http-client-csharp

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions