Skip to content

fix(openapi): export EvmTx and MultiChainMsg so SkipGoMessage $refs resolve#171

Merged
trevormil merged 1 commit intomainfrom
chore/openapi-fixes-2026-04-22
Apr 22, 2026
Merged

fix(openapi): export EvmTx and MultiChainMsg so SkipGoMessage $refs resolve#171
trevormil merged 1 commit intomainfrom
chore/openapi-fixes-2026-04-22

Conversation

@trevormil
Copy link
Copy Markdown
Collaborator

@trevormil trevormil commented Apr 22, 2026

Summary

Narrows PR #171 after the 8-route payload-deletion portion was rolled back. The zero-prop payload blocks in routes.yaml are harmless in practice — spread_explodes.ts drops them before the hosted spec ships, so 3p API consumers never see them. Keeping them in routes.yaml as dead weight is preferable to risking an accidental drop of a route param someone actually wanted.

What stays in this PR

Add export to EvmTx and MultiChainMsg in src/gamm/indexer.ts. Both types are referenced transitively by SkipGoMessage but were defined without export, so typeconv skipped them and the hosted spec shipped broken #/components/schemas/EvmTx / MultiChainMsg refs. One-word-each fix. Implements #0292 (partial — the 5 dynamic-store + swap-activities types deferred until PR #168 merges).

What was rolled back

The 8 zero-prop payload param deletions from routes.yaml (ticket #0293). Audit confirmed:

Route Verdict Action
GET /developerApp/{clientId} genuinely-empty kept as-is
GET /plugin/{pluginId} genuinely-empty kept as-is
GET /utilityPage/{utilityPageId} genuinely-empty kept as-is
GET /application/{applicationId} genuinely-empty kept as-is
GET /claims/status/{claimAttemptId} genuinely-empty kept as-is
GET /maps/{mapId} genuinely-empty kept as-is
GET /claims/gatedContent/{claimId} genuinely-empty kept as-is
GET /plugins/creator real-propsiGetCreatorPluginsPayload has creatorAddress, bookmark, returnSensitiveData; spread_explodes.ts expands into per-field query params kept as-is — prior deletion would have stripped these from hosted spec

Seven routes are genuinely empty (handler reads only req.params.{id}); one had real props the first pass missed, reinforcing the call to leave routes.yaml alone.

Test plan

  • Typecheck (SDK build) clean
  • No unresolved $refs in the hosted spec after the pipeline regenerates (CI will verify)

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 22, 2026

Greptile Summary

This PR is a focused OpenAPI hygiene pass: it removes 8 dead payload query-parameter blocks from routes.yaml (zero-property schemas that spread_explodes.ts was already silently dropping, so the hosted spec was already parameterless) and exports EvmTx and MultiChainMsg in indexer.ts so typeconv declares them as named component schemas, fixing broken $refs under SkipGoMessage → iEstimateSwapSuccessResponse.

Key points:

  • routes.yaml: All 8 removed blocks reference schemas with zero properties, so the pipeline output is unchanged — the source file now matches what was already rendered. The PR description correctly flags iGetClaimAttemptStatusPayload and iGetCreatorPluginsPayload as candidates for a future human sanity-check, which is appropriate.
  • indexer.ts: Adding export to EvmTx and MultiChainMsg is the minimal correct fix for the broken schema references. Note that SkipGoMessage (which holds both) remains unexported — it appears typeconv handles it transitively via the exported iEstimateSwapSuccessResponse, which seems to be working in practice already.
  • One minor asymmetry removed: the iGetMapPayload block had required: true whereas all other payload blocks were required: false; this inconsistency in the original source is gone with the cleanup.

Confidence Score: 5/5

Safe to merge — both changes are net-neutral on hosted output and fix real spec defects.

The routes.yaml deletions are provably no-ops on the hosted spec (pipeline already drops zero-prop params), and the export additions in indexer.ts are a one-word fix with no runtime impact — TypeScript interfaces are compile-time only. No logic changes, no data-path changes, no security surface added.

No files require special attention; the two flagged routes are noted in the PR description as follow-up items, not blockers.

Important Files Changed

Filename Overview
packages/bitbadgesjs-sdk/openapitypes-helpers/routes.yaml Removes 8 zero-property payload query param blocks from GET routes; the spread_explodes.ts pipeline already dropped them, so the hosted spec was already parameterless — this is pure dead-weight cleanup.
packages/bitbadgesjs-sdk/src/gamm/indexer.ts Adds export to MultiChainMsg and EvmTx interfaces so typeconv declares them as named component schemas, fixing broken $refs in the hosted OpenAPI spec.

Reviews (1): Last reviewed commit: "chore(openapi): drop zero-prop payload p..." | Re-trigger Greptile

…esolve

Both types are transitively $ref'd by SkipGoMessage in the generated
openapi spec, but they were defined without `export` so typeconv skipped
them. The hosted spec shipped broken #/components/schemas/EvmTx and
MultiChainMsg references that failed to resolve in Stoplight.

One-word-each fix. Implements backlog #0292 (partial — the 5
dynamic-store + swap-activities types deferred until PR #168 merges
the websiteOnlyCors route hiding).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@trevormil trevormil force-pushed the chore/openapi-fixes-2026-04-22 branch from a270e88 to 5505602 Compare April 22, 2026 12:55
@trevormil trevormil changed the title OpenAPI cleanup 2026-04-22 — drop zero-prop payload params, declare EvmTx/MultiChainMsg fix(openapi): export EvmTx and MultiChainMsg so SkipGoMessage $refs resolve Apr 22, 2026
@trevormil trevormil merged commit 9687955 into main Apr 22, 2026
3 checks passed
@trevormil trevormil deleted the chore/openapi-fixes-2026-04-22 branch April 22, 2026 12:58
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.

1 participant