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

Clarify: PATCH should allow changing type on nested complex type

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: V4.01_OS
    • Fix Version/s: V4.01_ERRATA01
    • Component/s: Protocol
    • Labels:
      None
    • Environment:

      Closed as applied 2023-10-15.

    • Proposal:
      Hide

      A complex-typed property can be set to different type in a PATCH request by specifying a different type in the update payload.  Properties shared through inheritance, as well as dynamic properties, are retained (unless overwritten by new values in the payload). Other properties of the original type are discarded.

      Show
      A complex-typed property can be set to different type in a PATCH request by specifying a different type in the update payload.  Properties shared through inheritance, as well as dynamic properties, are retained (unless overwritten by new values in the payload). Other properties of the original type are discarded.
    • Resolution:
      Show
      https://github.com/oasis-tcs/odata-specs/pull/141

      Description

      We say that a PATCH request to an entity with a complex type in the payload also patches the nested complex type (i.e., it only affects the properties specified in the request).

      We don't say whether or not the PATCH request can change the complex type of the nested property.

      While changing the type of an entity should not be allowed (and is, in fact, explicitly prohibited) because entities define an instance, the type of a complex-typed property should be able to be changed in a PATCH request by specifying a new complex type (i.e., @odata.type) in the payload.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: