Fiori annotations
Describing a service so a Fiori client can render it without hand-written UI code — titles, value helps, hierarchies and visibility expressed as model annotations rather than screen logic.
Overview
The compiler translates annotations from the OASIS and SAP OData vocabularies, @UI and @Common among them, into the EDMX a Fiori elements client reads, with names and positions exactly as the vocabularies specify them, so every term in those vocabularies is available without a mapping written per term. CDS shortcuts sit on top: @title and @description map to @Common.Label and @Core.Description, @cds.odata.valuelist gives every managed association that targets the annotated entity a value list and is already set on the reuse types of @sap/cds/common, and @hierarchy expands to the annotate and extend statements a tree view would otherwise need by hand. A vocabulary SAP does not ship enters the translation through the cds.cdsc.odataVocabularies configuration, which names its alias, namespace and URI. During development the Fiori preview link on the index page serves a list page from the annotations before any app exists.
Not covered: It stops at translating what the model states. Labels, read-only and mandatory fields, value lists on managed associations and recursive hierarchies have a CDS shortcut; every other term, UI.LineItem and UI.SelectionFields among them, is written out in the vocabulary's own structure. A field that is not a managed association gets no value list from the shortcut. A tree view still needs the hierarchy qualifier and the TreeTable setting in the UI5 app's manifest.json, which is the app's file rather than the model's. Hiding a control by role takes a singleton and an on handler of the developer's own. For a vocabulary outside the standard set the compiler has no access to the vocabulary's content, so the values are translated generically and nothing checks that a term is applied where it belongs. The preview is disabled in production.
Three cds-plugins write Fiori vocabulary terms a model would otherwise carry by hand. @mpah/enum-value-help@mpah/enum-value-helpA CAP plugin that generates value help for enum fields from an @enumValueHelp annotation, serving the enum's values from one generated entity instead of hand-written OData annotations.independent, cap covers the case the value-list shortcut leaves alone, a field typed by a CDS enum, by adding @Common.ValueList against a generated view of the enum's own values. cap-js-geoloc-plugincap-js-geoloc-pluginA CAP plugin for geocoding, address correction and route calculation, driven by three annotations on the model, with the geocoder and router chosen in configuration from providers such as OSRM and Nominatim.independent, cap generates the actions, and under autoCalculate the side effects, that its own address and route annotations imply. urp-vocaburp-vocabA CDS vocabulary for User-Rendered Patterns, with @urp.display annotations describing views, card templates, layouts and sections on an entity, consumed by the author's own matching renderer.independent, cap publishes a vocabulary of its author's own rather than SAP's, so what reads it has to be a matching renderer.
Artifacts
Content
Show 41 more
Seen working
Neither the package manifest nor the repository tree declares a licence.
Neither the package manifest nor the repository tree declares a licence.
Neither the package manifest nor the repository tree declares a licence.
Details
Coverage
For your agent
- Ref
capability:fiori-annotations- JSON
- /capabilities/fiori-annotations.json
- MCP
- Connecting an agent