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:
parent
855f57e0e7
commit
0a9a0a0b1f
1 changed files with 1 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ pub struct ToolsCapability {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||||
pub struct RootsCapabilities {
|
pub struct RootsCapabilities {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub list_changed: Option<bool>,
|
pub list_changed: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue