Skip to content

Commit

Permalink
Introduce new .NET SDK version for Rooms GA (#36830)
Browse files Browse the repository at this point in the history
* Introduce new .NET SDK version for Rooms GA

* Update the autorest generated code version and test recordings

* Fix CI build

* Update swagger readme.md file

* Fix autorest.md

* Update changelog release date

---------

Co-authored-by: Minnie Liu <peiliu@microsoft.com>
  • Loading branch information
minnieliu and Minnie Liu committed Jun 6, 2023
1 parent a7063e4 commit 173e3b5
Show file tree
Hide file tree
Showing 35 changed files with 34,110 additions and 2,190 deletions.
11 changes: 2 additions & 9 deletions sdk/communication/Azure.Communication.Rooms/CHANGELOG.md
@@ -1,14 +1,7 @@
# Release History

## 1.0.0-beta.3 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
## 1.0.0 (2023-06-12)
General Availability version of the Azure Communication Services Rooms .NET SDK.

## 1.0.0-beta.2 (2023-05-17)

Expand Down
4 changes: 2 additions & 2 deletions sdk/communication/Azure.Communication.Rooms/README.md
Expand Up @@ -3,7 +3,7 @@
This package contains a C# SDK for the Rooms Service of Azure Communication Services.
Azure Communication Services (ACS) Rooms is a set of APIs, used by Contoso server applications to create a server-managed conversation space with fixed set of lifetime and participants, pre-defining rules from server-tier both who and when can communicate (like scheduled meeting creation).

With the preview release of ACS Rooms, Contoso will be able to:
With the general availability release of ACS Rooms, Contoso will be able to:

- Create a meeting space with known time coordinates (validFrom/validUntil)
- Join voice/video calls within that meeting space using the ACS web calling SDK or native mobile calling SDKs
Expand All @@ -22,7 +22,7 @@ The main scenarios where Rooms can best be used:
Install the Azure Communication Rooms client library for .NET with [NuGet][nuget]:

```PowerShell
dotnet add package Azure.Communication.Rooms --prerelease
dotnet add package Azure.Communication.Rooms
```

### Prerequisites
Expand Down
Expand Up @@ -59,10 +59,10 @@ public partial class RoomsClient
}
public partial class RoomsClientOptions : Azure.Core.ClientOptions
{
public RoomsClientOptions(Azure.Communication.Rooms.RoomsClientOptions.ServiceVersion version = Azure.Communication.Rooms.RoomsClientOptions.ServiceVersion.V2023_03_31_Preview) { }
public RoomsClientOptions(Azure.Communication.Rooms.RoomsClientOptions.ServiceVersion version = Azure.Communication.Rooms.RoomsClientOptions.ServiceVersion.V2023_06_14) { }
public enum ServiceVersion
{
V2023_03_31_Preview = 1,
V2023_06_14 = 1,
}
}
public static partial class RoomsModelFactory
Expand Down
Expand Up @@ -4,7 +4,7 @@
This Client library enables working with the Microsoft Azure Communication Rooms Service.
</Description>
<AssemblyTitle>Azure Communication Rooms Service</AssemblyTitle>
<Version>1.0.0-beta.3</Version>
<Version>1.0.0</Version>
<PackageTags>Microsoft Azure Communication Rooms Service;Microsoft;Azure;Azure Communication Service;Azure Communication Rooms Service;Rooms;Communication;$(PackageCommonTags)</PackageTags>
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
<IncludeOperationsSharedSource>true</IncludeOperationsSharedSource>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -11,7 +11,7 @@ namespace Azure.Communication.Rooms
/// </summary>
public class RoomsClientOptions : ClientOptions
{
internal const ServiceVersion LatestVersion = ServiceVersion.V2023_03_31_Preview;
internal const ServiceVersion LatestVersion = ServiceVersion.V2023_06_14;

internal string ApiVersion { get; }

Expand All @@ -23,7 +23,7 @@ public RoomsClientOptions(ServiceVersion version = LatestVersion)
{
ApiVersion = version switch
{
ServiceVersion.V2023_03_31_Preview => "2023-03-31-preview",
ServiceVersion.V2023_06_14 => "2023-06-14",
_ => throw new ArgumentOutOfRangeException(nameof(version)),
};
}
Expand All @@ -34,9 +34,9 @@ public enum ServiceVersion
{
#pragma warning disable CA1707 // Identifiers should not contain underscores
/// <summary>
/// Rooms service preview version 2023-03-31-preview
/// Rooms service preview version 2023-06-14
/// </summary>
V2023_03_31_Preview = 1,
V2023_06_14 = 1,
#pragma warning restore CA1707 // Identifiers should not contain underscores
}
}
Expand Down
5 changes: 2 additions & 3 deletions sdk/communication/Azure.Communication.Rooms/src/autorest.md
@@ -1,8 +1,7 @@
# Azure.Communication.CallingServer
# Azure.Communication.Rooms

