Skip to content

Commit

Permalink
remove the diagnostic, will add it into csharp side later
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcturusZhang committed Feb 26, 2025
1 parent b742e16 commit 07c774f
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -92,19 +92,6 @@ export function createModel(sdkContext: CSharpEmitterContext): CodeModel {
const uri = getMethodUri(endpointParameter);
const clientParameters = fromSdkEndpointParameter(endpointParameter);
const clientName = getClientName(client, parentNames);
// see if this namespace is a sub-namespace of an existing bad namespace
const segments = client.namespace.split(".");
const lastSegment = segments[segments.length - 1];
if (lastSegment === clientName) {
// we report diagnostics when the last segment of the namespace is the same as the client name
// because in our design, a sub namespace will be generated as a sub client with exact the same name as the namespace
// in csharp, this will cause a conflict between the namespace and the class name
sdkContext.logger.reportDiagnostic({
code: "client-namespace-conflict",
format: { namespace: client.namespace, clientName },
target: client.__raw.type ?? NoTarget,
});
}

return {
Name: clientName,

0 comments on commit 07c774f

Please sign in to comment.