diff --git a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/api/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub.netstandard2.0.cs b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/api/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub.netstandard2.0.cs index ee553b8d299cd..0fb76e2439423 100644 --- a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/api/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub.netstandard2.0.cs +++ b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/api/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub.netstandard2.0.cs @@ -169,7 +169,7 @@ public UserEventResponse() { } public UserEventResponse(System.BinaryData data, Microsoft.Azure.Functions.Worker.WebPubSubDataType dataType) { } public UserEventResponse(string data, Microsoft.Azure.Functions.Worker.WebPubSubDataType dataType = Microsoft.Azure.Functions.Worker.WebPubSubDataType.Text) { } [System.Text.Json.Serialization.JsonPropertyNameAttribute("states")] - public System.Collections.Generic.IReadOnlyDictionary ConnectionStates { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyDictionary ConnectionStates { get { throw null; } } [System.Text.Json.Serialization.JsonPropertyNameAttribute("data")] public System.BinaryData Data { get { throw null; } set { } } [System.Text.Json.Serialization.JsonPropertyNameAttribute("dataType")] diff --git a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/ConnectEventResponse.cs b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/ConnectEventResponse.cs index 2dd1c8f07bda6..cfe700cd4005d 100644 --- a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/ConnectEventResponse.cs +++ b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/ConnectEventResponse.cs @@ -6,6 +6,7 @@ using System.ComponentModel; using System.Linq; using System.Text.Json.Serialization; +using Microsoft.Azure.WebPubSub.Common; namespace Microsoft.Azure.Functions.Worker { @@ -35,6 +36,7 @@ internal override WebPubSubStatusCode StatusCode /// The connection states. /// [JsonPropertyName("states")] + [JsonConverter(typeof(ConnectionStatesConverter))] public IReadOnlyDictionary ConnectionStates => _states; /// diff --git a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/UserEventResponse.cs b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/UserEventResponse.cs index 801a0377dcd78..92c57e61f4821 100644 --- a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/UserEventResponse.cs +++ b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/UserEventResponse.cs @@ -6,6 +6,7 @@ using System.ComponentModel; using System.Runtime.Serialization; using System.Text.Json.Serialization; +using Microsoft.Azure.WebPubSub.Common; namespace Microsoft.Azure.Functions.Worker { @@ -36,7 +37,8 @@ internal override WebPubSubStatusCode StatusCode /// The connection states. /// [JsonPropertyName("states")] - public IReadOnlyDictionary ConnectionStates { get; set; } + [JsonConverter(typeof(ConnectionStatesConverter))] + public IReadOnlyDictionary ConnectionStates => _states; /// /// Message.