Description
Generated pageable iterators for JSON and XML continuation-token operations stop after the first page. Each operation returns two items on its first response and a token for the next request, but iteration completes without issuing that request, so only 2 of the expected 4 items are returned.
Spector service
Reproduction
const jsonItems = await collect(
client.serverDrivenPagination.continuationToken.requestQueryResponseBody({
foo: "foo",
bar: "bar",
}),
);
const xmlItems = await collect(client.xmlPagination.listWithContinuation());
Actual behavior
JSON items: 2 (expected 4)
XML items: 2 (expected 4)
No second request is sent. The generated paging configuration only identifies the page item property through itemName; it does not contain metadata for extracting the response continuation token or injecting it into the next request's declared query parameter. The generic paging helper consequently treats the first response as the final page. The same metadata gap occurs for the token represented in the XML response model.
Expected behavior
The generated pageable iterator should:
- Extract the property marked with
@continuationToken from each response, including an XML response body.
- Place that token in the operation parameter marked with
@continuationToken for the next request.
- Continue until the response no longer contains a token.
Both scenarios should yield all four items and issue the expected second request.
Description
Generated pageable iterators for JSON and XML continuation-token operations stop after the first page. Each operation returns two items on its first response and a token for the next request, but iteration completes without issuing that request, so only 2 of the expected 4 items are returned.
Spector service
Payload_Pageable_ServerDrivenPagination_ContinuationToken_requestQueryResponseBodyPayload_Pageable_XmlPagination_listWithContinuationReproduction
Actual behavior
No second request is sent. The generated paging configuration only identifies the page item property through
itemName; it does not contain metadata for extracting the response continuation token or injecting it into the next request's declared query parameter. The generic paging helper consequently treats the first response as the final page. The same metadata gap occurs for the token represented in the XML response model.Expected behavior
The generated pageable iterator should:
@continuationTokenfrom each response, including an XML response body.@continuationTokenfor the next request.Both scenarios should yield all four items and issue the expected second request.