Service Protocols


OData Annotations

CDS applies a generic, isomorphic approach, with names and positions of annotations exactly as specified in the OData Vocabularies, and defaults for mapping literal types to respective property entries.

For example:

  {Value:foo, Label:'Fooo'},

… translates into this EDMX:

<Annotation Term="UI.LineItem">
    <Record Type="UI.DataField">
      <PropertyValue Property="Value" Path="foo"/>
      <PropertyValue Property="Label" String="Fooo"/>
    <Record Type="UI.DataField">
      <PropertyValue Property="Value" Path="bar"/>

The mapping is aware of OData Vocabularies, which allows to omit properties based on defaults, for example, the record types above. You can add them, if required. For example, the above can also be written with explicitly specified record types:

  {$Type:'UI.DataField', Value:foo, Label:'Fooo'},
  {$Type:'UI.DataField', Value:bar}

learn more on OData Annotations in CDS



Custom Protocols