Skip to content

[http-client-csharp] Generator should not override the file it just writes #6877

Open
@ArcturusZhang

Description

@ArcturusZhang

Now we could have classes in different namespaces with the same name, but those files are still written into the same directory, such as Models.
There would be occasions that the generator writes one file A.Foo and then writes B.Foo into the same file Foo.cs.

We should have a mechanism to avoid this, because from the user's perspective, this is very tricky to know where it goes wrong.

For instance, we could write the first class A.Foo into Foo.cs, and then write class B.Foo into Foo.1.cs which should not trigger the linter of C# that the filename should be the same as the first type it defines.
Or we could change the structure to just follow the namespace like java.

Metadata

Metadata

Assignees

No one assigned

    Labels

    emitter:client:csharpIssue for the C# client emitter: @typespec/http-client-csharp

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions