diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/AccountProperties.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/AccountProperties.cs index 534ad9221a..53c98c118f 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Settings/AccountProperties.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/AccountProperties.cs @@ -75,7 +75,7 @@ internal AccountProperties() /// /// ETags are used for concurrency checking when updating resources. /// - [JsonProperty(PropertyName = Constants.Properties.ETag)] + [JsonProperty(PropertyName = Constants.Properties.ETag, NullValueHandling = NullValueHandling.Ignore)] public string ETag { get; internal set; } /// @@ -89,7 +89,7 @@ internal AccountProperties() /// resource whether that is a database, a collection or a document. /// These resource ids are used when building up SelfLinks, a static addressable Uri for each resource within a database account. /// - [JsonProperty(PropertyName = Constants.Properties.RId)] + [JsonProperty(PropertyName = Constants.Properties.RId, NullValueHandling = NullValueHandling.Ignore)] internal string ResourceId { get; set; } [JsonProperty(PropertyName = Constants.Properties.WritableLocations)] diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/DatabaseProperties.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/DatabaseProperties.cs index 0a2d0d3097..e3a8287c6d 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Settings/DatabaseProperties.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/DatabaseProperties.cs @@ -112,7 +112,7 @@ public string Id /// /// ETags are used for concurrency checking when updating resources. /// - [JsonProperty(PropertyName = Constants.Properties.ETag)] + [JsonProperty(PropertyName = Constants.Properties.ETag, NullValueHandling = NullValueHandling.Ignore)] public string ETag { get; private set; } /// @@ -120,7 +120,7 @@ public string Id /// /// The last modified time stamp associated with the resource. [JsonConverter(typeof(UnixDateTimeConverter))] - [JsonProperty(PropertyName = Constants.Properties.LastModified)] + [JsonProperty(PropertyName = Constants.Properties.LastModified, NullValueHandling = NullValueHandling.Ignore)] public DateTime? LastModified { get; private set; } /// @@ -145,7 +145,7 @@ public string Id /// resource whether that is a database, a collection or a document. /// These resource ids are used when building up SelfLinks, a static addressable Uri for each resource within a database account. /// - [JsonProperty(PropertyName = Constants.Properties.RId)] + [JsonProperty(PropertyName = Constants.Properties.RId, NullValueHandling = NullValueHandling.Ignore)] internal string ResourceId { get; private set; } } } diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/PermissionProperties.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/PermissionProperties.cs index 715ef62de3..0c00855fec 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Settings/PermissionProperties.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/PermissionProperties.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.Cosmos public class PermissionProperties { /// - /// Initialize a new instance of the with permssion to . + /// Initialize a new instance of the with permission to . /// /// The permission id. /// The . @@ -40,7 +40,7 @@ public PermissionProperties(string id, } /// - /// Initialize a new instance of the with permssion to cosnmos item. + /// Initialize a new instance of the with permission to Cosmos item. /// /// The permission id. /// The . diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/StoredProcedureProperties.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/StoredProcedureProperties.cs index 585628d997..3249b4a716 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Settings/StoredProcedureProperties.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/StoredProcedureProperties.cs @@ -81,7 +81,7 @@ public string Id /// /// ETags are used for concurrency checking when updating resources. /// - [JsonProperty(PropertyName = Constants.Properties.ETag)] + [JsonProperty(PropertyName = Constants.Properties.ETag, NullValueHandling = NullValueHandling.Ignore)] public string ETag { get; private set; } /// @@ -89,7 +89,7 @@ public string Id /// /// The last modified timestamp associated with the resource. [JsonConverter(typeof(UnixDateTimeConverter))] - [JsonProperty(PropertyName = Constants.Properties.LastModified)] + [JsonProperty(PropertyName = Constants.Properties.LastModified, NullValueHandling = NullValueHandling.Ignore)] public DateTime? LastModified { get; private set; } /// @@ -114,7 +114,7 @@ public string Id /// resource whether that is a database, a collection or a document. /// These resource ids are used when building up SelfLinks, a static addressable Uri for each resource within a database account. /// - [JsonProperty(PropertyName = Constants.Properties.RId)] + [JsonProperty(PropertyName = Constants.Properties.RId, NullValueHandling = NullValueHandling.Ignore)] internal string ResourceId { get; private set; } } } diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/ThroughputProperties.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/ThroughputProperties.cs index 6373ca8db4..9c0ecf7680 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Settings/ThroughputProperties.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/ThroughputProperties.cs @@ -35,7 +35,7 @@ public class ThroughputProperties /// /// ETags are used for concurrency checking when updating resources. /// - [JsonProperty(PropertyName = Constants.Properties.ETag)] + [JsonProperty(PropertyName = Constants.Properties.ETag, NullValueHandling = NullValueHandling.Ignore)] public string ETag { get; private set; } /// @@ -43,8 +43,8 @@ public class ThroughputProperties /// /// The last modified time stamp associated with the resource. [JsonConverter(typeof(UnixDateTimeConverter))] - [JsonProperty(PropertyName = Constants.Properties.LastModified)] - public DateTime LastModified { get; private set; } + [JsonProperty(PropertyName = Constants.Properties.LastModified, NullValueHandling = NullValueHandling.Ignore)] + public DateTime? LastModified { get; private set; } /// /// Gets the provisioned throughput for a resource in measurement of request units per second in the Azure Cosmos service. @@ -69,13 +69,13 @@ public int? Throughput /// /// Gets the offer rid. /// - [JsonProperty(PropertyName = Constants.Properties.RId)] + [JsonProperty(PropertyName = Constants.Properties.RId, NullValueHandling = NullValueHandling.Ignore)] internal string OfferRID { get; private set; } /// /// Gets the resource rid. /// - [JsonProperty(PropertyName = Constants.Properties.OfferResourceId)] + [JsonProperty(PropertyName = Constants.Properties.OfferResourceId, NullValueHandling = NullValueHandling.Ignore)] internal string ResourceRID { get; private set; } [JsonProperty(PropertyName = "content", DefaultValueHandling = DefaultValueHandling.Ignore)] diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/TriggerProperties.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/TriggerProperties.cs index 76773e9133..befdd74be3 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Settings/TriggerProperties.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/TriggerProperties.cs @@ -75,7 +75,7 @@ public class TriggerProperties /// /// ETags are used for concurrency checking when updating resources. /// - [JsonProperty(PropertyName = Constants.Properties.ETag)] + [JsonProperty(PropertyName = Constants.Properties.ETag, NullValueHandling = NullValueHandling.Ignore)] public string ETag { get; private set; } /// diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/UserDefinedFunctionProperties.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/UserDefinedFunctionProperties.cs index a109b2b59d..639ded4993 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Settings/UserDefinedFunctionProperties.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/UserDefinedFunctionProperties.cs @@ -88,7 +88,7 @@ public class UserDefinedFunctionProperties /// /// ETags are used for concurrency checking when updating resources. /// - [JsonProperty(PropertyName = Constants.Properties.ETag)] + [JsonProperty(PropertyName = Constants.Properties.ETag, NullValueHandling = NullValueHandling.Ignore)] public string ETag { get; private set; } /// diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/UserProperties.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/UserProperties.cs index 2e563ac09d..5c7541f32f 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Settings/UserProperties.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/UserProperties.cs @@ -65,7 +65,7 @@ public string Id /// /// ETags are used for concurrency checking when updating resources. /// - [JsonProperty(PropertyName = Constants.Properties.ETag)] + [JsonProperty(PropertyName = Constants.Properties.ETag, NullValueHandling = NullValueHandling.Ignore)] public string ETag { get; private set; } /// @@ -73,7 +73,7 @@ public string Id /// /// The last modified time stamp associated with the resource. [JsonConverter(typeof(UnixDateTimeConverter))] - [JsonProperty(PropertyName = Constants.Properties.LastModified)] + [JsonProperty(PropertyName = Constants.Properties.LastModified, NullValueHandling = NullValueHandling.Ignore)] public DateTime? LastModified { get; private set; } /// @@ -98,7 +98,7 @@ public string Id /// resource whether that is a database, a collection or a document. /// These resource ids are used when building up SelfLinks, a static addressable Uri for each resource within a database account. /// - [JsonProperty(PropertyName = Constants.Properties.RId)] + [JsonProperty(PropertyName = Constants.Properties.RId, NullValueHandling = NullValueHandling.Ignore)] internal string ResourceId { get; set; } /// diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosJsonSeriliazerUnitTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosJsonSeriliazerUnitTests.cs index c564ec852d..e1091cf6d1 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosJsonSeriliazerUnitTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosJsonSeriliazerUnitTests.cs @@ -51,6 +51,73 @@ public void ValidateSerializer() } } + [TestMethod] + public void ValidatePropertySerialization() + { + string id = "testId"; + this.TestProperty( + id, + $@"{{""id"":""{id}"",""writableLocations"":[],""readableLocations"":[],""userConsistencyPolicy"":null,""addresses"":null,""userReplicationPolicy"":null,""systemReplicationPolicy"":null,""readPolicy"":null,""queryEngineConfiguration"":null,""enableMultipleWriteLocations"":false}}"); + + this.TestProperty( + id, + $@"{{""id"":""{id}""}}"); + + this.TestProperty( + id, + $@"{{""id"":""{id}"",""partitionKey"":{{""paths"":[],""kind"":""Hash""}}}}"); + + this.TestProperty( + id, + $@"{{""body"":""bodyCantBeNull"",""id"":""testId""}}"); + + this.TestProperty( + id, + $@"{{""body"":null,""triggerType"":""Pre"",""triggerOperation"":""All"",""id"":""{id}""}}"); + + this.TestProperty( + id, + $@"{{""body"":null,""id"":""{id}""}}"); + + this.TestProperty + (id, + $@"{{""id"":""{id}"",""_permissions"":null}}"); + + this.TestProperty( + id, + $@"{{""id"":""{id}"",""resource"":null,""permissionMode"":0}}"); + + this.TestProperty( + id, + $@"{{""id"":""{id}"",""operationType"":""Invalid"",""resourceType"":null,""resourceId"":null,""content"":null,""conflict_lsn"":0}}"); + + // Throughput doesn't have an id. + string defaultThroughputJson = @"{""Throughput"":null}"; + ThroughputProperties property = JsonConvert.DeserializeObject(defaultThroughputJson); + Assert.IsNull(property.Throughput); + string propertyJson = JsonConvert.SerializeObject(property, new JsonSerializerSettings() + { + Formatting = Formatting.None + }); + Assert.AreEqual(defaultThroughputJson, propertyJson); + } + + private void TestProperty(string id, string defaultJson) + { + dynamic property = JsonConvert.DeserializeObject(defaultJson); + Assert.AreEqual(id, property.Id); + string propertyJson = JsonConvert.SerializeObject(property, new JsonSerializerSettings() { + Formatting = Formatting.None + }); + + Assert.AreEqual(defaultJson, propertyJson); + // System properties should be ignored if null + Assert.IsFalse(propertyJson.Contains("_etag")); + Assert.IsFalse(propertyJson.Contains("_rid")); + Assert.IsFalse(propertyJson.Contains("_ts")); + Assert.IsFalse(propertyJson.Contains("_self")); + } + [TestMethod] public void ValidateJson() { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosSerializerCoreTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosSerializerCoreTests.cs index 4ebe93caed..05d9b87327 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosSerializerCoreTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosSerializerCoreTests.cs @@ -103,12 +103,12 @@ public void ValidateCustomSerializerNotUsedForInternalTypes() this.TestProperty( serializerCore, id, - $@"{{""id"":""{id}"",""_etag"":null,""_rid"":null,""writableLocations"":[],""readableLocations"":[],""userConsistencyPolicy"":null,""addresses"":null,""userReplicationPolicy"":null,""systemReplicationPolicy"":null,""readPolicy"":null,""queryEngineConfiguration"":null,""enableMultipleWriteLocations"":false}}"); + $@"{{""id"":""{id}"",""writableLocations"":[],""readableLocations"":[],""userConsistencyPolicy"":null,""addresses"":null,""userReplicationPolicy"":null,""systemReplicationPolicy"":null,""readPolicy"":null,""queryEngineConfiguration"":null,""enableMultipleWriteLocations"":false}}"); this.TestProperty( serializerCore, id, - $@"{{""id"":""{id}"",""_etag"":null,""_ts"":1576767176,""_rid"":null}}"); + $@"{{""id"":""{id}""}}"); this.TestProperty( serializerCore, @@ -118,22 +118,22 @@ public void ValidateCustomSerializerNotUsedForInternalTypes() this.TestProperty( serializerCore, id, - $@"{{""body"":""bodyCantBeNull"",""id"":""{id}"",""_etag"":null,""_ts"":1576767176,""_rid"":null}}"); + $@"{{""body"":""bodyCantBeNull"",""id"":""{id}""}}"); this.TestProperty( serializerCore, id, - $@"{{""body"":null,""triggerType"":""Pre"",""triggerOperation"":""All"",""id"":""{id}"",""_etag"":null}}"); + $@"{{""body"":null,""triggerType"":""Pre"",""triggerOperation"":""All"",""id"":""{id}""}}"); this.TestProperty( serializerCore, id, - $@"{{""body"":null,""id"":""{id}"",""_etag"":null}}"); + $@"{{""body"":null,""id"":""{id}""}}"); this.TestProperty( serializerCore, id, - $@"{{""id"":""{id}"",""_etag"":null,""_ts"":1576767176,""_rid"":null,""_permissions"":null}}"); + $@"{{""id"":""{id}"",""_permissions"":null}}"); this.TestProperty( serializerCore, @@ -146,7 +146,7 @@ public void ValidateCustomSerializerNotUsedForInternalTypes() $@"{{""id"":""{id}"",""operationType"":""Invalid"",""resourceType"":null,""resourceId"":null,""content"":null,""conflict_lsn"":0}}"); // Throughput doesn't have an id. - string defaultThroughputJson = @"{""_etag"":null,""_ts"":1576767176,""Throughput"":null,""_rid"":null,""offerResourceId"":null}"; + string defaultThroughputJson = @"{""Throughput"":null}"; ThroughputProperties property = JsonConvert.DeserializeObject(defaultThroughputJson); Assert.IsNull(property.Throughput); string propertyJson = JsonConvert.SerializeObject(property); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/DotNetSDKAPI.json index 1a69d20b5d..c455c8fbf1 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/DotNetSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/DotNetSDKAPI.json @@ -95,7 +95,7 @@ ], "MethodInfo": null }, - "System.String ETag[Newtonsoft.Json.JsonPropertyAttribute(PropertyName = \"_etag\")]": { + "System.String ETag[Newtonsoft.Json.JsonPropertyAttribute(NullValueHandling = 1, PropertyName = \"_etag\")]": { "Type": "Property", "Attributes": [ "JsonPropertyAttribute" @@ -2082,7 +2082,7 @@ ], "MethodInfo": "System.Nullable`1[System.DateTime] get_LastModified()" }, - "System.Nullable`1[System.DateTime] LastModified[Newtonsoft.Json.JsonConverterAttribute(typeof(Microsoft.Azure.Documents.UnixDateTimeConverter))]-[Newtonsoft.Json.JsonPropertyAttribute(PropertyName = \"_ts\")]": { + "System.Nullable`1[System.DateTime] LastModified[Newtonsoft.Json.JsonConverterAttribute(typeof(Microsoft.Azure.Documents.UnixDateTimeConverter))]-[Newtonsoft.Json.JsonPropertyAttribute(NullValueHandling = 1, PropertyName = \"_ts\")]": { "Type": "Property", "Attributes": [ "JsonConverterAttribute", @@ -2090,7 +2090,7 @@ ], "MethodInfo": null }, - "System.String ETag[Newtonsoft.Json.JsonPropertyAttribute(PropertyName = \"_etag\")]": { + "System.String ETag[Newtonsoft.Json.JsonPropertyAttribute(NullValueHandling = 1, PropertyName = \"_etag\")]": { "Type": "Property", "Attributes": [ "JsonPropertyAttribute" @@ -5516,7 +5516,7 @@ ], "MethodInfo": "System.Nullable`1[System.DateTime] get_LastModified()" }, - "System.Nullable`1[System.DateTime] LastModified[Newtonsoft.Json.JsonConverterAttribute(typeof(Microsoft.Azure.Documents.UnixDateTimeConverter))]-[Newtonsoft.Json.JsonPropertyAttribute(PropertyName = \"_ts\")]": { + "System.Nullable`1[System.DateTime] LastModified[Newtonsoft.Json.JsonConverterAttribute(typeof(Microsoft.Azure.Documents.UnixDateTimeConverter))]-[Newtonsoft.Json.JsonPropertyAttribute(NullValueHandling = 1, PropertyName = \"_ts\")]": { "Type": "Property", "Attributes": [ "JsonConverterAttribute", @@ -5531,7 +5531,7 @@ ], "MethodInfo": null }, - "System.String ETag[Newtonsoft.Json.JsonPropertyAttribute(PropertyName = \"_etag\")]": { + "System.String ETag[Newtonsoft.Json.JsonPropertyAttribute(NullValueHandling = 1, PropertyName = \"_etag\")]": { "Type": "Property", "Attributes": [ "JsonPropertyAttribute" @@ -5838,7 +5838,7 @@ ], "MethodInfo": null }, - "System.String ETag[Newtonsoft.Json.JsonPropertyAttribute(PropertyName = \"_etag\")]": { + "System.String ETag[Newtonsoft.Json.JsonPropertyAttribute(NullValueHandling = 1, PropertyName = \"_etag\")]": { "Type": "Property", "Attributes": [ "JsonPropertyAttribute" @@ -6043,7 +6043,7 @@ ], "MethodInfo": null }, - "System.String ETag[Newtonsoft.Json.JsonPropertyAttribute(PropertyName = \"_etag\")]": { + "System.String ETag[Newtonsoft.Json.JsonPropertyAttribute(NullValueHandling = 1, PropertyName = \"_etag\")]": { "Type": "Property", "Attributes": [ "JsonPropertyAttribute" @@ -7327,14 +7327,14 @@ "ThroughputProperties": { "Subclasses": {}, "Members": { - "System.DateTime get_LastModified()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "System.Nullable`1[System.DateTime] get_LastModified()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { "Type": "Method", "Attributes": [ "CompilerGeneratedAttribute" ], - "MethodInfo": "System.DateTime get_LastModified()" + "MethodInfo": "System.Nullable`1[System.DateTime] get_LastModified()" }, - "System.DateTime LastModified[Newtonsoft.Json.JsonConverterAttribute(typeof(Microsoft.Azure.Documents.UnixDateTimeConverter))]-[Newtonsoft.Json.JsonPropertyAttribute(PropertyName = \"_ts\")]": { + "System.Nullable`1[System.DateTime] LastModified[Newtonsoft.Json.JsonConverterAttribute(typeof(Microsoft.Azure.Documents.UnixDateTimeConverter))]-[Newtonsoft.Json.JsonPropertyAttribute(NullValueHandling = 1, PropertyName = \"_ts\")]": { "Type": "Property", "Attributes": [ "JsonConverterAttribute", @@ -7352,7 +7352,7 @@ "Attributes": [], "MethodInfo": null }, - "System.String ETag[Newtonsoft.Json.JsonPropertyAttribute(PropertyName = \"_etag\")]": { + "System.String ETag[Newtonsoft.Json.JsonPropertyAttribute(NullValueHandling = 1, PropertyName = \"_etag\")]": { "Type": "Property", "Attributes": [ "JsonPropertyAttribute" @@ -7932,7 +7932,7 @@ ], "MethodInfo": "System.Nullable`1[System.DateTime] get_LastModified()" }, - "System.Nullable`1[System.DateTime] LastModified[Newtonsoft.Json.JsonConverterAttribute(typeof(Microsoft.Azure.Documents.UnixDateTimeConverter))]-[Newtonsoft.Json.JsonPropertyAttribute(PropertyName = \"_ts\")]": { + "System.Nullable`1[System.DateTime] LastModified[Newtonsoft.Json.JsonConverterAttribute(typeof(Microsoft.Azure.Documents.UnixDateTimeConverter))]-[Newtonsoft.Json.JsonPropertyAttribute(NullValueHandling = 1, PropertyName = \"_ts\")]": { "Type": "Property", "Attributes": [ "JsonConverterAttribute", @@ -7940,7 +7940,7 @@ ], "MethodInfo": null }, - "System.String ETag[Newtonsoft.Json.JsonPropertyAttribute(PropertyName = \"_etag\")]": { + "System.String ETag[Newtonsoft.Json.JsonPropertyAttribute(NullValueHandling = 1, PropertyName = \"_etag\")]": { "Type": "Property", "Attributes": [ "JsonPropertyAttribute" diff --git a/changelog.md b/changelog.md index fbd4c11fac..2e59388045 100644 --- a/changelog.md +++ b/changelog.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - [#1105](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/1105) Custom serializer no longer calls SDK owned types that would cause serialization exceptions +- [#1112](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/1112) Fixed SDK properties like DatabaseProperties to have same JSON attributes - [#1116](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/1116) Fixed a deadlock on scenarios with SynchronizationContext while executing async query operations - [#1143](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/1143) Fixed permission resource link and authorization issue when doing a query with resource token for a specific partition key - [#1150](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/1150) Fixed NullReferenceException when using a non-existent Lease Container.