Redfish-Service-Validator icon indicating copy to clipboard operation
Redfish-Service-Validator copied to clipboard

Redfish Service Validator issue related to Oem Schema

Open manipk01 opened this issue 1 year ago • 1 comments

Hi All,

When i ran the Redfish Service Validator to validate redfish service. Below mentioned issue came for the URI

URI:

/redfish/v1/Systems/{{instance}}

Issue:

ERROR - contoso : EntityType resource does not contain required @odata.id property, attempting default /contoso

Response:

{ "@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem", "@odata.etag": ""1697014972"", "@odata.id": "/redfish/v1/Systems/{{instance}}", "@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem", ................... ................... ................... "Oem": { "contoso": { "@odata.type": "#Contoso.v1_0_0.Contoso", "property1" : "value" "property2" : "value" } } ................. ................. ................. }

Schema (Contoso_v1.xml) : Schema File.zip

When i change the Entity type to complex type in schema part

<EntityType Name="Contoso" BaseType="Contoso.Contoso"> <Annotation Term="OData.Description" String="This property shall specify a valid odata or Redfish property."/> <Annotation Term="OData.LongDescription" String="This property shall specify a valid odata or Redfish property."/> <Property Name="property1" Type="Contoso.v1_0_0.property1" Nullable="false"></Property> <Property Name="property2" Type="Contoso.v1_0_0.property2" Nullable="false"></Property> </EntityType>

to

<ComplexType Name="Contoso" BaseType="Contoso.Contoso"> <Annotation Term="OData.Description" String="This property shall specify a valid odata or Redfish property."/> <Annotation Term="OData.LongDescription" String="This property shall specify a valid odata or Redfish property."/> <Property Name="property1" Type="Contoso.v1_0_0.property1" Nullable="false"></Property> <Property Name="property2" Type="Contoso.v1_0_0.property2" Nullable="false"></Property> </ComplexType>

it is working fine. So whether we can change to complex type for fixing this error or it needs to check from tool side. Complete schema file is attached for your reference.

Please check and confirm it.

Thanks, Mani P K

manipk01 avatar Oct 13 '23 18:10 manipk01

That behavior looks correct then. When you define something as an EntityType in CSDL, the expectation is it's a resource with a durable URI (shown by an @odata.id propert). OEM objects are not intended to be like this; they are just JSON objects in a resource, which means you need to use ComplexType to define that structure.

mraineri avatar Oct 13 '23 19:10 mraineri

Closing; issue with the OEM definition and not the tool

mraineri avatar May 10 '24 19:05 mraineri