Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/go
{
"name": "Go",
"image": "mcr.microsoft.com/devcontainers/go:1-1.20-bullseye",
"image": "mcr.microsoft.com/devcontainers/go:1-1.22-bullseye",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.env
.env.local
.DS_Store
**/.speakeasy/temp/
**/.speakeasy/logs/
Expand Down
555 changes: 276 additions & 279 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

96 changes: 96 additions & 0 deletions .speakeasy/tests.arazzo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1916,3 +1916,99 @@ workflows:
{}
type: simple
x-speakeasy-test-group: PublishingTokens
- workflowId: generateCodeSamplePreview-default
steps:
- stepId: test
operationId: generateCodeSamplePreview
requestBody:
contentType: multipart/form-data
payload:
language: <value>
schema_file: 'x-file: example.file'
successCriteria:
- condition: $statusCode == 2XX
- condition: $response.header.Content-Type == application/json
- context: $response.body
condition: |
{
"snippets": [
{
"code": "import { Petstore } from \"petstore-sdk\";\n\nconst petstore = new Petstore({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await petstore.pet.getById({\n id: 137396,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();",
"language": "typescript",
"method": "get",
"operationId": "getPetById",
"path": "/pet/{id}"
}
]
}
type: simple
x-speakeasy-test-group: CodeSamples
x-speakeasy-test-rebuild: true
- workflowId: getCodeSamples-default
steps:
- stepId: test
operationId: getCodeSamples
parameters:
- name: registry_url
in: query
value: https://spec.speakeasy.com/my-org/my-workspace/my-source
- name: operation_ids
in: query
value:
- getPets
- name: method_paths
in: query
value:
- method: get
path: /pets
- name: languages
in: query
value:
- python
- javascript
successCriteria:
- condition: $statusCode == 2XX
- condition: $response.header.Content-Type == application/json
- context: $response.body
condition: |
{
"snippets": [
{
"code": "import { Petstore } from \"petstore-sdk\";\n\nconst petstore = new Petstore({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await petstore.pet.getById({\n id: 137396,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();",
"language": "typescript",
"method": "get",
"operationId": "getPetById",
"path": "/pet/{id}"
}
]
}
type: simple
x-speakeasy-test-group: CodeSamples
x-speakeasy-test-rebuild: true
- workflowId: getCodeSamplePreviewAsync-default
steps:
- stepId: test
operationId: getCodeSamplePreviewAsync
parameters:
- name: jobID
in: path
value: <id>
successCriteria:
- condition: $statusCode == 2XX
- condition: $response.header.Content-Type == application/json
- context: $response.body
condition: |
{
"snippets": [
{
"code": "import { Petstore } from \"petstore-sdk\";\n\nconst petstore = new Petstore({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await petstore.pet.getById({\n id: 137396,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();",
"language": "typescript",
"method": "get",
"operationId": "getPetById",
"path": "/pet/{id}"
}
]
}
type: simple
x-speakeasy-test-group: CodeSamples
x-speakeasy-test-rebuild: true
12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
speakeasyVersion: 1.542.3
speakeasyVersion: 1.637.0
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:402d99fabeef032d62c39870ff2b3f9eb8dd356a76a76f07295ac3b4a94af8e0
sourceBlobDigest: sha256:0442ef7698d8979dd825b3eab0ab868ac86580f4cffcd3e0dff7afdd6191e6d9
sourceRevisionDigest: sha256:9128c3df436950ca04fec9dfc74e769e8b492d434b115b197d68da656ae17d23
sourceBlobDigest: sha256:6eb8a6e215c36d3e11d86fc67d5ce7af499bdb934e0f7fbad17efcdde9bffd73
tags:
- latest
- main
Expand All @@ -12,10 +12,10 @@ targets:
speakeasy-client-sdk-go:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:402d99fabeef032d62c39870ff2b3f9eb8dd356a76a76f07295ac3b4a94af8e0
sourceBlobDigest: sha256:0442ef7698d8979dd825b3eab0ab868ac86580f4cffcd3e0dff7afdd6191e6d9
sourceRevisionDigest: sha256:9128c3df436950ca04fec9dfc74e769e8b492d434b115b197d68da656ae17d23
sourceBlobDigest: sha256:6eb8a6e215c36d3e11d86fc67d5ce7af499bdb934e0f7fbad17efcdde9bffd73
codeSamplesNamespace: code-samples-go-speakeasy-client-sdk-go
codeSamplesRevisionDigest: sha256:367336fdd435084f895195faf801e7618cdb3d206b55fab1b1d220870ad39fd6
codeSamplesRevisionDigest: sha256:27eccaf3b23754cdf4dde0633f2c49a41daa79c65d40a2801b4d829f9c4bba74
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
76 changes: 39 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For more information about the API: [The Speakeasy Platform Documentation](/docs

To add the SDK as a dependency to your project:
```bash
go get github.com/speakeasy-api/speakeasy-client-sdk-go
go get github.com/speakeasy-api/speakeasy-client-sdk-go/v3
```
<!-- End SDK Installation [installation] -->

Expand All @@ -54,17 +54,17 @@ package main

import (
"context"
speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared"
"log"
)

func main() {
ctx := context.Background()

s := speakeasyclientsdkgo.New(
speakeasyclientsdkgo.WithSecurity(shared.Security{
APIKey: speakeasyclientsdkgo.String("<YOUR_API_KEY_HERE>"),
s := v3.New(
v3.WithSecurity(shared.Security{
APIKey: v3.Pointer("<YOUR_API_KEY_HERE>"),
}),
)

Expand Down Expand Up @@ -172,7 +172,6 @@ func main() {

* [Create](docs/sdks/shorturls/README.md#create) - Shorten a URL.


### [Subscriptions](docs/sdks/subscriptions/README.md)

* [ActivateSubscriptionNamespace](docs/sdks/subscriptions/README.md#activatesubscriptionnamespace) - Activate an ignored namespace for a subscription
Expand Down Expand Up @@ -236,7 +235,7 @@ package main
import (
"context"
"errors"
speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/sdkerrors"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared"
"log"
Expand All @@ -245,9 +244,9 @@ import (
func main() {
ctx := context.Background()

s := speakeasyclientsdkgo.New(
speakeasyclientsdkgo.WithSecurity(shared.Security{
APIKey: speakeasyclientsdkgo.String("<YOUR_API_KEY_HERE>"),
s := v3.New(
v3.WithSecurity(shared.Security{
APIKey: v3.Pointer("<YOUR_API_KEY_HERE>"),
}),
)

Expand Down Expand Up @@ -291,18 +290,18 @@ package main

import (
"context"
speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared"
"log"
)

func main() {
ctx := context.Background()

s := speakeasyclientsdkgo.New(
speakeasyclientsdkgo.WithServer("prod"),
speakeasyclientsdkgo.WithSecurity(shared.Security{
APIKey: speakeasyclientsdkgo.String("<YOUR_API_KEY_HERE>"),
s := v3.New(
v3.WithServer("prod"),
v3.WithSecurity(shared.Security{
APIKey: v3.Pointer("<YOUR_API_KEY_HERE>"),
}),
)

Expand All @@ -325,18 +324,18 @@ package main

import (
"context"
speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared"
"log"
)

func main() {
ctx := context.Background()

s := speakeasyclientsdkgo.New(
speakeasyclientsdkgo.WithServerURL("https://api.prod.speakeasy.com"),
speakeasyclientsdkgo.WithSecurity(shared.Security{
APIKey: speakeasyclientsdkgo.String("<YOUR_API_KEY_HERE>"),
s := v3.New(
v3.WithServerURL("https://api.prod.speakeasy.com"),
v3.WithSecurity(shared.Security{
APIKey: v3.Pointer("<YOUR_API_KEY_HERE>"),
}),
)

Expand Down Expand Up @@ -371,12 +370,13 @@ The built-in `net/http` client satisfies this interface and a default client bas
import (
"net/http"
"time"
"github.com/myorg/your-go-sdk"

"github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
)

var (
httpClient = &http.Client{Timeout: 30 * time.Second}
sdkClient = sdk.New(sdk.WithClient(httpClient))
sdkClient = v3.New(v3.WithClient(httpClient))
)
```

Expand Down Expand Up @@ -404,17 +404,17 @@ package main

import (
"context"
speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared"
"log"
)

func main() {
ctx := context.Background()

s := speakeasyclientsdkgo.New(
speakeasyclientsdkgo.WithSecurity(shared.Security{
APIKey: speakeasyclientsdkgo.String("<YOUR_API_KEY_HERE>"),
s := v3.New(
v3.WithSecurity(shared.Security{
APIKey: v3.Pointer("<YOUR_API_KEY_HERE>"),
}),
)

Expand Down Expand Up @@ -453,15 +453,17 @@ package main

import (
"context"
speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations"
"log"
)

func main() {
ctx := context.Background()

s := speakeasyclientsdkgo.New()
s := v3.New(
v3.WithWorkspaceID("<id>"),
)

res, err := s.Auth.GetAccessToken(ctx, operations.GetAccessTokenRequest{
WorkspaceID: "<id>",
Expand All @@ -488,7 +490,7 @@ package main

import (
"context"
speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/retry"
"log"
Expand All @@ -498,9 +500,9 @@ import (
func main() {
ctx := context.Background()

s := speakeasyclientsdkgo.New(
speakeasyclientsdkgo.WithSecurity(shared.Security{
APIKey: speakeasyclientsdkgo.String("<YOUR_API_KEY_HERE>"),
s := v3.New(
v3.WithSecurity(shared.Security{
APIKey: v3.Pointer("<YOUR_API_KEY_HERE>"),
}),
)

Expand Down Expand Up @@ -531,7 +533,7 @@ package main

import (
"context"
speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/retry"
"log"
Expand All @@ -540,8 +542,8 @@ import (
func main() {
ctx := context.Background()

s := speakeasyclientsdkgo.New(
speakeasyclientsdkgo.WithRetryConfig(
s := v3.New(
v3.WithRetryConfig(
retry.Config{
Strategy: "backoff",
Backoff: &retry.BackoffStrategy{
Expand All @@ -552,8 +554,8 @@ func main() {
},
RetryConnectionErrors: false,
}),
speakeasyclientsdkgo.WithSecurity(shared.Security{
APIKey: speakeasyclientsdkgo.String("<YOUR_API_KEY_HERE>"),
v3.WithSecurity(shared.Security{
APIKey: v3.Pointer("<YOUR_API_KEY_HERE>"),
}),
)

Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1736,4 +1736,14 @@ Based on:
### Generated
- [go v3.26.7] .
### Releases
- [Go v3.26.7] https://github.com/speakeasy-api/speakeasy-client-sdk-go/releases/tag/v3.26.7 - .
- [Go v3.26.7] https://github.com/speakeasy-api/speakeasy-client-sdk-go/releases/tag/v3.26.7 - .

## 2025-10-16 22:06:57
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.637.0 (2.727.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v3.27.0] .
### Releases
- [Go v3.27.0] https://github.com/speakeasy-api/speakeasy-client-sdk-go/releases/tag/v3.27.0 - .
Loading