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

Chapter 15/16: advertise actions on collection-valued properties

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_WD01
    • Fix Version/s: V4.01_WD01
    • Component/s: JSON Format
    • Labels:
      None
    • Environment:

      Proposed

    • Proposal:
      Hide

      Prefix the advertisement with the primitive- or collection-valued property name and place it next to the property, similar to annotations on navigation properties:

      "NavProp#Model.SomeAction":

      { "title": "Do Something", "target": "Managers(22)/Employees/DoSomething" }

      ,
      "NavProp": [ ... ]

      Services must only returned this syntax in an OData 4.01 response.

      These advertisement can appear any time.
      They don't need to be included in an expand if not explicitly requested.
      They must appear if explicitly requested (i.e., through expand that explicitly selects the action/function).
      If only the function/action is selected in the expand, then the nav property itself does not need to be included in the response; only the action/function advertisements.

      Show
      Prefix the advertisement with the primitive- or collection-valued property name and place it next to the property, similar to annotations on navigation properties: "NavProp#Model.SomeAction": { "title": "Do Something", "target": "Managers(22)/Employees/DoSomething" } , "NavProp": [ ... ] Services must only returned this syntax in an OData 4.01 response. These advertisement can appear any time. They don't need to be included in an expand if not explicitly requested. They must appear if explicitly requested (i.e., through expand that explicitly selects the action/function). If only the function/action is selected in the expand, then the nav property itself does not need to be included in the response; only the action/function advertisements.

      Description

      Bound actions and functions can be advertised:

      • within the representation of the instance if the binding parameter is single-valued
      • within the representation of a collection if the binding parameter is collection-valued

      The representation for single-valued binding also works if the single instance is embedded within another response, e.g. for expanded entities.

      What's missing is a representation of the collection-valued binding, e.g. for navigation properties where the action would take all related entities as binding parameter value.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: