Account Service: Remove odata.context
Redfish made odata.context optional (1.6.0 of DSP0266).
Redfish has removed odata.context from example payloads in the
specification (1.7.0 of DSP0266), removed it from the mockups,
and Redfish recommended not using.
The reason for making optional and removing from mockups/examples,
"no one could figure out how to use it and it did not add value".
Don't see value in it for our implementation.
From the Redfish issue removing it:
"@odata.context provides little/no value. The common format we use
provides no value/guidance. A generic odata client cannot use it
because we don't return the specific version nor do we require it
be changed with a query parameter. Between @odata.type and the
metadata document and service document/service root, clients get
all of the information they need. And the case where it is
helpful (joins, etc) is something we never do."
https://github.com/DMTF/Redfish-Service-Conformance-Check/pull/171
removes from Redfish-Service-Conformance-Check.
Tested: Ran service validator. No errors.
Ran Redfish-Service-Conformance-Check. No additional errors.
Change-Id: Ic2c33080604ea275cf487e5cd5b9f7948af07db9
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index 600c1a2..055a37b 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -1138,8 +1138,6 @@
auto asyncResp = std::make_shared<AsyncResp>(res);
res.jsonValue = {
- {"@odata.context", "/redfish/v1/"
- "$metadata#AccountService.AccountService"},
{"@odata.id", "/redfish/v1/AccountService"},
{"@odata.type", "#AccountService."
"v1_4_0.AccountService"},
@@ -1347,11 +1345,7 @@
const std::vector<std::string>& params) override
{
auto asyncResp = std::make_shared<AsyncResp>(res);
- res.jsonValue = {{"@odata.context",
- "/redfish/v1/"
- "$metadata#ManagerAccountCollection."
- "ManagerAccountCollection"},
- {"@odata.id", "/redfish/v1/AccountService/Accounts"},
+ res.jsonValue = {{"@odata.id", "/redfish/v1/AccountService/Accounts"},
{"@odata.type", "#ManagerAccountCollection."
"ManagerAccountCollection"},
{"Name", "Accounts Collection"},
@@ -1561,8 +1555,6 @@
}
asyncResp->res.jsonValue = {
- {"@odata.context",
- "/redfish/v1/$metadata#ManagerAccount.ManagerAccount"},
{"@odata.type", "#ManagerAccount.v1_0_3.ManagerAccount"},
{"Name", "User Account"},
{"Description", "User Account"},