Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make useragent configurable in service modules #217

Merged
merged 2 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,26 @@

* `github.com/patrickcping/pingone-go-sdk-v2/agreementmanagement` : [v0.2.1](./agreementmanagement/CHANGELOG.md)
* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
* **Note** Allow user-defined values for the `UserAgent` configuration parameter. [#217](https://github.com/patrickcping/pingone-go-sdk-v2/pull/217)
* `github.com/patrickcping/pingone-go-sdk-v2/authorize` : [v0.2.1](./authorize/CHANGELOG.md)
* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
* **Note** Allow user-defined values for the `UserAgent` configuration parameter. [#217](https://github.com/patrickcping/pingone-go-sdk-v2/pull/217)
* `github.com/patrickcping/pingone-go-sdk-v2/credentials` : [v0.2.1](./credentials/CHANGELOG.md)
* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
* **Note** Allow user-defined values for the `UserAgent` configuration parameter. [#217](https://github.com/patrickcping/pingone-go-sdk-v2/pull/217)
* `github.com/patrickcping/pingone-go-sdk-v2/management` : [v0.23.1](./management/CHANGELOG.md)
* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
* **Note** Allow user-defined values for the `UserAgent` configuration parameter. [#217](https://github.com/patrickcping/pingone-go-sdk-v2/pull/217)
* `github.com/patrickcping/pingone-go-sdk-v2/mfa` : [v0.15.0](./mfa/CHANGELOG.md)
* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
* **Note** Allow user-defined values for the `UserAgent` configuration parameter. [#217](https://github.com/patrickcping/pingone-go-sdk-v2/pull/217)
* **Enhancement** Add optional ENUM attribute `NewDeviceNotification` to the `DeviceAuthenticationPolicy` model. [#215](https://github.com/patrickcping/pingone-go-sdk-v2/pull/215)
* `github.com/patrickcping/pingone-go-sdk-v2/risk` : [v0.8.1](./risk/CHANGELOG.md)
* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
* **Note** Allow user-defined values for the `UserAgent` configuration parameter. [#217](https://github.com/patrickcping/pingone-go-sdk-v2/pull/217)
* `github.com/patrickcping/pingone-go-sdk-v2/verify` : [v0.2.1](./verify/CHANGELOG.md)
* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
* **Note** Allow user-defined values for the `UserAgent` configuration parameter. [#217](https://github.com/patrickcping/pingone-go-sdk-v2/pull/217)

# Release (2023-07-04)

Expand Down
1 change: 1 addition & 0 deletions agreementmanagement/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# v0.2.1 (Unreleased)

* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
* **Note** Allow user-defined values for the `UserAgent` configuration parameter. [#217](https://github.com/patrickcping/pingone-go-sdk-v2/pull/217)

# v0.2.0 (2023-07-04)

Expand Down
6 changes: 5 additions & 1 deletion agreementmanagement/configuration.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,11 @@ var (
fileSelectPattern string
pattern string
repl string
}{}
}{
{
fileSelectPattern: "configuration.go",
pattern: `"OpenAPI-Generator/([0-9]+\.[0-9]+\.[0-9]+)/go",`,
repl: `"PingOne-GOLANG-SDK/agreementmanagement/$1/go",`,
},
}
)
1 change: 1 addition & 0 deletions authorize/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# v0.2.1 (Unreleased)

* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
* **Note** Allow user-defined values for the `UserAgent` configuration parameter. [#217](https://github.com/patrickcping/pingone-go-sdk-v2/pull/217)

# v0.2.0 (2023-07-04)

Expand Down
6 changes: 5 additions & 1 deletion authorize/configuration.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,11 @@ var (
fileSelectPattern string
pattern string
repl string
}{}
}{
{
fileSelectPattern: "configuration.go",
pattern: `"OpenAPI-Generator/([0-9]+\.[0-9]+\.[0-9]+)/go",`,
repl: `"PingOne-GOLANG-SDK/authorize/$1/go",`,
},
}
)
1 change: 1 addition & 0 deletions credentials/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# v0.2.1 (Unreleased)

* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
* **Note** Allow user-defined values for the `UserAgent` configuration parameter. [#217](https://github.com/patrickcping/pingone-go-sdk-v2/pull/217)

# v0.2.0 (2023-07-04)

Expand Down
6 changes: 5 additions & 1 deletion credentials/configuration.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ var (
repl string
}{

{
fileSelectPattern: "configuration.go",
pattern: `"OpenAPI-Generator/([0-9]+\.[0-9]+\.[0-9]+)/go",`,
repl: `"PingOne-GOLANG-SDK/credentials/$1/go",`,
},

// EntityArrayEmbeddedItemsInner model
{
fileSelectPattern: "model_entity_array__embedded_items_inner.go",
Expand Down
1 change: 1 addition & 0 deletions management/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# v0.23.1 (Unreleased)

* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
* **Note** Allow user-defined values for the `UserAgent` configuration parameter. [#217](https://github.com/patrickcping/pingone-go-sdk-v2/pull/217)

# v0.23.0 (2023-07-04)

Expand Down
6 changes: 5 additions & 1 deletion management/configuration.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ var (
repl string
}{

{
fileSelectPattern: "configuration.go",
pattern: `"OpenAPI-Generator/([0-9]+\.[0-9]+\.[0-9]+)/go",`,
repl: `"PingOne-GOLANG-SDK/management/$1/go",`,
},

// Password policy model
{
fileSelectPattern: "model_password_policy_min_characters.go",
Expand Down
1 change: 1 addition & 0 deletions mfa/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# v0.15.0 (Unreleased)

* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
* **Note** Allow user-defined values for the `UserAgent` configuration parameter. [#217](https://github.com/patrickcping/pingone-go-sdk-v2/pull/217)
* **Enhancement** Add optional ENUM attribute `NewDeviceNotification` to the `DeviceAuthenticationPolicy` model. [#215](https://github.com/patrickcping/pingone-go-sdk-v2/pull/215)

# v0.14.0 (2023-07-04)
Expand Down
6 changes: 5 additions & 1 deletion mfa/configuration.go

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

6 changes: 6 additions & 0 deletions mfa/generate/postprocessing/generate-replace-regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ var (
repl string
}{

{
fileSelectPattern: "configuration.go",
pattern: `"OpenAPI-Generator/([0-9]+\.[0-9]+\.[0-9]+)/go",`,
repl: `"PingOne-GOLANG-SDK/mfa/$1/go",`,
},

// MFAPushCredentialRequest model
{
fileSelectPattern: "model_mfa_push_credential_request.go",
Expand Down
1 change: 1 addition & 0 deletions risk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# v0.8.1 (Unreleased)

* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
* **Note** Allow user-defined values for the `UserAgent` configuration parameter. [#217](https://github.com/patrickcping/pingone-go-sdk-v2/pull/217)

# v0.8.0 (2023-07-04)

Expand Down
6 changes: 5 additions & 1 deletion risk/configuration.go

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

6 changes: 6 additions & 0 deletions risk/generate/postprocessing/generate-replace-regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ var (
repl string
}{

{
fileSelectPattern: "configuration.go",
pattern: `"OpenAPI-Generator/([0-9]+\.[0-9]+\.[0-9]+)/go",`,
repl: `"PingOne-GOLANG-SDK/risk/$1/go",`,
},

// RiskPredictor model
{
fileSelectPattern: "model_risk_predictor.go",
Expand Down
10 changes: 4 additions & 6 deletions scripts/generate-replace-regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,16 @@ var (
// ALL configuration.go
/////////////////////////

{
fileSelectPattern: "configuration.go",
pattern: `"OpenAPI-Generator/([0-9]+\.[0-9]+\.[0-9]+)/go",`,
repl: `"PingOne-GOLANG-SDK/$1/go",`,
},

{
fileSelectPattern: "configuration.go",
pattern: `\/\/ AddDefaultHeader adds a new HTTP header to the default header in the request`,
repl: `func (c *Configuration) SetDebug(debug bool) {
c.Debug = debug
}

func (c *Configuration) SetUserAgent(userAgent string) {
c.UserAgent = userAgent
}

func (c *Configuration) SetDefaultServerIndex(defaultServerIndex int) {
c.DefaultServerIndex = defaultServerIndex
Expand Down
1 change: 1 addition & 0 deletions verify/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# v0.2.1 (Unreleased)

* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
* **Note** Allow user-defined values for the `UserAgent` configuration parameter. [#217](https://github.com/patrickcping/pingone-go-sdk-v2/pull/217)

# v0.2.0 (2023-07-04)

Expand Down
6 changes: 5 additions & 1 deletion verify/configuration.go

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

8 changes: 7 additions & 1 deletion verify/generate/postprocessing/generate-replace-regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,11 @@ var (
fileSelectPattern string
pattern string
repl string
}{}
}{
{
fileSelectPattern: "configuration.go",
pattern: `"OpenAPI-Generator/([0-9]+\.[0-9]+\.[0-9]+)/go",`,
repl: `"PingOne-GOLANG-SDK/verify/$1/go",`,
},
}
)
Loading