Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-811

Define propagation and overriding of annotations

    XMLWordPrintable

    Details

    • Proposal:
      Hide

      Propagation along inheritance hierarchies:

      • Annotations on structured types and their properties also propagate down from the base type to the derived types
      • Annotations can be overridden at the derived type or its properties with replace (PUT) semantics for all types of annotations: primitive, structured, collection-valued.

      Propagation along "uses" dependencies

      • It is up to the definition of the term to specify whether and how annotations with this term propagate to places where the annotated model element is used, and whether they can be overridden. E.g. a "Label" annotation for a UI can propagate from a type definition to all properties using that type, and may be overridden it in some cases with a more specific label, whereas an annotation marking a property as containing a phone number will propagate but may not be overridden.
      Show
      Propagation along inheritance hierarchies: Annotations on structured types and their properties also propagate down from the base type to the derived types Annotations can be overridden at the derived type or its properties with replace (PUT) semantics for all types of annotations: primitive, structured, collection-valued. Propagation along "uses" dependencies It is up to the definition of the term to specify whether and how annotations with this term propagate to places where the annotated model element is used, and whether they can be overridden. E.g. a "Label" annotation for a UI can propagate from a type definition to all properties using that type, and may be overridden it in some cases with a more specific label, whereas an annotation marking a property as containing a phone number will propagate but may not be overridden.

      Description

      We regularly face situations where we want to "propagate" annotations on a model element to all places where this model element is used/referenced, e.g. annotate an entity type and then have that annotation apply to all entity sets, or annotate a type definition and have that annotation apply to all properties or action parameters of that type.

      An explicit annotation on one of the usage/reference points would then overrule/modify the annotation on the used/referenced construct.

      The current specification text seems to implicitly assume this behavior, but doesn't explicitly state rules on

      • where do annotations propagate to?
      • how are structured annotations modified? PATCH semantics if only partially specified?

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              handl Ralf Handl
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: