Spec for Paging that supports header extraction
See original GitHub issueRight now pageable supports the following syntax: https://github.com/Azure/autorest/blob/master/docs/extensions/readme.md#x-ms-pageable
"x-ms-pageable": {
"nextLinkName": "nextLink",
"itemName": "values",
"operationName": "Paging_nextOperationWithQueryParams"
},
And nextLinkName
is the name of a JSON key at the root of the returned JSON payload.
We want to be able to extract that nextLink from a header instead.
Proposition:
- Adding a
nextLinkIsHeader: bool
parameter, to say thatnextLinkName
is a header name from returned headers. - By default value is “false” (meaning comes from JSON)
Alternative proposition (that I prefer less):
- Adding
nextLinkOrigin: str
parameter, that states the origin usingin
vocab from Swagger (body/query/header) I prefer it less, because I think it’s overcomplicated, since except body/headers there is not that much possibility anyway.
This is needed for synapse, so I’d like to move fast on it and make it happen fast. I don’t expect a lot of work on the m4 side (pass it through).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Pagination response payload from a RESTful API
ReSTful APIs are consumed primarily by other systems, which is why I put paging data in the response headers. However, some API consumers ......
Read more >“Cursor Pagination” Profile - JSON:API
To support cursor-based pagination, this specification defines three query parameters — page[size] , page[before] , and page[after] — and a method for providing ......
Read more >RFC 5988: Web Linking
It also defines the use of such links in HTTP headers with the Link header ... Code Components extracted from this document must...
Read more >HTTP Extensions for Distributed Authoring -- WEBDAV
This document specifies a set of methods, headers, and content-types ancillary to HTTP/1.1 for the management of resource properties, creation and management of ......
Read more >ROHC (Robust Header Compression) - 4G | ShareTechnote
For example, there can be a cases where only around 30 bytes of voice data (coded data) carried with around 60 bytes of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, that looks better to me! I prefer to err on the side of future extensibility when it’s not very intrusive, like this case.
Just for reference, Tables also does paging through headers, slightly different though, since they give you 2 continuation tokens https://docs.microsoft.com/en-us/rest/api/storageservices/query-entities#response-headers