Skip to content

Support for pagination with multiple continuation tokens #8227

@annatisch

Description

@annatisch

I am currently migrating the Azure Tables REST API spec into TypeSpec and have a bit of a strange pagination scenario that isn't currently supported (nor was it ever supported for Swagger code gen).

The "query entities" API uses two continuation tokens - values retrieved from response headers that are passed in as query parameters:
https://learn.microsoft.com/rest/api/storageservices/query-entities
https://learn.microsoft.com/rest/api/storageservices/query-timeout-and-pagination

Swagger spec:
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cosmos-db/data-plane/Microsoft.Tables/preview/2019-02-02/table.json

Today - attempting to specify multiple @continuationToken values is not valid tsp.
I don't know how common this scenario is - but would be interested in any advice on the best way to model this that will result in the least amount of manually patched code.

Checklist

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Metadata

Metadata

Assignees

Labels

compiler:coreIssues for @typespec/compilerdesign:neededA design request has been raised that needs a proposaltriaged:core

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions