forked from googleapis/google-api-go-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ForceSendFields doesn't quite cover all the cases needed to correctly patch a resource. Sometimes you have to send a JSON null to clear a value; the zero value won't do. Two examples from storage/v1.Objects.Patch: - It is an error to send "" as the value of ContentLanguage. - Sending the empty JSON map `{}` for Metadata is a no-op. In both these cases, to clear the value you must send a null. This CL: - Adds a NullFields field to each resource, to complement ForceSendFields. - Modifies the custom JSON marshalling logic to send null for any field in NullFields (and return an error for a non-empty field in NullFields). - Regenerates all the clients. - Updates the goldens in testdata. Change-Id: I748921ae83e2df6fb2f168a87075615955fcc656 Reviewed-on: https://code-review.googlesource.com/8010 Reviewed-by: Jonathan Amsterdam <[email protected]>
- Loading branch information
Showing
191 changed files
with
61,747 additions
and
6,732 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.