fix(app-server): fix optional bool annotations (#24099)

`#[serde(default)]` wasn't sufficient for our generated TS types to
reflect that clients didn't have to set them. We also need
`skip_serializing_if = "std::ops::Not::not"`. This is already a rule in
our agents.md file.
This commit is contained in:
Owen Lin
2026-05-22 09:52:53 -07:00
committed by GitHub
Unverified
parent 014f19af5f
commit cff960896c
16 changed files with 31 additions and 32 deletions
@@ -2547,8 +2547,22 @@ mod tests {
json!({
"method": "account/read",
"id": 6,
"params": {}
}),
serde_json::to_value(&request)?,
);
let request = ClientRequest::GetAccount {
request_id: RequestId::Integer(7),
params: v2::GetAccountParams {
refresh_token: true,
},
};
assert_eq!(
json!({
"method": "account/read",
"id": 7,
"params": {
"refreshToken": false
"refreshToken": true
}
}),
serde_json::to_value(&request)?,