fix(sdks): use JSONPath filter expressions in overlay + simplify Go SDK union types - #744
Merged
Merged
Conversation
Replace brittle positional parameter indices with name-based filter expressions (e.g., `parameters[?@.name == 'dir']` instead of `parameters[2]`). The indices broke when #732 added new query params, causing overrides to misapply (e.g., `direction` applied to `next` instead of `dir`). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Add Go-specific Speakeasy overlay that converts all oneOf [string, array] query params to plain array types, eliminating verbose tagged union constructors in the generated Go SDK. Affects 16 params across 8 endpoints. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
alexluong
force-pushed
the
fix/pagination-overlay-filter-expressions
branch
from
March 11, 2026 17:43
e72a0ef to
af73cc4
Compare
leggetter
reviewed
Mar 12, 2026
alexbouchardd
approved these changes
Mar 12, 2026
alexluong
added a commit
that referenced
this pull request
Mar 13, 2026
The pagination cursor config (x-speakeasy-pagination) was bundled in the Python pagination fixes overlay, which is only applied to the Python SDK source. This meant Go and TS SDKs lost auto-pagination support after #744 split the sources. Extract the pagination config into a shared overlay applied to all three sources, keeping only the Python builtin name overrides (dir, next, prev) in the Python-specific overlay. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
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.
Summary
1. JSONPath filter expressions in pagination overlay
Replace brittle positional parameter indices with name-based filter expressions (e.g.,
parameters[?@.name == 'dir']instead ofparameters[2]). The indices broke when #732 added new query params which shifted all parameter positions.Before (broken):
directionoverride applied tonext,next_cursorapplied totime[gt], etc.After (fixed): all overrides target the correct params by name, immune to reordering.
2. Go SDK: replace oneOf unions with plain arrays
Add a Go-specific Speakeasy overlay (
go-array-params-overlay.yaml) that converts alloneOf: [string, array]query params to plain array types. This eliminates verbose tagged union constructors in the generated Go SDK. Affects 16 params across 8 endpoints.A new
Outpost API (Go)source is added to.speakeasy/workflow.yamlso the overlay only applies to Go — TS and Python are unaffected.Test plan
speakeasy overlay validatepasses for both overlaysspeakeasy overlay applyconfirms oneOf removed, correct param targetingspeakeasy run -t outpost-go— compiles, lints, tests pass🤖 Generated with Claude Code