-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed public properties to have same JSON attributes #1112
Conversation
…system types. PermissionProperties is now modified to be nullable to match the rest of the resource types.
Microsoft.Azure.Cosmos/src/Resource/Settings/PermissionProperties.cs
Outdated
Show resolved
Hide resolved
@@ -35,23 +35,23 @@ public class ThroughputProperties | |||
/// <remarks> | |||
/// ETags are used for concurrency checking when updating resources. | |||
/// </remarks> | |||
[JsonProperty(PropertyName = Constants.Properties.ETag)] | |||
[JsonProperty(PropertyName = Constants.Properties.ETag, NullValueHandling = NullValueHandling.Ignore)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this breaking today? or what's the reason to add the NullValueHandling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Half of the properties have the ignore the other don't. It seems like making it consistent between all the types was missed. Serializing a null _etag or other system properties and sending it to the backend only increase payload size and has no benefit.
…com/Azure/azure-cosmos-dotnet-v3 into users/jawilley/bug/lastmodifiedtime
Pull Request Template
Description
This fixes all the public properties to have the same JSON attributes for the same public property like etag.
Type of change
Please delete options that are not relevant.
Closing issues
closes #1111