WIP: fix(generator): delete client emits rpc_call::<bool>, not String #28

Draft
zaelgohary wants to merge 1 commit from development_fix_delete_deserialize_type into development
Member

Summary

Every *_delete() method in the Rust SDK was emitting rpc_call::<String> while the server sends {"result": true} (JSON bool). Result: every delete fails client-side with invalid type: booleantrue, expected a string — even though the server deleted successfully. Observed on project.delete but the same generator path covers every domain.

Switch to rpc_call::<bool> at crates/generator/src/rust/rust_client.rs:208 so the client matches the actual wire format.

Test plan

  • Consuming repo (hero_osis) cargo-bumps to this commit, build.rs re-emits all *_delete methods, delete flow returns Ok(()) cleanly.
  • No other changes to generator output.

Closes lhumina_code/hero_osis#29

## Summary Every `*_delete()` method in the Rust SDK was emitting `rpc_call::<String>` while the server sends `{"result": true}` (JSON bool). Result: every delete fails client-side with `invalid type: boolean`true`, expected a string` — even though the server deleted successfully. Observed on `project.delete` but the same generator path covers every domain. Switch to `rpc_call::<bool>` at `crates/generator/src/rust/rust_client.rs:208` so the client matches the actual wire format. ## Test plan - [ ] Consuming repo (hero_osis) cargo-bumps to this commit, build.rs re-emits all `*_delete` methods, delete flow returns `Ok(())` cleanly. - [ ] No other changes to generator output. Closes https://forge.ourworld.tf/lhumina_code/hero_osis/issues/29
fix(generator): delete client method deserialises as bool, not String
Some checks failed
Test / test (pull_request) Failing after 32s
Test / test (push) Failing after 1m10s
6c22c97121
Server-side delete handlers return bool (via to_string-then-jsonify). The wire
response is a JSON boolean. The Rust client generator was emitting
rpc_call::<String>, which then fails with:

    invalid type: boolean `true`, expected a string

Every *_delete() method across every generated SDK hits this — on success.
Switch the generator to emit rpc_call::<bool> so the client deserialises
against what the server actually sends.

Closes lhumina_code/hero_osis#29
Some checks failed
Test / test (pull_request) Failing after 32s
Test / test (push) Failing after 1m10s
This pull request has changes conflicting with the target branch.
  • crates/generator/src/rust/rust_client.rs
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin development_fix_delete_deserialize_type:development_fix_delete_deserialize_type
git switch development_fix_delete_deserialize_type

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch development
git merge --no-ff development_fix_delete_deserialize_type
git switch development_fix_delete_deserialize_type
git rebase development
git switch development
git merge --ff-only development_fix_delete_deserialize_type
git switch development_fix_delete_deserialize_type
git rebase development
git switch development
git merge --no-ff development_fix_delete_deserialize_type
git switch development
git merge --squash development_fix_delete_deserialize_type
git switch development
git merge --ff-only development_fix_delete_deserialize_type
git switch development
git merge development_fix_delete_deserialize_type
git push origin development
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_rpc!28
No description provided.