Skip to content

Commit

Permalink
Implement paging of results (breaking change) (#392)
Browse files Browse the repository at this point in the history
* Update paging `limit` parameters for APIs

* Add `EntityArray` pagination helpers

* bump go to 1.23.3 for new features

* add further `EntityArray` pagination helpers

* add acc testing client

* Add pagination codegen

* generate SDK with pagination

* add acceptance test

* docs draft

* correct package ref for acctest

* docs gen post processing

* correct docs

* versions and changelogs
  • Loading branch information
patrickcping authored Nov 15, 2024
1 parent 64440a3 commit 657b47d
Show file tree
Hide file tree
Showing 260 changed files with 7,465 additions and 1,087 deletions.
18 changes: 15 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,40 @@
* **Note** Upgraded go version to 1.23 to align with the go [release policy](https://go.dev/doc/devel/release#policy). [#395](https://github.com/patrickcping/pingone-go-sdk-v2/pull/395)
* `github.com/patrickcping/pingone-go-sdk-v2/agreementmanagement` : [v0.3.3](./agreementmanagement/CHANGELOG.md)
* **Note** Upgraded go version to 1.23 to align with the go [release policy](https://go.dev/doc/devel/release#policy). [#395](https://github.com/patrickcping/pingone-go-sdk-v2/pull/395)
* `github.com/patrickcping/pingone-go-sdk-v2/authorize` : [v0.6.1](./authorize/CHANGELOG.md)
* `github.com/patrickcping/pingone-go-sdk-v2/authorize` : [v0.7.0](./authorize/CHANGELOG.md)
* **Breaking change** `(Api[a-zA-Z]Request).Execute()` and `(*Api[a-zA-Z]Request).[a-zA-Z]Execute()` API functions now returns the `EntityArrayPagedIterator` data type to for code clients to implement paging of results. [#392](https://github.com/patrickcping/pingone-go-sdk-v2/pull/392)
* **Note** Upgraded go version to 1.23 to align with the go [release policy](https://go.dev/doc/devel/release#policy). [#395](https://github.com/patrickcping/pingone-go-sdk-v2/pull/395)
* `github.com/patrickcping/pingone-go-sdk-v2/credentials` : [v0.9.1](./credentials/CHANGELOG.md)
* **Enhancement** Added `(Api[a-zA-Z]Request).ExecuteInitialPage()` and `(*Api[a-zA-Z]Request).[a-zA-Z]ExecuteInitialPage()` API functions to just return the initial page of a paged response. [#392](https://github.com/patrickcping/pingone-go-sdk-v2/pull/392)
* `github.com/patrickcping/pingone-go-sdk-v2/credentials` : [v0.10.0](./credentials/CHANGELOG.md)
* **Breaking change** `(Api[a-zA-Z]Request).Execute()` and `(*Api[a-zA-Z]Request).[a-zA-Z]Execute()` API functions now returns the `EntityArrayPagedIterator` data type to for code clients to implement paging of results. [#392](https://github.com/patrickcping/pingone-go-sdk-v2/pull/392)
* **Note** Upgraded go version to 1.23 to align with the go [release policy](https://go.dev/doc/devel/release#policy). [#395](https://github.com/patrickcping/pingone-go-sdk-v2/pull/395)
* **Enhancement** Added `(Api[a-zA-Z]Request).ExecuteInitialPage()` and `(*Api[a-zA-Z]Request).[a-zA-Z]ExecuteInitialPage()` API functions to just return the initial page of a paged response. [#392](https://github.com/patrickcping/pingone-go-sdk-v2/pull/392)
* `github.com/patrickcping/pingone-go-sdk-v2/management` : [v0.44.0](./management/CHANGELOG.md)
* **Breaking change** `(Api[a-zA-Z]Request).Execute()` and `(*Api[a-zA-Z]Request).[a-zA-Z]Execute()` API functions now returns the `EntityArrayPagedIterator` data type to for code clients to implement paging of results. [#392](https://github.com/patrickcping/pingone-go-sdk-v2/pull/392)
* **Breaking change** Model `NotificationsSettingsEmailDeliverySettings` is now a compound model supporting both SMTP and custom notification models. [#386](https://github.com/patrickcping/pingone-go-sdk-v2/pull/386)
* **Note** Upgraded go version to 1.23 to align with the go [release policy](https://go.dev/doc/devel/release#policy). [#395](https://github.com/patrickcping/pingone-go-sdk-v2/pull/395)
* **Feature** Added support for the Administrator Security API. [#381](https://github.com/patrickcping/pingone-go-sdk-v2/pull/381)
* **Feature** Added support for custom email notification providers. [#386](https://github.com/patrickcping/pingone-go-sdk-v2/pull/386)
* **Feature** Added support for the Custom Admin Roles API. [#388](https://github.com/patrickcping/pingone-go-sdk-v2/pull/388)
* **Enhancement** Added `(Api[a-zA-Z]Request).ExecuteInitialPage()` and `(*Api[a-zA-Z]Request).[a-zA-Z]ExecuteInitialPage()` API functions to just return the initial page of a paged response. [#392](https://github.com/patrickcping/pingone-go-sdk-v2/pull/392)
* **Enhancement** Added the `SessionNotOnOrAfterDuration` field to the `ApplicationSAML` data model. [#387](https://github.com/patrickcping/pingone-go-sdk-v2/pull/387)
* `github.com/patrickcping/pingone-go-sdk-v2/mfa` : [v0.21.0](./mfa/CHANGELOG.md)
* **Breaking change** `(Api[a-zA-Z]Request).Execute()` and `(*Api[a-zA-Z]Request).[a-zA-Z]Execute()` API functions now returns the `EntityArrayPagedIterator` data type to for code clients to implement paging of results. [#392](https://github.com/patrickcping/pingone-go-sdk-v2/pull/392)
* **Note** Upgraded go version to 1.23 to align with the go [release policy](https://go.dev/doc/devel/release#policy). [#395](https://github.com/patrickcping/pingone-go-sdk-v2/pull/395)
* **Enhancement** Added `(Api[a-zA-Z]Request).ExecuteInitialPage()` and `(*Api[a-zA-Z]Request).[a-zA-Z]ExecuteInitialPage()` API functions to just return the initial page of a paged response. [#392](https://github.com/patrickcping/pingone-go-sdk-v2/pull/392)
* **Enhancement** Added the `UriParameters` field to the `DeviceAuthenticationPolicyTotp` data model. [#384](https://github.com/patrickcping/pingone-go-sdk-v2/pull/384)
* **Enhancement** Added the `OtpLength` field to the `DeviceAuthenticationPolicyOfflineDeviceOtp` data model. [#385](https://github.com/patrickcping/pingone-go-sdk-v2/pull/385)
* `github.com/patrickcping/pingone-go-sdk-v2/risk` : [v0.17.0](./risk/CHANGELOG.md)
* **Breaking change** `(Api[a-zA-Z]Request).Execute()` and `(*Api[a-zA-Z]Request).[a-zA-Z]Execute()` API functions now returns the `EntityArrayPagedIterator` data type to for code clients to implement paging of results. [#392](https://github.com/patrickcping/pingone-go-sdk-v2/pull/392)
* **Note** Upgraded go version to 1.23 to align with the go [release policy](https://go.dev/doc/devel/release#policy). [#395](https://github.com/patrickcping/pingone-go-sdk-v2/pull/395)
* **Enhancement** Added `(Api[a-zA-Z]Request).ExecuteInitialPage()` and `(*Api[a-zA-Z]Request).[a-zA-Z]ExecuteInitialPage()` API functions to just return the initial page of a paged response. [#392](https://github.com/patrickcping/pingone-go-sdk-v2/pull/392)
* **Enhancement** Added the `ShouldValidatePayloadSignature` field to the `RiskPredictorDevice` model. [#380](https://github.com/patrickcping/pingone-go-sdk-v2/pull/380)
* **Enhancement** Added the `IncludeRepeatedEventsWithoutSdk` field to the `RiskPredictorBotDetection` model. [#382](https://github.com/patrickcping/pingone-go-sdk-v2/pull/382)
* **Enhancement** Support the `TRAFFIC_ANOMALY` risk predictor type (new `RiskPredictorTrafficAnomaly` model). [#383](https://github.com/patrickcping/pingone-go-sdk-v2/pull/383)
* `github.com/patrickcping/pingone-go-sdk-v2/verify` : [v0.7.1](./verify/CHANGELOG.md)
* `github.com/patrickcping/pingone-go-sdk-v2/verify` : [v0.8.0](./verify/CHANGELOG.md)
* **Breaking change** `(Api[a-zA-Z]Request).Execute()` and `(*Api[a-zA-Z]Request).[a-zA-Z]Execute()` API functions now returns the `EntityArrayPagedIterator` data type to for code clients to implement paging of results. [#392](https://github.com/patrickcping/pingone-go-sdk-v2/pull/392)
* **Note** Upgraded go version to 1.23 to align with the go [release policy](https://go.dev/doc/devel/release#policy). [#395](https://github.com/patrickcping/pingone-go-sdk-v2/pull/395)
* **Enhancement** Added `(Api[a-zA-Z]Request).ExecuteInitialPage()` and `(*Api[a-zA-Z]Request).[a-zA-Z]ExecuteInitialPage()` API functions to just return the initial page of a paged response. [#392](https://github.com/patrickcping/pingone-go-sdk-v2/pull/392)

# Release (2024-07-22)

Expand Down
70 changes: 70 additions & 0 deletions acctest/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
package acctest

import (
"context"
"fmt"
"os"

"github.com/patrickcping/pingone-go-sdk-v2/management"
"github.com/patrickcping/pingone-go-sdk-v2/pingone"
)

func TestClient(ctx context.Context) (*pingone.Client, error) {

clientID := os.Getenv("PINGONE_CLIENT_ID_TESTACC")
clientSecret := os.Getenv("PINGONE_CLIENT_SECRET_TESTACC")
environmentID := os.Getenv("PINGONE_ENVIRONMENT_ID_TESTACC")
regionCode := management.EnumRegionCode(os.Getenv("PINGONE_REGION_CODE_TESTACC"))

if err := os.Setenv("PINGONE_API_ACCESS_TOKEN", ""); err != nil {
return nil, err
}

if err := os.Setenv("PINGONE_API_SERVICE_HOSTNAME", ""); err != nil {
return nil, err
}

if err := os.Setenv("PINGONE_AUTH_SERVICE_HOSTNAME", ""); err != nil {
return nil, err
}

config := &pingone.Config{
ClientID: &clientID,
ClientSecret: &clientSecret,
EnvironmentID: &environmentID,
RegionCode: &regionCode,
}

client, err := config.APIClient(ctx)

if err != nil {
return nil, err
}

if client.AuthorizeAPIClient == nil {
return nil, fmt.Errorf("Authorize Client not successfully retrieved, authorize is null")
}

if client.CredentialsAPIClient == nil {
return nil, fmt.Errorf("Credentials Client not successfully retrieved, credentials is null")
}

if client.ManagementAPIClient == nil {
return nil, fmt.Errorf("Management Client not successfully retrieved, management is null")
}

if client.MFAAPIClient == nil {
return nil, fmt.Errorf("Management Client not successfully retrieved, mfa is null")
}

if client.RiskAPIClient == nil {
return nil, fmt.Errorf("Management Client not successfully retrieved, risk is null")
}

if client.VerifyAPIClient == nil {
return nil, fmt.Errorf("Management Client not successfully retrieved, verify is null")
}

return client, nil

}
2 changes: 1 addition & 1 deletion agreementmanagement/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/patrickcping/pingone-go-sdk-v2/agreementmanagement

go 1.22.7
go 1.23.3

retract (
v0.1.0 // Major loss of function
Expand Down
2 changes: 1 addition & 1 deletion authorize/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.1
0.7.0
4 changes: 3 additions & 1 deletion authorize/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# v0.6.1 (Unreleased)
# v0.7.0 (Unreleased)

* **Breaking change** `(Api[a-zA-Z]Request).Execute()` and `(*Api[a-zA-Z]Request).[a-zA-Z]Execute()` API functions now returns the `EntityArrayPagedIterator` data type to for code clients to implement paging of results. [#392](https://github.com/patrickcping/pingone-go-sdk-v2/pull/392)
* **Note** Upgraded go version to 1.23 to align with the go [release policy](https://go.dev/doc/devel/release#policy). [#395](https://github.com/patrickcping/pingone-go-sdk-v2/pull/395)
* **Enhancement** Added `(Api[a-zA-Z]Request).ExecuteInitialPage()` and `(*Api[a-zA-Z]Request).[a-zA-Z]ExecuteInitialPage()` API functions to just return the initial page of a paged response. [#392](https://github.com/patrickcping/pingone-go-sdk-v2/pull/392)

# v0.6.0 (2024-07-04)

Expand Down
4 changes: 3 additions & 1 deletion authorize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The PingOne Platform API covering the PingOne Authorize service
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: 2023-06-29
- Package version: 0.6.1
- Package version: 0.7.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen

## Installation
Expand Down Expand Up @@ -151,6 +151,7 @@ Class | Method | HTTP request | Description
- [EntityArray](docs/EntityArray.md)
- [EntityArrayEmbedded](docs/EntityArrayEmbedded.md)
- [EntityArrayEmbeddedPermissionsInner](docs/EntityArrayEmbeddedPermissionsInner.md)
- [EntityArrayPagedIterator](docs/EntityArrayPagedIterator.md)
- [EnumAPIServerAuthorizationServerType](docs/EnumAPIServerAuthorizationServerType.md)
- [EnumAPIServerOperationMatchType](docs/EnumAPIServerOperationMatchType.md)
- [EnumAPIServerOperationMethod](docs/EnumAPIServerOperationMethod.md)
Expand All @@ -165,6 +166,7 @@ Class | Method | HTTP request | Description
- [P1Error](docs/P1Error.md)
- [P1ErrorDetailsInner](docs/P1ErrorDetailsInner.md)
- [P1ErrorDetailsInnerInnerError](docs/P1ErrorDetailsInnerInnerError.md)
- [PagedCursor](docs/PagedCursor.md)


## Documentation For Authorization
Expand Down
4 changes: 2 additions & 2 deletions authorize/api_api_server_deployment.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 15 additions & 7 deletions authorize/api_api_server_operations.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 15 additions & 7 deletions authorize/api_api_servers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 657b47d

Please sign in to comment.