test(spec-sdk): fix paginator response shape after Speakeasy 1.753.0#916
Closed
alexluong wants to merge 1 commit into
Closed
test(spec-sdk): fix paginator response shape after Speakeasy 1.753.0#916alexluong wants to merge 1 commit into
alexluong wants to merge 1 commit into
Conversation
Speakeasy CLI 1.741.7 → 1.753.0 (commit 3f311e0, 2026-03-13) changed the generated TS SDK return type for list operations from the flat paginated body to a PageIterator wrapper: ListEventsResponse now wraps the body in `result`, so callers access `response.result.models` instead of `response.models`. The shape change was a side-effect of the Speakeasy version bump and wasn't surfaced in the SDK regen PR changelog (which only flagged the unrelated `request` query-param restyle). Tests in spec-sdk-tests/tests/{events,tenants}.test.ts still used the pre-bump accessor and failed to compile against the current SDK. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Can't we change that? That seems like a totally uncecessary breaking change that actually worst then before... |
Collaborator
Author
|
Agreed that I don't prefer this either, will look into if there's a way to revert this behavior. |
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.
Speakeasy CLI bump (
1.741.7→1.753.0, commit3f311e0d) wrapped list-operation responses in aPageIterator. The change wasn't flagged in the SDK regen PR changelog, sospec-sdk-testssilently went stale.Before:
Now:
This PR updates the affected tests (
events.test.ts,tenants.test.ts) to the new accessor.Not necessarily my personal preference (the extra
resultwrapper feels noisy for the common single-page case), but it appears to be Speakeasy convention for paginated operations — keeps the iterator metadata (next,[Symbol.asyncIterator]) co-located with the parsed body without colliding with response fields.