Fix the MessageArgs parameter type
Since the type of MessageArgs is an array, and its items
type is only a string in Redfish JsonSchemas, it does not
include other types(int).
refer to:
http://redfish.dmtf.org/schemas/v1/Message.v1_1_1.json#/definitions/Message
Tested:
When creating a new task, the test results are as follows:
Before fix:
ERROR - Messages[1].MessageArgs[1]: Expected string value,
got type class 'int'
After fix:
Validator passes.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I1f00ada9df61cbdb0187cc82529a632fbabb5b10
diff --git a/redfish-core/include/task_messages.hpp b/redfish-core/include/task_messages.hpp
index 33c2db5..cbf4f00 100644
--- a/redfish-core/include/task_messages.hpp
+++ b/redfish-core/include/task_messages.hpp
@@ -83,7 +83,7 @@
{"MessageId", "TaskEvent.1.0.1.TaskProgressChanged"},
{"Message", "The task with id " + arg1 + " has changed to progress " +
std::to_string(arg2) + " percent complete."},
- {"MessageArgs", {arg1, arg2}},
+ {"MessageArgs", {arg1, std::to_string(arg2)}},
{"Severity", "OK"},
{"Resolution", "None."}};
}