Skip to content

Commit

Permalink
chore: update speakeasy
Browse files Browse the repository at this point in the history
  • Loading branch information
chronark committed Jul 25, 2024
1 parent 562f9e8 commit 3c5f317
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 19 deletions.
10 changes: 5 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ id: 4fc4737a-135f-4840-8e6d-42a2b2a2884b
management:
docChecksum: 29e2d5c7a947cc6ebcfd6934ff2cb957
docVersion: 1.0.0
speakeasyVersion: 1.344.1
generationVersion: 2.376.2
releaseVersion: 0.8.1
configChecksum: 59c27f74f558a409357571bf5f21de66
speakeasyVersion: 1.345.4
generationVersion: 2.378.3
releaseVersion: 0.8.4
configChecksum: 546bb4c4880914530e8fcbfb360083ca
repoURL: https://github.com/unkeyed/unkey-go.git
installationURL: https://github.com/unkeyed/unkey-go
features:
go:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.4
core: 3.5.0
core: 3.5.1
defaultEnabledRetries: 0.2.0
deprecations: 2.81.1
envVarSecurityUsage: 0.2.0
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
go:
version: 0.8.1
version: 0.8.4
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
Expand Down
13 changes: 6 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
speakeasyVersion: 1.344.1
speakeasyVersion: 1.345.4
sources:
openapi.json:
sourceNamespace: openapi-json
sourceRevisionDigest: sha256:c3b38fb469289b8fdabbc28051440112c3199ee411dbf4336acd8b2c18a27263
sourceBlobDigest: sha256:2f792761f282e88f85c1494eb7e382e95031c0a7155cbb121aa049fb68473e55
sourceRevisionDigest: sha256:8e6e3223a485d24e81ef02f83949b08418d1d724e49b201ac14f3290001d84da
sourceBlobDigest: sha256:770d60d67406eff3aaa57132c5c0817dedbc3a003849434bd021d718acea605a
tags:
- latest
- main
targets:
go:
source: openapi.json
sourceNamespace: openapi-json
sourceRevisionDigest: sha256:c3b38fb469289b8fdabbc28051440112c3199ee411dbf4336acd8b2c18a27263
sourceBlobDigest: sha256:2f792761f282e88f85c1494eb7e382e95031c0a7155cbb121aa049fb68473e55
outLocation: /github/workspace/repo
sourceRevisionDigest: sha256:8e6e3223a485d24e81ef02f83949b08418d1d724e49b201ac14f3290001d84da
sourceBlobDigest: sha256:770d60d67406eff3aaa57132c5c0817dedbc3a003849434bd021d718acea605a
outLocation: /Users/andreasthomas/github/unkeyed/unkey-go
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
5 changes: 5 additions & 0 deletions internal/utils/queryparams.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ import (
)

func PopulateQueryParams(_ context.Context, req *http.Request, queryParams interface{}, globals interface{}) error {
// Query parameters may already be present from overriding URL
if req.URL.RawQuery != "" {
return nil
}

values := url.Values{}

globalsAlreadyPopulated, err := populateQueryParams(queryParams, globals, values, []string{})
Expand Down
20 changes: 17 additions & 3 deletions models/operations/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ const (
SupportedOptionRetries = "retries"
SupportedOptionTimeout = "timeout"
SupportedOptionAcceptHeaderOverride = "acceptHeaderOverride"
SupportedOptionURLOverride = "urlOverride"
)

type Options struct {
ServerURL *string
Retries *retry.Config
Timeout *time.Duration
ServerURL *string
Retries *retry.Config
Timeout *time.Duration
URLOverride *string
}

type Option func(*Options, ...string) error
Expand Down Expand Up @@ -77,3 +79,15 @@ func WithOperationTimeout(timeout time.Duration) Option {
return nil
}
}

// WithURLOverride allows overriding the URL.
func WithURLOverride(urlOverride string) Option {
return func(opts *Options, supportedOptions ...string) error {
if !utils.Contains(supportedOptions, SupportedOptionURLOverride) {
return ErrUnsupportedOption
}

opts.URLOverride = &urlOverride
return nil
}
}
6 changes: 3 additions & 3 deletions unkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ func New(opts ...SDKOption) *Unkey {
sdkConfiguration: sdkConfiguration{
Language: "go",
OpenAPIDocVersion: "1.0.0",
SDKVersion: "0.8.1",
GenVersion: "2.376.2",
UserAgent: "speakeasy-sdk/go 0.8.1 2.376.2 1.0.0 github.com/unkeyed/unkey-go",
SDKVersion: "0.8.4",
GenVersion: "2.378.3",
UserAgent: "speakeasy-sdk/go 0.8.4 2.378.3 1.0.0 github.com/unkeyed/unkey-go",
Hooks: hooks.New(),
},
}
Expand Down

0 comments on commit 3c5f317

Please sign in to comment.