Closed laura-rodriguez closed 9 months ago
Add convenience for paginated results
Developers will be able to use pagination in the following way:
$GroupsPageResponse = Invoke-ListGroups -limit 10 -withHttpInfo
The -withHttpInfo flag indicates that in addition to the response, you expect additional information. The response for the above call will look like this:
$GroupsPageResponse Headers {[Date, System.String[]], [Transfer-Encoding, System.String[]], [Connection, S… Response @{id=00g9erhe4rJGXhdYs5d7; created=5/5/23 1:44:39 PM; lastUpdated=5/5/23 1:44:… StatusCode 200 NextPageUri https://dev-79816133.okta.com/api/v1/groups?after=00g9erhe4rJGXhdYs5d7&limit=10
For convenience, a property called NextPageUri is added, but you can also access all the response headers via the Headers property.
NextPageUri
Headers
To paginate results, a developer can use the Uri param, which allows passing full URIs:
Uri
While ($GroupsPageResponse.NextPageUri) { $GroupsPageResponse = Invoke-ListGroups -Uri $GroupsPageResponse.NextPageUri -withHttpInfo $Response = $GroupsPageResponse.Response }
Client/UrlHelper.ps1
openapi3/codegen-templates/api.mustache
tests/api/oktaapplicationapi.tests.ps1
tests/internal/urlhelper.tests.ps1
Feature
Add convenience for paginated results
Description
Developers will be able to use pagination in the following way:
The -withHttpInfo flag indicates that in addition to the response, you expect additional information. The response for the above call will look like this:
For convenience, a property called
NextPageUri
is added, but you can also access all the response headers via theHeaders
property.To paginate results, a developer can use the
Uri
param, which allows passing full URIs:What changed?
NextPageUri
when applicableClient/UrlHelper.ps1
,openapi3/codegen-templates/api.mustache
,tests/api/oktaapplicationapi.tests.ps1
,tests/internal/urlhelper.tests.ps1