|
Post by rajeeranjan on Jul 14, 2023 9:56:19 GMT
When we are validating a single URI-> we tend to skip validation for nested properties of navigational property. Is there a way to skip this in Redfish Service Validator.
For e.g. Below is the response of an URI, here "PowerWatts" is a navigational property. So the nested properties like "DataSourceUri", "Reading" are not validated while validating this "PowerWatts" property in Redfish Service Validator. { . "PowerWatts": { "@odata.id": "/redfish/v1/Chassis/HGX_Chassis_0/Sensors/HGX_Chassis_0_TotalHSC_Power_0", "DataSourceUri": "/redfish/v1/Chassis/HGX_Chassis_0/Sensors/HGX_Chassis_0_TotalHSC_Power_0", "Reading": 1280.0 } . }
is there a way to solve this issue ?
Thanks, Rajeev
|
|
|
Post by mraineri on Jul 14, 2023 12:17:22 GMT
The short answer is no, the tool is working as expected because these objects are expected to be just like embedded objects in a resource.
Excerpts are not intended to be navigation properties in the typical OData sense. The intent is they are treated just like embedded objects, but give hints as to where the data originates. In addition, services are allowed to use a "simple" excerpts where there is no underlying resource that backs the property (so you wouldn't find a DataSourceUri property). The usage of NavigationProperty and EntityType in CSDL is used for these as just a convenience so we don't need to copy/paste the same common definition.
In your example, there is also an extraneous "@odata.id" property. An excerpt object like this is not supposed to contain that. Excerpts replace the @odata.id property with DataSourceUri so that generic clients do not accidentally treat the excerpt as a reference object or expanded resource.
|
|