Skip to content

fix(kvstore): send camelCase body for bulkSets and updateList#24

Merged
johnpmitsch merged 2 commits into
mainfrom
jm/beta_bugfixes
May 26, 2026
Merged

fix(kvstore): send camelCase body for bulkSets and updateList#24
johnpmitsch merged 2 commits into
mainfrom
jm/beta_bugfixes

Conversation

@johnpmitsch

Copy link
Copy Markdown
Collaborator

Summary

  • BulkSetsParams and UpdateListParams were emitting snake_case JSON (add_sets/delete_sets, add_items/remove_items) but the KV REST API expects camelCase. The server silently ignored the unknown fields, treated each request as an empty bulk op, and returned 200 OK — calls resolved as success but no data was persisted.
  • Fix: add #[serde(rename_all = "camelCase")] to both structs. Update the three wiremock asserts that had baked in the buggy body.

No language-API surface change — Node already exposed camelCase via napi's auto-conversion (that's why the bug didn't surface as a TS type error); Python kwargs and Ruby hash keys stay snake_case as the bindings build the struct internally.

OpenAPI audit also covered Streams (snake_case ✓), Webhooks (snake_case + camelCase template tag already handled ✓), and Admin (mixed per-endpoint, every current struct already matches its endpoint ✓). KV was the only product with broken structs.

Closes DX-5341, DX-5342.

Test plan

  • cargo test -p quicknode-sdk --lib — 196/196 pass; the three updated kvstore wire-body tests now assert camelCase and pass.
  • just lint — clean.
  • just node-build, just python-build, just ruby-build — all bindings compile.
  • End-to-end against the live API: cargo run --example kvstore_e2e -p quicknode-sdk with QN_API_KEY, or re-run the original Node reproducer — bulkSets({ addSets: { k: 'v' } }) then getSet('k') should return 'v' instead of 404.

The KV REST API expects `addSets`/`deleteSets` and `addItems`/`removeItems`
in JSON request bodies. `BulkSetsParams` and `UpdateListParams` had no
serde rename, so the wire body was snake_case. The server silently
ignored the unknown fields, treated each request as an empty bulk op,
and returned 200 OK — calls resolved as success but no data persisted.

Closes DX-5341, DX-5342.
@johnpmitsch johnpmitsch merged commit f11bb1b into main May 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants