DMTF / Redfish-Service-Validator

The Redfish Service Validator is a Python3 tool for checking conformance of any "device" with a Redfish service interface against Redfish CSDL schema
Other
37 stars 33 forks source link

Break out of object schema mapping if not an object #573

Closed mraineri closed 5 months ago

mraineri commented 5 months ago

Found an issue related to mapping objects to schema definitions. This comes up in particular when an OEM extension is not providing @odata.type. The tool tries to dynamically map a definition and keep stepping into properties, but hits a point where it will break down on leaf properties. The change adds a missing return statement when it finds the property is not an object; not returning there guarantees an exception when it tries to pull out its @odata.type property.

Long term it might be worth rechecking this flow to not even attempt to map it in the first place, but that might take more time than its worth at the moment.