buffet: GCD command defintion. Compound object type support. Added support for "object" type. Refactored parameter validation to make sure we have object schema context when we validate a value of parameter. Parameter |schema| was used in two different contexts, as both a base parameter definition and as a custom object definition. Renamed the former to be 'base_schema' and latter as 'object_schema' to remove the confusion. Extracted common data type manipulation functions into schema_utils.cc/.h files. BUG=chromium:374860 TEST=All unit tests pass. Change-Id: I6c3549849a258bcc94b3d754acd14e072438d140 Reviewed-on: https://chromium-review.googlesource.com/204793 Tested-by: Alex Vakulenko <avakulenko@chromium.org> Reviewed-by: Christopher Wiley <wiley@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/commands/schema_constants.h b/buffet/commands/schema_constants.h index 0e58cff..087f53b 100644 --- a/buffet/commands/schema_constants.h +++ b/buffet/commands/schema_constants.h
@@ -18,8 +18,11 @@ extern const char kPropTypeChanged[]; extern const char kUnknownType[]; extern const char kInvalidPropDef[]; +extern const char kInvalidPropValue[]; extern const char kNoTypeInfo[]; extern const char kPropertyMissing[]; +extern const char kUnknownProperty[]; +extern const char kInvalidObjectSchema[]; } // namespace errors namespace attributes { @@ -34,6 +37,10 @@ extern const char kString_MaxLength[]; extern const char kOneOf_Enum[]; +extern const char kOneOf_Metadata[]; +extern const char kOneOf_MetaSchema[]; + +extern const char kObject_Properties[]; } // namespace attributes } // namespace commands