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

External targeting for action/function overloads

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_CS01
    • Fix Version/s: V4.01_CS02
    • Component/s: CSDL JSON, CSDL XML
    • Labels:
      None
    • Environment:

      Applied

    • Proposal:
      Hide

      Allow external targeting of individual action/function overload with syntax similar to action/function advertisement in JSON data by optionally appending the overload signature to the action/function name.

      The signature consists of parentheses containing

      • for unbound actions: nothing, just the parentheses
      • for bound actions: the name of the first (binding) parameter type
      • for functions: the comma-separated ordered list of parameter types (including the binding parameter type at the first position for bound overloads)

       

      Examples:

      MySchema.MyAction(MySchema.BindingParameterType)
      MySchema.MyFunction(MySchema.BindingParameterType,First.NonBinding.ParameterType,Second.NonBinding.ParameterType)
      
      Show
      Allow external targeting of individual action/function overload with syntax similar to action/function advertisement in JSON data by optionally appending the overload signature to the action/function name. The signature consists of parentheses containing for unbound actions: nothing, just the parentheses for bound actions: the name of the first (binding) parameter type for functions: the comma-separated ordered list of parameter types (including the binding parameter type at the first position for bound overloads)   Examples: MySchema.MyAction(MySchema.BindingParameterType) MySchema.MyFunction(MySchema.BindingParameterType,First.NonBinding.ParameterType,Second.NonBinding.ParameterType)
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/64186/odata-csdl-json-v4.01-wd05-2018-11-02.docx https://www.oasis-open.org/committees/download.php/64187/odata-csdl-xml-v4.01-wd06-2018-11-02.docx

      Description

      Section 14.2.2 Target describes which model elements can be annotated via external targeting.

      Currently actions and functions can only be summarily targeted, i.e. the (external) annotation applies to all overloads.

        Attachments

          Activity

          Hide
          mikep Michael Pizzo (Inactive) added a comment - - edited

          In the past we have convinced ourselves that we didn't need to differentiate between applying annotations to individual overloads. We now have scenarios for annotating different overloads differently that requires external annotations.

          What about unbound actions and functions?

          Could alternatively define overloads based on unordered set of parameter names (including binding parameter) but that would differ more from the JSON representation.

           

          Show
          mikep Michael Pizzo (Inactive) added a comment - - edited In the past we have convinced ourselves that we didn't need to differentiate between applying annotations to individual overloads. We now have scenarios for annotating different overloads differently that requires external annotations. What about unbound actions and functions? Could alternatively define overloads based on unordered set of parameter names (including binding parameter) but that would differ more from the JSON representation.  
          Hide
          mikep Michael Pizzo (Inactive) added a comment -

          Resolved as amended 2018-5-17

          Show
          mikep Michael Pizzo (Inactive) added a comment - Resolved as amended 2018-5-17
          Hide
          handl Ralf Handl added a comment - - edited

          Michael Pizzo: Thinking about having to process these external annotations it would be better to append the ordered list of parameter types instead of the binding parameter type and the unordered list of non-binding parameter names.

          Luckily the ordered list of all parameter types also has to be unique, and using it would allow to construct the one and only target for a given overload when looking for external annotations targeting that overload.

          Show
          handl Ralf Handl added a comment - - edited Michael Pizzo : Thinking about having to process these external annotations it would be better to append the ordered list of parameter types instead of the binding parameter type and the unordered list of non-binding parameter names . Luckily the ordered list of all parameter types also has to be unique, and using it would allow to construct the one and only target for a given overload when looking for external annotations targeting that overload.
          Hide
          mikep Michael Pizzo (Inactive) added a comment -

          Proposal revised in 2018-9-20 TC Meeting to use ordered list of parameter types rather than unordered list of parameter names. This makes it easier to look up at the expense of differing from the json format for advertising functions.

          Show
          mikep Michael Pizzo (Inactive) added a comment - Proposal revised in 2018-9-20 TC Meeting to use ordered list of parameter types rather than unordered list of parameter names. This makes it easier to look up at the expense of differing from the json format for advertising functions.
          Hide
          handl Ralf Handl added a comment -

          This also affects evaluation of path expressions: mention targeting of parameters and return types.

          Show
          handl Ralf Handl added a comment - This also affects evaluation of path expressions: mention targeting of parameters and return types.
          Hide
          mikep Michael Pizzo (Inactive) added a comment -

          Closed as applied 2019-6-6.

          Show
          mikep Michael Pizzo (Inactive) added a comment - Closed as applied 2019-6-6.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: