fix(capabilities): do not serialize None as null for list_changed (#341)

The old form violates the spec, and all other `Option<bool>` fields also
behave this way. Concretely https://github.com/upstash/context7/ fails
without this change.
This commit is contained in:
John Howard 2025-07-29 20:08:31 -07:00 • committed by GitHub
commit 0a9a0a0b1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,6 +36,7 @@ pub struct ToolsCapability {
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct RootsCapabilities {
#[serde(skip_serializing_if = "Option::is_none")]
pub list_changed: Option<bool>,
}