Skip to content

Commit 73bd1f8

Browse files
authored
Rename model SliResource to SliResourceProperties for csharp (#42600)
There was a naming collision causing one of the csharp SDK platform tests to fail. This change tries to get past it by renaming a model class just for the csharp SDK.
1 parent f1d9cb1 commit 73bd1f8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • specification/monitoringservice/resource-manager/Microsoft.Monitor/Slis

specification/monitoringservice/resource-manager/Microsoft.Monitor/Slis/sli.tsp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ import "@typespec/rest";
33
import "@typespec/versioning";
44
import "@azure-tools/typespec-azure-core";
55
import "@azure-tools/typespec-azure-resource-manager";
6+
import "@azure-tools/typespec-client-generator-core";
67

78
using TypeSpec.Http;
89
using TypeSpec.Rest;
910
using Azure.ResourceManager;
11+
using Azure.ClientGenerator.Core;
1012

1113
namespace Microsoft.Monitor;
1214

@@ -22,7 +24,12 @@ model Sli is ProxyResource<SliResource> {
2224
...ManagedServiceIdentityProperty;
2325
}
2426

27+
// Renamed to SliResourceProperties in csharp to avoid naming collision with the
28+
// ARM resource class SliResource : ArmResource. The .NET SDK shared test
29+
// InheritanceCheckTests expects all classes ending in "Resource" to extend
30+
// ArmResource, but this model is a plain POCO.
2531
@doc("Defines the root level properties of an SLI resource.")
32+
@clientName("SliResourceProperties", "csharp")
2633
model SliResource {
2734
@visibility(Lifecycle.Read)
2835
@doc("Indicates the provisioning status of the last operation.")

0 commit comments

Comments
 (0)