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
The SDK automatically extracts the field masks of a device patch in Set operations. However, the extraction is in its current state simply extracting all possible leaf-paths of a patch without verifying whether they can be used as a valid field mask.
When e.g. trying to patch the locations property of a device, this leads to problems as the SDK tries to set field masks like locations.user.latitude, which is invalid because the location property can only be set as a whole.
Steps to Reproduce
Try to set e.g. the locations property of a device
Retrieve an error for using invalid field masks
What do you see now?
Not possible to set some properties of a device.
What do you want to see instead?
Correct field mask extraction and no errors.
Environment
SDK in node js or browser.
How do you propose to implement this?
The SDK needs to apply only the deepest possible field mask by checking back with the device entity map (sdk/js/generatesd/device-entity-map.json)
Additionally, this will necessitate an update to the device entity map which is set up quite roughly only at the moment.
Can you do this yourself and submit a Pull Request?
Yes.
The text was updated successfully, but these errors were encountered:
Summary
The SDK automatically extracts the field masks of a device patch in
Set
operations. However, the extraction is in its current state simply extracting all possible leaf-paths of a patch without verifying whether they can be used as a valid field mask.When e.g. trying to patch the
locations
property of a device, this leads to problems as the SDK tries to set field masks likelocations.user.latitude
, which is invalid because thelocation
property can only be set as a whole.Steps to Reproduce
locations
property of a deviceWhat do you see now?
Not possible to set some properties of a device.
What do you want to see instead?
Correct field mask extraction and no errors.
Environment
SDK in node js or browser.
How do you propose to implement this?
The SDK needs to apply only the deepest possible field mask by checking back with the device entity map (
sdk/js/generatesd/device-entity-map.json
)Additionally, this will necessitate an update to the device entity map which is set up quite roughly only at the moment.
Can you do this yourself and submit a Pull Request?
Yes.
The text was updated successfully, but these errors were encountered: