You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to https://developers.google.com/drive/api/v3/performance#partial requests to API responses that use "data" wrappers, where the response is nested within a data object that looks like data: { ... }, one should not include "data" in the fields specification.
So instead of "fields=data(a,b)" it should be specified like "fields=a,b".
In this case the filtering is only applied to the data property; any other properties of the wrapper object should not be filtered. Eg. { "success": true, "data": { ... } }
To not break the old versions this could be implemented as a property like with IgnoreCase on PartialJsonMediaTypeFormatter.
The text was updated successfully, but these errors were encountered:
Sorry for the delay, this project hasn’t had the focus it should have had. The documentation isn’t very explicit on the data field, but if I understand correctly, the data field is always in the first level of the JSON response, eg.:
{
“success”: true,
“data”: {
...
}
}
And filtering fields only affects fields in the data field, so other fields (success in this example) can’t be filtered (of course, only if the option is enabled).
Please let me know if you agree on this. I will think of a solution for this and get back to you. Suggestions are welcome!
From my experience the data is always either on root level (without wrapper) or on 1st level (data field or alternative). I never saw any other options so I also agree that it's safe to assume it.
According to https://developers.google.com/drive/api/v3/performance#partial requests to API responses that use "data" wrappers, where the response is nested within a data object that looks like data: { ... }, one should not include "data" in the fields specification.
So instead of "fields=data(a,b)" it should be specified like "fields=a,b".
In this case the filtering is only applied to the data property; any other properties of the wrapper object should not be filtered. Eg. { "success": true, "data": { ... } }
To not break the old versions this could be implemented as a property like with IgnoreCase on PartialJsonMediaTypeFormatter.
The text was updated successfully, but these errors were encountered: