Azure / azure-sdk-for-rust

This repository is for the active development of the Azure SDK for Rust. For consumers of the SDK we recommend visiting Docs.rs and looking up the docs for any of libraries in the SDK.
MIT License
714 stars 248 forks source link

[Cosmos] Patch item APIs #1914

Closed analogrelay closed 3 days ago

analogrelay commented 1 week ago

This PR adds the ContainerClient::patch_item API, which allows you to specify a PatchDocument consisting of a list of PatchOperations to perform on the specified item.

Despite using the term "Patch" and similar syntax, it's important to note that Cosmos does NOT support RFC 6902 JSON Patch. It is a custom format with its own op values.

I'll add a few other comments inline. There are some API design questions that could use some attention since we don't have a lot of prior art or detailed guidelines yet.