Post by tophercantrell on Feb 6, 2018 14:47:23 GMT
The Chassis.Power.PowerSupplies attribute is an array. I am browsing the Redfish mockups. Each item in the array is an object that has an "@odata.id". The last part of the id is "/PowerSupplies/0" or "/PowerSupplies/1" or "/PowerSupplies/N" where N is the index in the array.
Do all Redfish array items use the index like this on the end to identify a single element in the array?
In each entry in the PowerSupplies markup there is a MemberId attribute that follows the index. But the schema says that MemberId is optional. That leads me to believe the odata.id should end in the index.
However, for a complete technical explanation, these embedded objects (like PowerSupply found in the Power schema) are all defined as inheriting from "ReferenceableMembers". In Redfish, we use "ReferenceableMembers" to leverage the NavigationProperty linkage; it's possible for us to provide links to these objects via this mechanism without having to create a standalone "PowerSupply" resource (like with the PoweredBy reference found in Chassis). The @odata.id property in these nested objects needs to be constructed using the JSON Fragment format defined in RFC6901. So, since the PowerSupply objects are in the "PowerSupplies" array off the Power resource, the @odata.id property needs to be in the form of "<PowerResourceURI>#/PowerSupplies/<Index>".