Skip to content

Commit 91c470e

Browse files
committed
chore(docs): Fix the example documentation
1 parent 2d5c09e commit 91c470e

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

v25/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ ctx := context.Background()
8080

8181
// api := client.V1.ExampleApi // Access V1 API Service
8282
// req := api.NewUpdateExampleRequest(ctx) // Build new API request
83-
// req.ExampleUpdateRequest(V1.ExampleUpdateRequest{ Name: "Hello" }) // Add a body to the API request (if applicable)
83+
// req = req.ExampleUpdateRequest(V1.ExampleUpdateRequest{ Name: "Hello" }) // Add a body to the API request (if applicable)
8484
// resp, httpResp, err := req.Execute() // Execute request
8585

8686
// api := client.V2.ExampleApi // Access V2 API Service
8787
// req := api.NewUpdateExampleRequest(ctx) // Build new API request
88-
// req.ExampleUpdateRequest(V2.ExampleUpdateRequest{ Name: "Hello" }) // Add a body to the API request (if applicable)
88+
// req = req.ExampleUpdateRequest(V2.ExampleUpdateRequest{ Name: "Hello" }) // Add a body to the API request (if applicable)
8989
// resp, httpResp, err := req.Execute() // Execute request
9090

9191

v25/api/keyfactor/v1/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import (
4646
"os"
4747

4848
"github.com/Keyfactor/keyfactor-auth-client-go/auth_providers"
49-
"github.com/Keyfactor/keyfactor-go-client-sdk/v25/api/keyfactor/v1"
49+
v1 "github.com/Keyfactor/keyfactor-go-client-sdk/v25/api/keyfactor/v1"
5050
)
5151

5252
hostname := os.Getenv(auth_providers.EnvKeyfactorHostName)
@@ -74,11 +74,11 @@ oAuthNoParamsConfig.
7474
client, err := keyfactor.NewAPIClient(oAuthNoParamsConfig.GetServerConfig())
7575

7676
// Mock example API request. Please refer to documentation for a complete list of valid API requests.
77-
api := client.SecurityRolesApi
77+
api := client.ExampleApi
7878
req := api.NewCreateExampleRequest(ctx)
7979

8080
// If applicable, you can add the body to an API request through the request builder's Fluent API.
81-
req.SecurityExampleCreateRequest(SecurityExampleCreateRequest{
81+
req = req.ExampleExampleCreateRequest(v1.ExampleExampleCreateRequest{
8282
Name: "Foo",
8383
Description: "Example API request."
8484
})

v25/api/keyfactor/v2/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import (
4646
"os"
4747

4848
"github.com/Keyfactor/keyfactor-auth-client-go/auth_providers"
49-
"github.com/Keyfactor/keyfactor-go-client-sdk/v25/api/keyfactor/v2"
49+
v2 "github.com/Keyfactor/keyfactor-go-client-sdk/v25/api/keyfactor/v2"
5050
)
5151

5252
hostname := os.Getenv(auth_providers.EnvKeyfactorHostName)
@@ -74,11 +74,11 @@ oAuthNoParamsConfig.
7474
client, err := keyfactor.NewAPIClient(oAuthNoParamsConfig.GetServerConfig())
7575

7676
// Mock example API request. Please refer to documentation for a complete list of valid API requests.
77-
api := client.SecurityRolesApi
77+
api := client.ExampleApi
7878
req := api.NewCreateExampleRequest(ctx)
7979

8080
// If applicable, you can add the body to an API request through the request builder's Fluent API.
81-
req.SecurityExampleCreateRequest(SecurityExampleCreateRequest{
81+
req = req.ExampleCreateRequest(v2.ExampleExampleCreateRequest{
8282
Name: "Foo",
8383
Description: "Example API request."
8484
})

0 commit comments

Comments
 (0)