Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.06k stars 1.19k forks source link

SDK does not provide means of getting Next Page of Subscription Aliases #29469

Open StevenWolfeCAI opened 5 months ago

StevenWolfeCAI commented 5 months ago

Describe the bug When using the SDK to retrieve a list of Subscription Aliases there is no SDK means or documentation provided on getting anything beyond the first page.

To Reproduce Steps to reproduce the behavior:

  1. Use the SDK to try to retrieve more than one page of Subscription Aliases

Expected behavior The SDK should support functions to retrieve additional pages, if nextLink is present and populated.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context We have opened support tickets previously and verified this is not currently supported. We prefer not to "roll our own".

kazrael2119 commented 5 months ago

will check

kazrael2119 commented 5 months ago

Hi @StevenWolfeCAI , JS SDK is generated from swagger, in swagger ,it is not support paging now. I tried to support paging locally and regenerated the sdk, here is the package: azure-arm-subscriptions-5.2.0.zip could you use this package and try again?

And add Service Attention label in this issue

github-actions[bot] commented 5 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @anuragdalmia @ramaganesan-rg @shilpigautam.

github-actions[bot] commented 5 months ago

Hi @StevenWolfeCAI. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

searles9 commented 5 months ago

Hi @StevenWolfeCAI , JS SDK is generated from swagger, in swagger ,it is not support paging now. I tried to support paging locally and regenerated the sdk, here is the package: azure-arm-subscriptions-5.2.0.zip could you use this package and try again?

And add Service Attention label in this issue

@kazrael2119 Can you elaborate on how to page over the results using this new change you implemented?

The alias.list() call returns {value: x, nextLink: x}.... how do you then take the next link and get the next page? Does nextlink get passed as a param ? Do I need to attach it as a custom header in the list call? Is the function now returning an async iterator?

What change did you make?

cc: @anuragdalmia @ramaganesan-rg @ShilpiGautam.

qiaozha commented 4 months ago

it's not on the customer side, service team need to add a x-ms-pagable in the operation link that @kazrael2119 shared.

searles9 commented 4 months ago

it's not on the customer side, service team need to add a x-ms-pagable in the operation link that @kazrael2119 shared.

Can you elaborate? On the customer side how does the customer (me) get all of the results of the alias.list() sdk method? Are you suggesting that adding x-ms-pagable means if I call alias.list() with no parameters that I will get all results (because paging is handled internally), and there is no action that needs to be taken to loop through each page of results?

github-actions[bot] commented 4 months ago

Hi @StevenWolfeCAI, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!