When a new version of the swagger needs to be updated:
1. Open Azure.Communication.sln and under sdk\communication, run `dotnet msbuild /t:GenerateCode` to generate code.

2. Upload the Azure.Communication.Call.dll to the [apiview.dev tool](https://apiview.dev/).
If any of the new objects needs to be overwritten, add the required changes to the 'Models' folder.

Expand All @@ -15,7 +14,7 @@ If any of the new objects needs to be overwritten, add the required changes to t
title: Rooms
model-namespace: false
require:
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/49ef4666b13e2e5675dfb92dab3b3d13aa8b3596/specification/communication/data-plane/Rooms/readme.md
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/bb9ff61373e304b02f08fbc4ab083c95adc25b79/specification/communication/data-plane/Rooms/readme.md
payload-flattening-threshold: 10
clear-output-folder: true
generation1-convenience-client: true
Expand Down
Expand Up @@ -62,7 +62,7 @@ protected RoomsClient CreateClientWithConnectionString(bool isInstrumented = tru
{
var client = new RoomsClient(
TestEnvironment.CommunicationConnectionStringRooms,
CreateRoomsClientOptionsWithCorrelationVectorLogs(RoomsClientOptions.ServiceVersion.V2023_03_31_Preview));
CreateRoomsClientOptionsWithCorrelationVectorLogs(RoomsClientOptions.ServiceVersion.V2023_06_14));

// We always create the instrumented client to suppress the instrumentation check
var instrumentedClient = InstrumentClient(client);
Expand All @@ -79,7 +79,7 @@ protected RoomsClient CreateClientWithAzureKeyCredential(bool isInstrumented = t
var client = new RoomsClient(
TestEnvironment.CommunicationRoomsEndpoint,
new AzureKeyCredential(TestEnvironment.CommunicationRoomsAccessKey),
CreateRoomsClientOptionsWithCorrelationVectorLogs(RoomsClientOptions.ServiceVersion.V2023_03_31_Preview));
CreateRoomsClientOptionsWithCorrelationVectorLogs(RoomsClientOptions.ServiceVersion.V2023_06_14));

return isInstrumented ? InstrumentClient(client) : client;
}
Expand All @@ -94,7 +94,7 @@ protected RoomsClient CreateClientWithTokenCredential(bool isInstrumented = true
var client = new RoomsClient(
TestEnvironment.CommunicationRoomsEndpoint,
(Mode == RecordedTestMode.Playback) ? new MockCredential() : new DefaultAzureCredential(),
CreateRoomsClientOptionsWithCorrelationVectorLogs(RoomsClientOptions.ServiceVersion.V2023_03_31_Preview));
CreateRoomsClientOptionsWithCorrelationVectorLogs(RoomsClientOptions.ServiceVersion.V2023_06_14));

return isInstrumented ? InstrumentClient(client) : client;
}
Expand Down
Expand Up @@ -77,7 +77,7 @@ public async Task AcsRoomRequestLiveWithoutParticipantsTest(AuthMethod authMetho
public async Task AcsRoomLifeCycleLiveTest()
{
// Arrange
RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_03_31_Preview);
RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_06_14);
CommunicationIdentityClient communicationIdentityClient = CreateInstrumentedCommunicationIdentityClient();

var communicationUser1 = communicationIdentityClient.CreateUserAsync().Result.Value;
Expand Down Expand Up @@ -151,7 +151,7 @@ public async Task AcsRoomLifeCycleLiveTest()
public async Task GetRoomsLiveTest_FirstRoomIsNotNull_Succeed()
{
// Arrange
RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_03_31_Preview);
RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_06_14);
// First create a room to ensure that the list rooms will not be empty.
CommunicationRoom createdRoom = await roomsClient.CreateRoomAsync();
CommunicationRoom? firstActiveRoom = null;
Expand Down Expand Up @@ -189,7 +189,7 @@ public async Task RoomParticipantsAddUpdateAndRemoveLiveTest()
var communicationUser2 = communicationIdentityClient.CreateUserAsync().Result.Value;
var communicationUser3 = communicationIdentityClient.CreateUserAsync().Result.Value;

RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_03_31_Preview);
RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_06_14);

RoomParticipant participant1 = new RoomParticipant(communicationUser1) { Role = ParticipantRole.Presenter };
RoomParticipant participant2 = new RoomParticipant(communicationUser2) { Role = ParticipantRole.Presenter };
Expand Down Expand Up @@ -275,7 +275,7 @@ public async Task RoomParticipantsAddUpdateAndRemoveWithNullRolesLiveTest()
var communicationUser2 = communicationIdentityClient.CreateUserAsync().Result.Value;
var communicationUser3 = communicationIdentityClient.CreateUserAsync().Result.Value;

RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_03_31_Preview);
RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_06_14);

RoomParticipant participant1 = new RoomParticipant(communicationUser1) { Role = ParticipantRole.Presenter };
RoomParticipant participant2 = new RoomParticipant(communicationUser2);
Expand Down Expand Up @@ -404,7 +404,7 @@ public async Task AcsRoomTimePartialUpdateLiveTest()
{
if (Mode != Core.TestFramework.RecordedTestMode.Playback)
{
RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_03_31_Preview);
RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_06_14);

var validFrom = DateTime.UtcNow;
var validUntil = validFrom.AddDays(1);
Expand Down
Expand Up @@ -24,7 +24,7 @@ public Sample1_RoomsClient(bool isAsync) : base(isAsync)
[Test]
public async Task AcsRoomRequestSample()
{
RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_03_31_Preview);
RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_06_14);
CommunicationIdentityClient communicationIdentityClient = CreateInstrumentedCommunicationIdentityClient();

#region Snippet:Azure_Communication_Rooms_Tests_Samples_CreateRoomAsync
Expand Down Expand Up @@ -84,7 +84,7 @@ await foreach (CommunicationRoom room in allRooms)
[Test]
public async Task AddUpdateAndRemoveParticipantsExample()
{
RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_03_31_Preview);
RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_06_14);
CommunicationIdentityClient communicationIdentityClient = CreateInstrumentedCommunicationIdentityClient();
Response<CommunicationUserIdentifier> communicationUser1 = await communicationIdentityClient.CreateUserAsync();
Response<CommunicationUserIdentifier> communicationUser2 = await communicationIdentityClient.CreateUserAsync();
Expand Down Expand Up @@ -141,7 +141,7 @@ await foreach (RoomParticipant participant in allParticipants)
[Test]
public async Task RoomRequestsTroubleShooting()
{
RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_03_31_Preview);
RoomsClient roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_06_14);
#region Snippet:Azure_Communication_RoomsClient_Tests_Troubleshooting
try
{
Expand Down

0 comments on commit 173e3b5

Please sign in to comment.