Skip to content

Commit

Permalink
[Communication] - Follow standards for identity client options version (
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaJooyandeh authored and jongio committed Feb 9, 2021
1 parent befca39 commit 60a9aab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public CommunicationIdentityClient(System.Uri endpoint, Azure.Core.TokenCredenti
}
public partial class CommunicationIdentityClientOptions : Azure.Core.ClientOptions
{
public CommunicationIdentityClientOptions(Azure.Communication.Identity.CommunicationIdentityClientOptions.ServiceVersion version = Azure.Communication.Identity.CommunicationIdentityClientOptions.ServiceVersion.V1) { }
public CommunicationIdentityClientOptions(Azure.Communication.Identity.CommunicationIdentityClientOptions.ServiceVersion version = Azure.Communication.Identity.CommunicationIdentityClientOptions.ServiceVersion.V2021_03_07) { }
public enum ServiceVersion
{
V1 = 1,
V2021_03_07 = 1,
}
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ namespace Azure.Communication.Identity
public class CommunicationIdentityClientOptions : ClientOptions
{
/// <summary>
/// The latest version of the token service.
/// The latest version of the identity service.
/// </summary>
internal const ServiceVersion LatestVersion = ServiceVersion.V1;
internal const ServiceVersion LatestVersion = ServiceVersion.V2021_03_07;

internal string ApiVersion { get; }

Expand All @@ -25,7 +25,7 @@ public CommunicationIdentityClientOptions(ServiceVersion version = LatestVersion
{
ApiVersion = version switch
{
ServiceVersion.V1 => "2021-03-07",
ServiceVersion.V2021_03_07 => "2021-03-07",
_ => throw new ArgumentOutOfRangeException(nameof(version)),
};
}
Expand All @@ -36,9 +36,11 @@ public CommunicationIdentityClientOptions(ServiceVersion version = LatestVersion
public enum ServiceVersion
{
/// <summary>
/// The V1 of the token service.
/// The V2021_03_07 of the identity service.
/// </summary>
V1 = 1
#pragma warning disable CA1707 // Identifiers should not contain underscores
V2021_03_07 = 1,
#pragma warning restore CA1707 // Identifiers should not contain underscores
}
}
}

0 comments on commit 60a9aab

Please sign in to comment.