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

chore: 🐝 Update SDK - Generate 0.11.0 #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
17 changes: 9 additions & 8 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
lockVersion: 2.0.0
id: 4fc4737a-135f-4840-8e6d-42a2b2a2884b
management:
docChecksum: 957bade817085c900e9e156fe28f22de
docChecksum: f6d66cb825eb0c9feff79d4f839323a0
docVersion: 1.0.0
speakeasyVersion: 1.424.0
generationVersion: 2.445.1
releaseVersion: 0.10.0
configChecksum: f05f5642b3717c2fef64128e2da1d736
speakeasyVersion: 1.440.1
generationVersion: 2.460.1
releaseVersion: 0.11.0
configChecksum: a062b6a46d3010813d5b8551dd3182c1
repoURL: https://github.com/unkeyed/unkey-go.git
installationURL: https://github.com/unkeyed/unkey-go
features:
go:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.6
core: 3.5.14
core: 3.5.16
defaultEnabledRetries: 0.2.0
deprecations: 2.81.1
envVarSecurityUsage: 0.3.1
envVarSecurityUsage: 0.3.2
examples: 2.81.3
globalSecurity: 2.82.10
globalSecurityCallbacks: 0.1.0
globalSecurityFlattening: 0.1.0
Expand All @@ -29,7 +30,7 @@ features:
retries: 2.83.0
sdkHooks: 0.1.0
tests: 0.6.0
unions: 2.85.9
unions: 2.85.10
generatedFiles:
- .gitattributes
- /models/components/httpmetadata.go
Expand Down
4 changes: 3 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ generation:
requestResponseComponentNamesFeb2024: true
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
go:
version: 0.10.0
version: 0.11.0
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
defaultErrorName: SDKError
flattenGlobalSecurity: true
imports:
option: openapi
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
speakeasyVersion: 1.424.0
speakeasyVersion: 1.440.1
sources:
openapi.json:
sourceNamespace: openapi-json
sourceRevisionDigest: sha256:5b4d353e01dd74e0ac9a8b521d71e5c97ffe1a654d77d3d8036b2e783bd08612
sourceBlobDigest: sha256:f03ba20fc32a90e85dacb81cd6f3b52c07e2a8a3dabda2f7186120b67c4d94ef
sourceRevisionDigest: sha256:4d52858109e0215517934d01c9c386556f9bbefcb11a5fe88c77f3abb02c7d97
sourceBlobDigest: sha256:fe67a0253c7087a97b8ff4e6f4ab458d5fef7a8cd424e3f60d6dadd066623f85
tags:
- latest
- main
- speakeasy-sdk-regen-1731025759
targets:
go:
source: openapi.json
sourceNamespace: openapi-json
sourceRevisionDigest: sha256:5b4d353e01dd74e0ac9a8b521d71e5c97ffe1a654d77d3d8036b2e783bd08612
sourceBlobDigest: sha256:f03ba20fc32a90e85dacb81cd6f3b52c07e2a8a3dabda2f7186120b67c4d94ef
sourceRevisionDigest: sha256:4d52858109e0215517934d01c9c386556f9bbefcb11a5fe88c77f3abb02c7d97
sourceBlobDigest: sha256:fe67a0253c7087a97b8ff4e6f4ab458d5fef7a8cd424e3f60d6dadd066623f85
codeSamplesNamespace: openapi-json-code-samples
codeSamplesRevisionDigest: sha256:4df0c16b687b1fbf319e382a23a0398699310d4173f21f3a4dfec5f6f7abb2e9
codeSamplesRevisionDigest: sha256:6a0a77ae2cac2ced67b5eed9f1f63d1b40a8250608aa00a3ba56c5976d9cc0a9
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
80 changes: 21 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import (

func main() {
s := unkeygo.New(
unkeygo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
unkeygo.WithSecurity("UNKEY_ROOT_KEY"),
)

ctx := context.Background()
Expand Down Expand Up @@ -144,16 +144,16 @@ By Default, an API error will return `sdkerrors.SDKError`. When custom error res

For example, the `V1Liveness` function may return the following errors:

| Error Type | Status Code | Content Type |
| -------------------------------- | -------------------------------- | -------------------------------- |
| sdkerrors.ErrBadRequest | 400 | application/json |
| sdkerrors.ErrUnauthorized | 401 | application/json |
| sdkerrors.ErrForbidden | 403 | application/json |
| sdkerrors.ErrNotFound | 404 | application/json |
| sdkerrors.ErrConflict | 409 | application/json |
| sdkerrors.ErrTooManyRequests | 429 | application/json |
| sdkerrors.ErrInternalServerError | 500 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |
| Error Type | Status Code | Content Type |
| -------------------------------- | ----------- | ---------------- |
| sdkerrors.ErrBadRequest | 400 | application/json |
| sdkerrors.ErrUnauthorized | 401 | application/json |
| sdkerrors.ErrForbidden | 403 | application/json |
| sdkerrors.ErrNotFound | 404 | application/json |
| sdkerrors.ErrConflict | 409 | application/json |
| sdkerrors.ErrTooManyRequests | 429 | application/json |
| sdkerrors.ErrInternalServerError | 500 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | \*/\* |

### Example

Expand All @@ -170,7 +170,7 @@ import (

func main() {
s := unkeygo.New(
unkeygo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
unkeygo.WithSecurity("UNKEY_ROOT_KEY"),
)

ctx := context.Background()
Expand Down Expand Up @@ -233,47 +233,9 @@ func main() {
<!-- Start Server Selection [server] -->
## Server Selection

### Select Server by Index

You can override the default server globally using the `WithServerIndex` option when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

| # | Server | Variables |
| - | ------ | --------- |
| 0 | `https://api.unkey.dev` | None |

#### Example

```go
package main

import (
"context"
unkeygo "github.com/unkeyed/unkey-go"
"log"
)

func main() {
s := unkeygo.New(
unkeygo.WithServerIndex(0),
unkeygo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)

ctx := context.Background()
res, err := s.Liveness.V1Liveness(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}

```


### Override Server URL Per-Client

The default server can also be overridden globally using the `WithServerURL` option when initializing the SDK client instance. For example:
The default server can also be overridden globally using the `WithServerURL(serverURL string)` option when initializing the SDK client instance. For example:
```go
package main

Expand All @@ -286,7 +248,7 @@ import (
func main() {
s := unkeygo.New(
unkeygo.WithServerURL("https://api.unkey.dev"),
unkeygo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
unkeygo.WithSecurity("UNKEY_ROOT_KEY"),
)

ctx := context.Background()
Expand Down Expand Up @@ -338,9 +300,9 @@ This can be a convenient way to configure timeouts, cookies, proxies, custom hea

This SDK supports the following security scheme globally:

| Name | Type | Scheme |
| ------------ | ------------ | ------------ |
| `BearerAuth` | http | HTTP Bearer |
| Name | Type | Scheme |
| ------------ | ---- | ----------- |
| `BearerAuth` | http | HTTP Bearer |

You can configure it using the `WithSecurity` option when initializing the SDK client instance. For example:
```go
Expand All @@ -354,7 +316,7 @@ import (

func main() {
s := unkeygo.New(
unkeygo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
unkeygo.WithSecurity("UNKEY_ROOT_KEY"),
)

ctx := context.Background()
Expand Down Expand Up @@ -389,7 +351,7 @@ import (

func main() {
s := unkeygo.New(
unkeygo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
unkeygo.WithSecurity("UNKEY_ROOT_KEY"),
)

ctx := context.Background()
Expand Down Expand Up @@ -438,7 +400,7 @@ func main() {
},
RetryConnectionErrors: false,
}),
unkeygo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
unkeygo.WithSecurity("UNKEY_ROOT_KEY"),
)

ctx := context.Background()
Expand Down Expand Up @@ -474,7 +436,7 @@ import (

func main() {
s := unkeygo.New(
unkeygo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
unkeygo.WithSecurity("UNKEY_ROOT_KEY"),
)

ctx := context.Background()
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,14 @@ Based on:
### Generated
- [go v0.10.0] .
### Releases
- [Go v0.10.0] https://github.com/unkeyed/unkey-go/releases/tag/v0.10.0 - .
- [Go v0.10.0] https://github.com/unkeyed/unkey-go/releases/tag/v0.10.0 - .

## 2024-11-17 00:33:52
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.440.1 (2.460.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.11.0] .
### Releases
- [Go v0.11.0] https://github.com/unkeyed/unkey-go/releases/tag/v0.11.0 - .
2 changes: 1 addition & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

func main() {
s := unkeygo.New(
unkeygo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
unkeygo.WithSecurity("UNKEY_ROOT_KEY"),
)

ctx := context.Background()
Expand Down
6 changes: 3 additions & 3 deletions docs/models/components/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `BearerAuth` | *string* | :heavy_check_mark: | N/A |
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `BearerAuth` | *string* | :heavy_check_mark: | N/A | UNKEY_ROOT_KEY |
Loading