Remove object schema parsing in CommandDefinition
The only thing we now care about in CommandDefinition is the
"minimalRole" field. Everything else is a black-box which we just
forward to the server without any semantic parsing.
Also completely removed command visibility support since it no
longer applies to trait/component model.
BUG: 25841230
Change-Id: Ie8fff57ffada289caa7876c2a53150bb116fd65b
Reviewed-on: https://weave-review.googlesource.com/1617
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
diff --git a/src/device_registration_info.cc b/src/device_registration_info.cc
index 751e530..d60b6cb 100644
--- a/src/device_registration_info.cc
+++ b/src/device_registration_info.cc
@@ -480,9 +480,8 @@
std::unique_ptr<base::DictionaryValue>
DeviceRegistrationInfo::BuildDeviceResource(ErrorPtr* error) {
// Limit only to commands that are visible to the cloud.
- auto commands = command_manager_->GetCommandDictionary().GetCommandsAsJson(
- [](const CommandDefinition* def) { return def->GetVisibility().cloud; },
- true, error);
+ auto commands =
+ command_manager_->GetCommandDictionary().GetCommandsAsJson(error);
if (!commands)
return nullptr;