Supporting Graph.RBAC scenario with fragment nextLink
See original GitHub issueSplit out from https://github.com/Azure/autorest/issues/1232 so that it’s easier to track what needs to get done. For more context, you can look through that entire thread. We want to make sure this scenario doesn’t break in all languages, so the request is for each language to implement the
There is a TestServer
Swagger operation that verifies the Graph.RBAC paging scenario:
- This is the first call https://github.com/Azure/autorest/blob/master/src/dev/TestServer/swagger/paging.json#L285
- This is for subsequent “next pages”: https://github.com/Azure/autorest/blob/master/src/dev/TestServer/swagger/paging.json#L321
The TestServer implementation of these operations is here:
- First call: https://github.com/Azure/autorest/blob/master/src/dev/TestServer/server/routes/paging.js#L124
- Subsequent calls: https://github.com/Azure/autorest/blob/master/src/dev/TestServer/server/routes/paging.js#L133
Here’s the C# test that verifies this scenario: https://github.com/Azure/autorest/blob/2a25d885a15aa0dfb4a73f00c9b1b8e4ad79e85b/src/generator/AutoRest.CSharp.Azure.Tests/AcceptanceTests.cs#L457
This is the standardized flow for handling x-ms-pageable
:
- If
operationName
is used, skip creating aNext()
page method. - The operation specified in
operationName
should follow the normal method logic - Start with the base url
- Concat the operation path (e.g.
{tenantID}/{nextLink}
in the case of Graph.RBAC) - Perform path replacements
- This includes replacing
{nextLink}
with thenextLink
method argument
- This includes replacing
- Append any query parameters defined for the
Next()
operation.- This needs to take into account that query parameters might already exist in the url, since
nextLink
could have query parameters.
- This needs to take into account that query parameters might already exist in the url, since
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Formatting returned paging URLs #1232 - Azure/autorest
The guidance for Azure REST APIs is for nextLink to be a complete URL, but Graph.RBAC only returns a fragment: directoryObjects/$/Microsoft.
Read more >Test your fragments - Android Developers
This method supports the following states as arguments: CREATED , STARTED , RESUMED , and DESTROYED . This method simulates a situation where...
Read more >Exploring the Android Fragment Scenario component - Medium
This allows us to launch our fragment in isolation and focus on what we are testing. This will either require using an external...
Read more >FortiSIEM 5.2.5 Online Help (PDF) - Amazon AWS
Elasticsearch Support for Regex. 422. FortiSIEM Event Categories and Handling. 423. FortiSIEM Charts and Views.
Read more >Email Address: debarpita.cs@gmail.com ORCID of the author
Figure 1: Simple BPMN model of a Kiosk-based Healthcare Scenario in India ... of fragment P) is being added, 'Next Link' part 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
fragmented nextLink always worked in node.js. Infact other sdks were inspired from the node.js solution.
Hohohoho, yes, it is supported