fix(sputnik): support Vec<T> and Option<Vec<T>> in JsonData nested conversion#2814
Merged
Conversation
This was referenced Jun 6, 2026
AntonioVentilii
added a commit
to AntonioVentilii/vici-app
that referenced
this pull request
Jun 6, 2026
…ises camelCase) (#581) ## What Removes the snake_case wire-format workaround across the satellite + FE now that Juno serialises `Vec<NestedStruct>` in camelCase (like `Option`). - `src/satellite/utils/wire-format.utils.ts`: every wire schema + `toWire…` converter is camelCase; one schema per type for both `j.array(...)` and `j.optional(...)` results (no more parallel snake schemas) - `leagues` / `tournament` / `worlds` FE services: projectors read camelCase; the duplicate league projector (`projectLeagueWire` vs `projectLeagueOptionWire`) is collapsed into one - regenerated `satellite.api.ts` with CLI 0.15.6 (Candid `.did`/factory are unchanged — Candid is always snake_case; only the FE schema flips) - CI: bumped the pinned juno CLI `0.15.4 → 0.15.6` in `checks.yml` and `e2e.yml` ## Why Upstream fixes (verified released): junobuild/juno-js#895 (codegen emits `#[json_data(nested)]` for `Vec`, in `@junobuild/functions-tools@0.6.9`) + junobuild/juno#2814 (the `JsonData` macro handles nested `Vec`, in juno `v0.0.78`). Built our satellite with 0.15.6: the Vec fields flip to nested (27 → 57 attrs) and compile, so the snake_case layer is now obsolete and actively wrong (the wire is camelCase but `toWire` emitted snake → vec endpoints would trap). ## Requires juno CLI ≥ 0.15.6 to build and deploy. This is breaking on older toolchains, and the satellite must be redeployed on 0.15.6. ## Notes - Builds on #512 (the league invite-lookup fix) and supersedes it — that bug is fixed here the camelCase way. Merge/close coordination is up to you. - Minor leftover: the satellite still defines a redundant `LeagueOptionWireSchema` / `toOptionWireLeague` (now identical to the base league schema/converter). Harmless; can be collapsed in a follow-up. ## Checks `npm run check` (0 errors / 0 warnings) and `npm run quality` (prettier + eslint + i18n) pass locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Includes junobuild/juno-js#895 and extend macros to support nested JsonData in Vec.