diff --git a/.github/workflows/generate_on_pr.yaml b/.github/workflows/generate_on_pr.yaml index 654e403..bad6987 100644 --- a/.github/workflows/generate_on_pr.yaml +++ b/.github/workflows/generate_on_pr.yaml @@ -44,5 +44,5 @@ jobs: uses: EndBug/add-and-commit@v9 with: add: . - default_author: github_actions + default_author: github_actor message: Update provider based on openapi.yaml changes diff --git a/.gitignore b/.gitignore index d3c2f59..3330282 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ # .gitignore +bin/ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index b7e0c4b..36ef3bb 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: b81e5def-5b1e-4753-ae7c-0efccc2e6f61 management: docChecksum: ec4d3cb9876f69aa90a3374c55d5aae7 docVersion: 0.0.1 - speakeasyVersion: 1.377.2 - generationVersion: 2.404.1 - releaseVersion: 0.0.2 - configChecksum: 59d52ed6401d8c1950ccdb31c5a49e44 + speakeasyVersion: 1.377.3 + generationVersion: 2.404.2 + releaseVersion: 0.0.5 + configChecksum: 3f4c19c5da9a7de794abfa0f86cede9e features: go: additionalDependencies: 0.1.0 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index ae556a7..b3ed091 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false go: - version: 0.0.4 + version: 0.0.5 additionalDependencies: k8s.io/apimachinery: v0.30.2 allowUnknownFieldsInWeakUnions: false diff --git a/Makefile b/Makefile index add04a9..b453b36 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,7 @@ generate.sdk: $(SED) -i 's#\(type RouteInput struct\)#// $(KUBEBUILDER_GENERATE_CODE_MARKER)\n\1#g' \ models/components/route.go + go mod tidy $(MAKE) generate.deepcopy git checkout -- $(OPENAPI_FILE) \ $(shell git ls-files models/components/route*.go) \ diff --git a/go.mod b/go.mod index a6f42fb..aa715cd 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/Kong/sdk-konnect-go go 1.20 require ( - github.com/cenkalti/backoff/v4 v4.3.0 + github.com/cenkalti/backoff/v4 v4.2.0 github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 ) diff --git a/go.sum b/go.sum index f804a4f..f955779 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,4 @@ -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= +github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 h1:S92OBrGuLLZsyM5ybUzgc/mPjIYk2AZqufieooe98uw= github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05/go.mod h1:M9R1FoZ3y//hwwnJtO51ypFGwm8ZfpxPT/ZLtO1mcgQ= diff --git a/internal/hooks/httpdump.go b/internal/hooks/httpdump.go index 18d1840..5b6fa59 100644 --- a/internal/hooks/httpdump.go +++ b/internal/hooks/httpdump.go @@ -6,12 +6,14 @@ import ( "net/http/httputil" ) +// HTTPDumpRequestHook is a hook that dumps the request to stdout. type HTTPDumpRequestHook struct { Enabled bool } var _ beforeRequestHook = (*HTTPDumpRequestHook)(nil) +// BeforeRequest dumps the request to stdout if enabled. func (i *HTTPDumpRequestHook) BeforeRequest(hookCtx BeforeRequestContext, req *http.Request) (*http.Request, error) { if !i.Enabled { return req, nil @@ -27,12 +29,14 @@ func (i *HTTPDumpRequestHook) BeforeRequest(hookCtx BeforeRequestContext, req *h return req, nil } +// HTTPDumpResponseHook is a hook that dumps the response to stdout. type HTTPDumpResponseHook struct { Enabled bool } var _ afterSuccessHook = (*HTTPDumpResponseHook)(nil) +// AfterSuccess dumps the response to stdout if enabled. func (i *HTTPDumpResponseHook) AfterSuccess(hookCtx AfterSuccessContext, res *http.Response) (*http.Response, error) { if !i.Enabled { return res, nil diff --git a/sdk.go b/sdk.go index 98dfbd5..c5d756b 100644 --- a/sdk.go +++ b/sdk.go @@ -261,9 +261,9 @@ func New(opts ...SDKOption) *SDK { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "0.0.1", - SDKVersion: "0.0.2", - GenVersion: "2.404.1", - UserAgent: "speakeasy-sdk/go 0.0.2 2.404.1 0.0.1 github.com/Kong/sdk-konnect-go", + SDKVersion: "0.0.5", + GenVersion: "2.404.2", + UserAgent: "speakeasy-sdk/go 0.0.5 2.404.2 0.0.1 github.com/Kong/sdk-konnect-go", Hooks: hooks.New(), }, }