Format readjson
clang-format may potentially reformat the readJson calls if they may
have more keys or key names are longer. This makes formatting in a way
that's readable by forcing to break a line for each key using an
empty-comment (`//`) each line.
It also allows trivially alphabetizing the list such that new additions
are less likely to have merge conflicts.
Tested:
- Check whitespace only.
- Code compiles.
- Redfish Service Validator with the same results before this
Change-Id: I3824a8c4faa9fa7c820d5d2fab6b565404926e2c
Signed-off-by: Ed Tanous <etanous@nvidia.com>
Signed-off-by: Myung Bae <myungbae@us.ibm.com>
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index bf1a250..7c2c5f4 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -594,8 +594,11 @@
// 1) TransferProtocol:TFTP ImageURI:1.1.1.1/myfile.bin
// 2) ImageURI:tftp://1.1.1.1/myfile.bin
- if (!json_util::readJsonAction(req, asyncResp->res, "TransferProtocol",
- transferProtocol, "ImageURI", imageURI))
+ if (!json_util::readJsonAction( //
+ req, asyncResp->res, //
+ "ImageURI", imageURI, //
+ "TransferProtocol", transferProtocol //
+ ))
{
BMCWEB_LOG_DEBUG("Missing TransferProtocol or ImageURI parameter");
return;
@@ -766,9 +769,11 @@
return std::nullopt;
}
- if (!json_util::readJsonObject(
- *obj, asyncResp->res, "Targets", tempTargets,
- "@Redfish.OperationApplyTime", multiRet.applyTime))
+ if (!json_util::readJsonObject( //
+ *obj, asyncResp->res, //
+ "@Redfish.OperationApplyTime", multiRet.applyTime, //
+ "Targets", tempTargets //
+ ))
{
return std::nullopt;
}