summaryrefslogtreecommitdiff
path: root/src/components/smart_objects/include/smart_objects/default_shema_item.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/smart_objects/include/smart_objects/default_shema_item.h')
-rw-r--r--src/components/smart_objects/include/smart_objects/default_shema_item.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/components/smart_objects/include/smart_objects/default_shema_item.h b/src/components/smart_objects/include/smart_objects/default_shema_item.h
index 5978fcb282..beeeaac81f 100644
--- a/src/components/smart_objects/include/smart_objects/default_shema_item.h
+++ b/src/components/smart_objects/include/smart_objects/default_shema_item.h
@@ -53,12 +53,17 @@ class CDefaultSchemaItem : public ISchemaItem {
* @param Object Object to validate.
* @param report__ object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
+ * @param allow_unknown_enums
+ * false - unknown enum values (left as string values after applySchema)
+ * will be considered invalid.
+ * true - such values will be considered valid.
* @return ns_smart_objects::errors::eType
**/
- errors::eType validate(const SmartObject& Object,
- rpc::ValidationReport* report__,
- const utils::SemanticVersion& MessageVersion =
- utils::SemanticVersion()) OVERRIDE;
+ errors::eType validate(
+ const SmartObject& Object,
+ rpc::ValidationReport* report__,
+ const utils::SemanticVersion& MessageVersion = utils::SemanticVersion(),
+ const bool allow_unknown_enums = false) OVERRIDE;
/**
* @brief Set default value to an object.
@@ -105,7 +110,8 @@ template <typename Type>
errors::eType CDefaultSchemaItem<Type>::validate(
const SmartObject& Object,
rpc::ValidationReport* report__,
- const utils::SemanticVersion& MessageVersion) {
+ const utils::SemanticVersion& MessageVersion,
+ const bool allow_unknown_enums) {
if (getSmartType() != Object.getType()) {
std::string validation_info = "Incorrect type, expected: " +
SmartObject::typeToString(getSmartType()) +