A lot of rest APIs support list apis w/o pagination (nextLink) support. The client SDK often tries to be forward looking and make the SDK endpoints pageable. Hence, autorest should support an implementation where we get the naked response object for the Single and Next page links so we can customize the pagination response.
However the pagination code generated for this type is below which has lost the fields like registry and imageName.
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<PagedResponse<ManifestAttributesBase>> getManifestsSinglePageAsync(
String name, String last, Integer n, String orderby)
Ask:- We should add another overload here that can return Mono instead so we can create the pageable response ourselves.
A lot of rest APIs support list apis w/o pagination (nextLink) support. The client SDK often tries to be forward looking and make the SDK endpoints pageable. Hence, autorest should support an implementation where we get the naked response object for the Single and Next page links so we can customize the pagination response.
For example: Swagger: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/d06fc6e105c57df31284d36c90385bce354490e1/specification/containerregistry/data-plane/Azure.ContainerRegistry/preview/2019-08-15-preview/containerregistry.json OperationId: ContainerRegistry_GetManifests returns a pageable object AcrManifests which has the following definition
"AcrManifests": { "description": "Manifest attributes", "properties": { "registry": {}, "imageName": {}, "manifests": { "type": "array", "description": "List of manifests", "items": { "$ref": "#/definitions/ManifestAttributesBase", } }, "link": { "type": "string" } },
However the pagination code generated for this type is below which has lost the fields like registry and imageName.
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<PagedResponse<ManifestAttributesBase>> getManifestsSinglePageAsync( String name, String last, Integer n, String orderby)
Ask:- We should add another overload here that can return Mono instead so we can create the pageable response ourselves.