DMTF / RDE-Dictionary

Dictionary generator for Redfish Device Enablement
Other
4 stars 5 forks source link

Fixes dictionary selector bit when encoding/decoding complex annotations #34

Closed ahrytsen closed 3 years ago

ahrytsen commented 3 years ago

Fixes #33

bnatrajan commented 3 years ago

@ahrytsen, as indicated in the issue, there is a need for a new bit to indicate a 'top-level annotation'. This will be available as part of RDE 1.1.

The changes in this pull request will break annotations with complex objects that don't use a top-level annotation. As an example:

 {
   "@Redfish.CollectionCapabilities": {
      "Capabilities": [
         {
            "CapabilitiesObject": {}
         }
      ]
   }
}
ahrytsen commented 3 years ago

@bnatrajan, haven't understood this: "annotations with complex objects that don't use a top-level annotation". In your example there is a top level property "@Redfish.CollectionCapabilities"....(and it should have bit) Inside "CapabilitiesObject": {} should be "@odata.id" which is also from top level and should have that bit as 1.

bnatrajan commented 3 years ago

@ahrytsen, how about the "Capabilities" property itself? This must also have the annotation bit set. Also the annotation bit needs to be set for the "CapabilitiesObject" property as well.
Essentially all nested properties within an annotation property will need to have the bit set.