kiota icon indicating copy to clipboard operation
kiota copied to clipboard

Add support for bulk updates

Open darrelmiller opened this issue 4 years ago • 3 comments

darrelmiller avatar Mar 30 '21 14:03 darrelmiller

@darrelmiller can you add a sample for that in the YAML files please?

baywet avatar Mar 30 '21 15:03 baywet

Sample payload

PATCH 
{
  "@type": "#Northwind.Manager",
  "FirstName": "Patricia",
  "DirectReports@delta": [
    {
      "@removed": {
        "reason": "deleted"
      },
      "id": "3"
    },
    {
      "@removed": {
        "reason": "changed"
      },
      "id": "4"
    },
    {
      "id": "5"
    },
    {
      "id": "6",
      "LastName": "Smith"
    },
    {
      "FirstName": "Suzanne",
      "LastName": "Brown"
    }
  ]
}
'''

I need to think about how to model this in the OpenAPI.

darrelmiller avatar Apr 07 '21 19:04 darrelmiller

Implement special method on RequestBuilder that accepts something like:

   graphClient.Users[<id>].PatchBulk(Delta<User> userDelta );

ewww.

darrelmiller avatar Sep 17 '21 16:09 darrelmiller

I don't think any of that has ground in OpenAPI semantics. OData has some semantics for delta patching, although I've only seen it used when listing changes (change tracking/delta queries), never used from the client updating the data. I'm going to close this, we can always re-open when OpenAPI has semantics for that. Also, if an API supports that can of semantics (delta patch via annotation which is not a defined property), they can already do that through the additional data manager today.

baywet avatar Nov 10 '22 18:11 baywet