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

Support POST/PATCH/DELETE to cast segment following a collection

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_ERRATA03
    • Fix Version/s: V4.01_WD01
    • Component/s: Protocol, URL Conventions
    • Labels:
      None
    • Environment:

      [Proposed]

    • Proposal:
      Hide

      Support posting/patching/deleting to a type cast segment following a collection.

      For Post, the payload must be an instance of the type specified by the cast segment (or a type derived from the type specified by the cast segment) and does not require the @odata.type attribute unless it is of a derived type of the type specified in the type cast segment.

      For PATCH/DELETE, only those instances matching or derived from the cast segment are updated/deleted.

      Show
      Support posting/patching/deleting to a type cast segment following a collection. For Post, the payload must be an instance of the type specified by the cast segment (or a type derived from the type specified by the cast segment) and does not require the @odata.type attribute unless it is of a derived type of the type specified in the type cast segment. For PATCH/DELETE, only those instances matching or derived from the cast segment are updated/deleted.

      Description

      Today we support:
      GET ~Employees/ns.Manager

      in order to retrieve only those employees from the Employees entity set that are managers.

      It would be consistent to support:
      POST ~Employees/ns.Manager
      To add a manager to the Employees entity set without having to specify in the payload that the employee was an @odata.type=ns.Manager

      This would be particularly useful in cases where the cast segment specified a "marker type" that was trivially derived from the collection type.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: