Skip to content

[C#] API model name conflicts with namespace #4475

Closed

Description

When generating a C# client for an API, where a model has the same name as a part of its namespace , the compiler would raise CS0118 ("'XY is a namespace but is used like a type'") on various locations in the generated code.
E.g.
Response model "Subscription" generated as part of an API client in namespace "Whatever.Application.Subscription.Client"

As a workaround one can use the fully qualified type name to correct the generated code. That has the drawback that it would get overwritten permanently when the clients are being regenerated though.

Kiota Version 1.13.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

CsharpPull requests that update .net code

Type

No type

Projects

  • Status

    Done ✔️

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions