docs: fix collection metadata removal description (#9907)

Setting metadata to an empty object does not clear it: the update merges
key by key, so an empty object is a no-op (and over gRPC an empty map is
indistinguishable from an absent one). Per-key removal via null values is
the mechanism that was actually implemented and tested in #7123.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Andrey Vasnetsov
2026-07-20 18:41:31 +02:00
committed by GitHub
parent 446d140c2d
commit 59742bbb26
2 changed files with 2 additions and 2 deletions

View File

@@ -11365,7 +11365,7 @@
]
},
"metadata": {
"description": "Metadata to update for the collection. If provided, this will merge with existing metadata. To remove metadata, set it to an empty object.",
"description": "Metadata to update for the collection. If provided, this will merge with existing metadata. Individual keys can be removed by setting their value to `null`.",
"anyOf": [
{
"$ref": "#/components/schemas/Payload"

View File

@@ -315,7 +315,7 @@ pub struct UpdateCollection {
#[validate(nested)]
pub strict_mode_config: Option<StrictModeConfig>,
/// Metadata to update for the collection. If provided, this will merge with existing metadata.
/// To remove metadata, set it to an empty object.
/// Individual keys can be removed by setting their value to `null`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub metadata: Option<Payload>,
}