Skip to content

Commit fbe6633

Browse files
authored
feat(dataplane): unify abstract base class (#32661)
- bump latest `autorest.csharp` and re-gen some SDKs, making base class abstract - add `suppress-abstract-base-class` for SDKs which are already released, or test case will be broken due to making base class abstract
1 parent ecd1808 commit fbe6633

File tree

31 files changed

+130
-69
lines changed

31 files changed

+130
-69
lines changed

eng/Packages.Data.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
All should have PrivateAssets="All" set so they don't become package dependencies
161161
-->
162162
<ItemGroup>
163-
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20221201.2" PrivateAssets="All" />
163+
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20221201.3" PrivateAssets="All" />
164164
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20221031.1" PrivateAssets="All" />
165165
<PackageReference Update="coverlet.collector" Version="1.3.0" PrivateAssets="All" />
166166
<PackageReference Update="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1" PrivateAssets="All" />

sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public DirectMapRule() { }
132132
}
133133
public abstract partial class DistributionMode
134134
{
135-
public DistributionMode(int minConcurrentOffers, int maxConcurrentOffers) { }
135+
protected DistributionMode(int minConcurrentOffers, int maxConcurrentOffers) { }
136136
public bool? BypassSelectors { get { throw null; } set { } }
137137
public int MaxConcurrentOffers { get { throw null; } set { } }
138138
public int MinConcurrentOffers { get { throw null; } set { } }

sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/DistributionMode.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.MediaComposition/api/Azure.Communication.MediaComposition.netstandard2.0.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ public partial class GroupCallOutput : Azure.Communication.MediaComposition.Mode
7676
public GroupCallOutput(string id) { }
7777
public string Id { get { throw null; } set { } }
7878
}
79-
public partial class InputGroup
79+
public abstract partial class InputGroup
8080
{
81-
public InputGroup() { }
81+
protected InputGroup() { }
8282
public string Height { get { throw null; } set { } }
8383
public string Layer { get { throw null; } set { } }
8484
public Azure.Communication.MediaComposition.Models.InputPosition Position { get { throw null; } set { } }
@@ -384,18 +384,18 @@ public LayoutResolution(int width, int height) { }
384384
public int Height { get { throw null; } set { } }
385385
public int Width { get { throw null; } set { } }
386386
}
387-
public partial class MediaCompositionLayout
387+
public abstract partial class MediaCompositionLayout
388388
{
389389
internal MediaCompositionLayout() { }
390390
public string PlaceholderImageUri { get { throw null; } set { } }
391391
public Azure.Communication.MediaComposition.Models.LayoutResolution Resolution { get { throw null; } set { } }
392392
}
393-
public partial class MediaInput
393+
public abstract partial class MediaInput
394394
{
395395
internal MediaInput() { }
396396
public string PlaceholderImageUri { get { throw null; } set { } }
397397
}
398-
public partial class MediaOutput
398+
public abstract partial class MediaOutput
399399
{
400400
internal MediaOutput() { }
401401
}

sdk/communication/Azure.Communication.MediaComposition/src/Generated/Models/InputGroup.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.MediaComposition/src/Generated/Models/MediaCompositionLayout.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.MediaComposition/src/Generated/Models/MediaInput.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.MediaComposition/src/Generated/Models/MediaOutput.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ directive:
1818
where: $.definitions.CloudEventEvent
1919
transform: >
2020
$.properties.data["x-nullable"] = true;
21-
````
21+
```
22+
23+
### Suppress Abstract Base Class
24+
25+
``` yaml
26+
suppress-abstract-base-class: MediaJobOutput
27+
```
2228
2329
### Append `EventData` suffix to Resource Manager system event data models
2430

sdk/formrecognizer/Azure.AI.FormRecognizer/src/autorest.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Run `dotnet build /t:GenerateCode` to generate code. Notice how there are two main swaggers use to generate this client library:
44
- Service V2.x
5-
- Service V3
5+
- Service V3
66

77
### AutoRest Configuration
88
> see https://aka.ms/autorest
@@ -15,6 +15,12 @@ input-file:
1515
generation1-convenience-client: true
1616
```
1717
18+
## Suppress Abstract Base Class
19+
20+
``` yaml
21+
suppress-abstract-base-class: OperationDetails
22+
```
23+
1824
## Make the API version parameterized so we generate a multi-versioned API
1925
2026
``` yaml

0 commit comments

Comments
 (0)