From 99b733c129760089d76b45a38fe812dab2f65668 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 13 Aug 2024 21:07:22 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.364.0 --- .speakeasy/gen.lock | 10 +- .speakeasy/workflow.lock | 8 +- RELEASES.md | 12 +- codeSamples.yaml | 996 +++++++++--------- .../shared/githubtriggeractionrequest.md | 1 + docs/sdks/apiendpoints/README.md | 16 + docs/sdks/apis/README.md | 12 + docs/sdks/artifacts/README.md | 16 + docs/sdks/auth/README.md | 8 + docs/sdks/embeds/README.md | 6 + docs/sdks/events/README.md | 8 + docs/sdks/github/README.md | 18 + docs/sdks/metadata/README.md | 6 + docs/sdks/organizations/README.md | 8 + docs/sdks/reports/README.md | 6 + docs/sdks/requests/README.md | 6 + docs/sdks/schemas/README.md | 16 + docs/sdks/shorturls/README.md | 2 + docs/sdks/suggest/README.md | 6 + docs/sdks/workspaces/README.md | 2 + gen.yaml | 2 +- .../shared/githubtriggeractionrequest.go | 9 + pkg/utils/json.go | 12 +- speakeasy.go | 6 +- 24 files changed, 676 insertions(+), 516 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 6c786d66..7179cea0 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 2858c6d9-f946-4185-ae68-3b8e708830fb management: - docChecksum: 7e5374ccd8317cf07089c151d486221b + docChecksum: f406fdb120a976f69c3be12c8676cbac docVersion: 0.4.0 . - speakeasyVersion: 1.359.1 - generationVersion: 2.392.0 - releaseVersion: 3.12.4 - configChecksum: d5791f26c5914c005d85909f5c4aa4c5 + speakeasyVersion: 1.364.0 + generationVersion: 2.396.0 + releaseVersion: 3.12.5 + configChecksum: 06754b207a20130a897c23f6a2d79b0e repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-go.git repoSubDirectory: . installationURL: https://github.com/speakeasy-api/speakeasy-client-sdk-go diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 8b48a48b..fd21a86b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.359.1 +speakeasyVersion: 1.364.0 sources: my-source: sourceNamespace: my-source @@ -14,7 +14,7 @@ targets: sourceRevisionDigest: sha256:792c2fb338319e1154996f5bf090cb645d34eba8ed55a33543419d203436a9e4 sourceBlobDigest: sha256:28d39c7e07004c22ce179aa3921d03b1199e30f9ed1cf219f7eaf4142999ddff codeSamplesNamespace: code-samples-go-speakeasy-client-sdk-go - codeSamplesRevisionDigest: sha256:43d760bdf36d0b51bf205e7fb807e6c69eab60f34841c54ca8affeb23c2bb10f + codeSamplesRevisionDigest: sha256:7744acbde74cb039e57601dacdf9572f71963d4953793b868aea1ca0c72d1a17 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 @@ -22,9 +22,7 @@ workflow: sources: my-source: inputs: - - location: https://docs.speakeasyapi.dev/openapi.yaml - registry: - location: registry.speakeasyapi.dev/speakeasy-self/speakeasy-self/my-source + - location: registry.speakeasyapi.dev/speakeasy-self/speakeasy-self/speakeasy-api:main targets: speakeasy-client-sdk-go: target: go diff --git a/RELEASES.md b/RELEASES.md index b32557c3..321f6ef6 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1176,4 +1176,14 @@ Based on: ### Generated - [go v3.12.4] . ### Releases -- [Go v3.12.4] https://github.com/speakeasy-api/speakeasy-client-sdk-go/releases/tag/v3.12.4 - . \ No newline at end of file +- [Go v3.12.4] https://github.com/speakeasy-api/speakeasy-client-sdk-go/releases/tag/v3.12.4 - . + +## 2024-08-13 21:06:33 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.364.0 (2.396.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v3.12.5] . +### Releases +- [Go v3.12.5] https://github.com/speakeasy-api/speakeasy-client-sdk-go/releases/tag/v3.12.5 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 1594bea3..4e536d79 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,11 +3,11 @@ info: title: CodeSamples overlay for go target version: 0.0.0 actions: - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/metadata"]["post"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/generate/postman"]["get"] update: x-codeSamples: - lang: go - label: insertVersionMetadata + label: generatePostmanCollection source: |- package main @@ -25,28 +25,24 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.InsertVersionMetadataRequest{ + request := operations.GeneratePostmanCollectionRequest{ APIID: "", VersionID: "", - VersionMetadata: shared.VersionMetadataInput{ - MetaKey: "", - MetaValue: "", - }, } ctx := context.Background() - res, err := s.Metadata.InsertVersionMetadata(ctx, request) + res, err := s.Apis.GeneratePostmanCollection(ctx, request) if err != nil { log.Fatal(err) } - if res.VersionMetadata != nil { + if res.PostmanCollection != nil { // handle response } } - - target: $["paths"]["/v1/eventlog/query"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}"]["delete"] update: x-codeSamples: - lang: go - label: queryEventLog + label: deleteApiEndpoint source: |- package main @@ -64,21 +60,25 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.QueryEventLogRequest{} + request := operations.DeleteAPIEndpointRequest{ + APIID: "", + VersionID: "", + APIEndpointID: "", + } ctx := context.Background() - res, err := s.Requests.QueryEventLog(ctx, request) + res, err := s.APIEndpoints.DeleteAPIEndpoint(ctx, request) if err != nil { log.Fatal(err) } - if res.BoundedRequests != nil { + if res != nil { // handle response } } - - target: $["paths"]["/v1/eventlog/{requestID}/generate/postman"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/metadata"]["get"] update: x-codeSamples: - lang: go - label: generateRequestPostmanCollection + label: getVersionMetadata source: |- package main @@ -96,23 +96,24 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GenerateRequestPostmanCollectionRequest{ - RequestID: "", + request := operations.GetVersionMetadataRequest{ + APIID: "", + VersionID: "", } ctx := context.Background() - res, err := s.Requests.GenerateRequestPostmanCollection(ctx, request) + res, err := s.Metadata.GetVersionMetadata(ctx, request) if err != nil { log.Fatal(err) } - if res.PostmanCollection != nil { + if res.VersionMetadata != nil { // handle response } } - - target: $["paths"]["/v1/workspace/{workspaceID}"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schemas"]["get"] update: x-codeSamples: - lang: go - label: getWorkspace + label: getSchemas source: |- package main @@ -130,21 +131,24 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetWorkspaceRequest{} + request := operations.GetSchemasRequest{ + APIID: "", + VersionID: "", + } ctx := context.Background() - res, err := s.Workspaces.GetWorkspace(ctx, request) + res, err := s.Schemas.GetSchemas(ctx, request) if err != nil { log.Fatal(err) } - if res.Workspace != nil { + if res.Schemata != nil { // handle response } } - - target: $["paths"]["/v1/workspace/{workspaceID}/events"]["get"] + - target: $["paths"]["/v1/github/publishing_secrets"]["get"] update: x-codeSamples: - lang: go - label: searchWorkspaceEvents + label: githubCheckPublishingSecrets source: |- package main @@ -162,27 +166,30 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.SearchWorkspaceEventsRequest{} + request := operations.GithubCheckPublishingSecretsRequest{ + GenerateGenLockID: "", + } ctx := context.Background() - res, err := s.Events.SearchWorkspaceEvents(ctx, request) + res, err := s.Github.GithubCheckPublishingSecrets(ctx, request) if err != nil { log.Fatal(err) } - if res.CliEventBatch != nil { + if res.GithubMissingPublishingSecretsResponse != nil { // handle response } } - - target: $["paths"]["/v1/artifacts/preflight"]["post"] + - target: $["paths"]["/v1/apis/{apiID}/api_endpoints"]["get"] update: x-codeSamples: - lang: go - label: preflight + label: getAllApiEndpoints source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" + "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -193,21 +200,23 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - + request := operations.GetAllAPIEndpointsRequest{ + APIID: "", + } ctx := context.Background() - res, err := s.Artifacts.Preflight(ctx, nil) + res, err := s.APIEndpoints.GetAllAPIEndpoints(ctx, request) if err != nil { log.Fatal(err) } - if res.PreflightToken != nil { + if res.APIEndpoints != nil { // handle response } } - - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/tags"]["post"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/postman"]["get"] update: x-codeSamples: - lang: go - label: postTags + label: generatePostmanCollectionForApiEndpoint source: |- package main @@ -225,23 +234,25 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.PostTagsRequest{ - NamespaceName: "", + request := operations.GeneratePostmanCollectionForAPIEndpointRequest{ + APIID: "", + VersionID: "", + APIEndpointID: "", } ctx := context.Background() - res, err := s.Artifacts.PostTags(ctx, request) + res, err := s.APIEndpoints.GeneratePostmanCollectionForAPIEndpoint(ctx, request) if err != nil { log.Fatal(err) } - if res != nil { + if res.PostmanCollection != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/api_endpoints"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema"]["post"] update: x-codeSamples: - lang: go - label: getAllApiEndpoints + label: registerSchema source: |- package main @@ -259,23 +270,30 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetAllAPIEndpointsRequest{ + request := operations.RegisterSchemaRequest{ APIID: "", + VersionID: "", + RequestBody: operations.RegisterSchemaRequestBody{ + File: operations.File{ + FileName: "your_file_here", + Content: []byte("0xCAFCA03e0e"), + }, + }, } ctx := context.Background() - res, err := s.APIEndpoints.GetAllAPIEndpoints(ctx, request) + res, err := s.Schemas.RegisterSchema(ctx, request) if err != nil { log.Fatal(err) } - if res.APIEndpoints != nil { + if res != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/metadata"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{baseRevisionID}/diff/{targetRevisionID}"]["get"] update: x-codeSamples: - lang: go - label: getVersionMetadata + label: getSchemaDiff source: |- package main @@ -293,64 +311,61 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetVersionMetadataRequest{ + request := operations.GetSchemaDiffRequest{ APIID: "", VersionID: "", + BaseRevisionID: "", + TargetRevisionID: "", } ctx := context.Background() - res, err := s.Metadata.GetVersionMetadata(ctx, request) + res, err := s.Schemas.GetSchemaDiff(ctx, request) if err != nil { log.Fatal(err) } - if res.VersionMetadata != nil { + if res.SchemaDiff != nil { // handle response } } - - target: $["paths"]["/v1/github/publishing_secrets"]["post"] + - target: $["paths"]["/v1/auth/access_token"]["get"] update: x-codeSamples: - lang: go - label: githubStorePublishingSecrets + label: getAccessToken source: |- package main import( - "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" + "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) func main() { - s := speakeasyclientsdkgo.New( - speakeasyclientsdkgo.WithSecurity(shared.Security{ - APIKey: speakeasyclientsdkgo.String(""), - }), - ) - request := shared.GithubStorePublishingSecretsRequest{ - GenerateGenLockID: "", + s := speakeasyclientsdkgo.New() + request := operations.GetAccessTokenRequest{ + WorkspaceID: "", } ctx := context.Background() - res, err := s.Github.GithubStorePublishingSecrets(ctx, request) + res, err := s.Auth.GetAccessToken(ctx, request) if err != nil { log.Fatal(err) } - if res != nil { + if res.AccessToken != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/postman"]["get"] + - target: $["paths"]["/v1/github/configure_code_samples"]["post"] update: x-codeSamples: - lang: go - label: generatePostmanCollectionForApiEndpoint + label: configureCodeSamples source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" - "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -361,32 +376,31 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GeneratePostmanCollectionForAPIEndpointRequest{ - APIID: "", - VersionID: "", - APIEndpointID: "", + request := shared.GithubConfigureCodeSamplesRequest{ + Org: "", + Repo: "", + TargetName: "", } ctx := context.Background() - res, err := s.APIEndpoints.GeneratePostmanCollectionForAPIEndpoint(ctx, request) + res, err := s.Github.ConfigureCodeSamples(ctx, request) if err != nil { log.Fatal(err) } - if res.PostmanCollection != nil { + if res.GithubConfigureCodeSamplesResponse != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}"]["get"] + - target: $["paths"]["/v1/github/trigger_action"]["post"] update: x-codeSamples: - lang: go - label: getApiEndpoint + label: triggerAction source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" - "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -397,25 +411,25 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetAPIEndpointRequest{ - APIID: "", - VersionID: "", - APIEndpointID: "", + request := shared.GithubTriggerActionRequest{ + Org: "", + RepoName: "", + GenLockID: "", } ctx := context.Background() - res, err := s.APIEndpoints.GetAPIEndpoint(ctx, request) + res, err := s.Github.TriggerAction(ctx, request) if err != nil { log.Fatal(err) } - if res.APIEndpoint != nil { + if res != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/metadata/{metaKey}/{metaValue}"]["delete"] + - target: $["paths"]["/v1/suggest/operation_ids/{namespace_name}/{revision_reference}"]["post"] update: x-codeSamples: - lang: go - label: deleteVersionMetadata + label: suggestOperationIDsRegistry source: |- package main @@ -433,26 +447,25 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.DeleteVersionMetadataRequest{ - APIID: "", - VersionID: "", - MetaKey: "", - MetaValue: "", + request := operations.SuggestOperationIDsRegistryRequest{ + NamespaceName: "", + RevisionReference: "", + XSessionID: "", } ctx := context.Background() - res, err := s.Metadata.DeleteVersionMetadata(ctx, request) + res, err := s.Suggest.SuggestOperationIDsRegistry(ctx, request) if err != nil { log.Fatal(err) } - if res != nil { + if res.SuggestedOperationIDs != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schemas"]["get"] + - target: $["paths"]["/v1/suggest/operation_ids/apply"]["post"] update: x-codeSamples: - lang: go - label: getSchemas + label: applyOperationIDs source: |- package main @@ -470,30 +483,30 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetSchemasRequest{ - APIID: "", - VersionID: "", + request := operations.ApplyOperationIDsRequest{ + XSessionID: "", } ctx := context.Background() - res, err := s.Schemas.GetSchemas(ctx, request) + res, err := s.Suggest.ApplyOperationIDs(ctx, request) if err != nil { log.Fatal(err) } - if res.Schemata != nil { + if res.TwoHundredApplicationJSONSchema != nil { // handle response } } - - target: $["paths"]["/v1/github/configure_target"]["post"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}"]["get"] update: x-codeSamples: - lang: go - label: configureTarget + label: getApiEndpoint source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" + "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -504,24 +517,25 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := shared.GithubConfigureTargetRequest{ - Org: "", - RepoName: "", + request := operations.GetAPIEndpointRequest{ + APIID: "", + VersionID: "", + APIEndpointID: "", } ctx := context.Background() - res, err := s.Github.ConfigureTarget(ctx, request) + res, err := s.APIEndpoints.GetAPIEndpoint(ctx, request) if err != nil { log.Fatal(err) } - if res != nil { + if res.APIEndpoint != nil { // handle response } } - - target: $["paths"]["/v1/workspace/{workspaceID}/events"]["post"] + - target: $["paths"]["/v1/workspace/access"]["get"] update: x-codeSamples: - lang: go - label: postWorkspaceEvents + label: getWorkspaceAccess source: |- package main @@ -529,7 +543,6 @@ actions: "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" - "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/types" "context" "log" ) @@ -540,35 +553,21 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.PostWorkspaceEventsRequest{ - RequestBody: []shared.CliEvent{ - shared.CliEvent{ - ID: "", - ExecutionID: "", - WorkspaceID: "", - SpeakeasyAPIKeyName: "", - InteractionType: shared.InteractionTypePublish, - LocalStartedAt: types.MustTimeFromString("2022-05-18T11:28:11.328Z"), - CreatedAt: types.MustTimeFromString("2024-05-07T12:35:47.182Z"), - SpeakeasyVersion: "", - Success: false, - }, - }, - } + request := operations.GetWorkspaceAccessRequest{} ctx := context.Background() - res, err := s.Events.PostWorkspaceEvents(ctx, request) + res, err := s.Auth.GetWorkspaceAccess(ctx, request) if err != nil { log.Fatal(err) } - if res != nil { + if res.AccessDetails != nil { // handle response } } - - target: $["paths"]["/v1/apis"]["get"] + - target: $["paths"]["/v1/eventlog/query"]["get"] update: x-codeSamples: - lang: go - label: getApis + label: queryEventLog source: |- package main @@ -586,50 +585,21 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetApisRequest{} - ctx := context.Background() - res, err := s.Apis.GetApis(ctx, request) - if err != nil { - log.Fatal(err) - } - if res.Apis != nil { - // handle response - } - } - - target: $["paths"]["/v1/auth/access_token"]["get"] - update: - x-codeSamples: - - lang: go - label: getAccessToken - source: |- - package main - - import( - speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" - "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" - "context" - "log" - ) - - func main() { - s := speakeasyclientsdkgo.New() - request := operations.GetAccessTokenRequest{ - WorkspaceID: "", - } + request := operations.QueryEventLogRequest{} ctx := context.Background() - res, err := s.Auth.GetAccessToken(ctx, request) + res, err := s.Requests.QueryEventLog(ctx, request) if err != nil { log.Fatal(err) } - if res.AccessToken != nil { + if res.BoundedRequests != nil { // handle response } } - - target: $["paths"]["/v1/eventlog/{requestID}"]["get"] + - target: $["paths"]["/v1/workspace/embed-access-tokens/{tokenID}"]["delete"] update: x-codeSamples: - lang: go - label: getRequestFromEventLog + label: revokeEmbedAccessToken source: |- package main @@ -647,23 +617,23 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetRequestFromEventLogRequest{ - RequestID: "", + request := operations.RevokeEmbedAccessTokenRequest{ + TokenID: "", } ctx := context.Background() - res, err := s.Requests.GetRequestFromEventLog(ctx, request) + res, err := s.Embeds.RevokeEmbedAccessToken(ctx, request) if err != nil { log.Fatal(err) } - if res.UnboundedRequest != nil { + if res != nil { // handle response } } - - target: $["paths"]["/v1/github/action"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints"]["get"] update: x-codeSamples: - lang: go - label: getAction + label: getAllForVersionApiEndpoints source: |- package main @@ -681,31 +651,30 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetActionRequest{ - Org: "", - Repo: "", + request := operations.GetAllForVersionAPIEndpointsRequest{ + APIID: "", + VersionID: "", } ctx := context.Background() - res, err := s.Github.GetAction(ctx, request) + res, err := s.APIEndpoints.GetAllForVersionAPIEndpoints(ctx, request) if err != nil { log.Fatal(err) } - if res.GithubGetActionResponse != nil { + if res.APIEndpoints != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}"]["put"] + - target: $["paths"]["/v1/auth/validate"]["get"] update: x-codeSamples: - lang: go - label: upsertApi + label: validateApiKey source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" - "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -716,28 +685,21 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.UpsertAPIRequest{ - APIID: "", - API: shared.APIInput{ - APIID: "", - Description: "Synchronised 5th generation knowledge user", - VersionID: "", - }, - } + ctx := context.Background() - res, err := s.Apis.UpsertAPI(ctx, request) + res, err := s.Auth.ValidateAPIKey(ctx) if err != nil { log.Fatal(err) } - if res.API != nil { + if res.APIKeyDetails != nil { // handle response } } - - target: $["paths"]["/v1/github/configure_code_samples"]["post"] + - target: $["paths"]["/v1/user"]["get"] update: x-codeSamples: - lang: go - label: configureCodeSamples + label: getUser source: |- package main @@ -754,31 +716,28 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := shared.GithubConfigureCodeSamplesRequest{ - Org: "", - Repo: "", - TargetName: "", - } + ctx := context.Background() - res, err := s.Github.ConfigureCodeSamples(ctx, request) + res, err := s.Auth.GetUser(ctx) if err != nil { log.Fatal(err) } - if res.GithubConfigureCodeSamplesResponse != nil { + if res.User != nil { // handle response } } - - target: $["paths"]["/v1/organization/usage"]["get"] + - target: $["paths"]["/v1/short_urls"]["post"] update: x-codeSamples: - lang: go - label: getOrganizationUsage + label: create source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" + "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -789,21 +748,23 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - + request := operations.CreateRequestBody{ + URL: "http://limp-pastry.org", + } ctx := context.Background() - res, err := s.Organizations.GetOrganizationUsage(ctx) + res, err := s.ShortURLs.Create(ctx, request) if err != nil { log.Fatal(err) } - if res.OrganizationUsageResponse != nil { + if res.ShortURL != nil { // handle response } } - - target: $["paths"]["/v1/workspace/embed-access-tokens/{tokenID}"]["delete"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/generate/openapi"]["get"] update: x-codeSamples: - lang: go - label: revokeEmbedAccessToken + label: generateOpenApiSpec source: |- package main @@ -821,23 +782,24 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.RevokeEmbedAccessTokenRequest{ - TokenID: "", + request := operations.GenerateOpenAPISpecRequest{ + APIID: "", + VersionID: "", } ctx := context.Background() - res, err := s.Embeds.RevokeEmbedAccessToken(ctx, request) + res, err := s.Apis.GenerateOpenAPISpec(ctx, request) if err != nil { log.Fatal(err) } - if res != nil { + if res.GenerateOpenAPISpecDiff != nil { // handle response } } - - target: $["paths"]["/v1/oci/v2/{organization_slug}/{workspace_slug}/{namespace_name}/blobs/{digest}"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}/download"]["get"] update: x-codeSamples: - lang: go - label: getBlob + label: downloadSchemaRevision source: |- package main @@ -855,26 +817,25 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetBlobRequest{ - OrganizationSlug: "", - WorkspaceSlug: "", - NamespaceName: "", - Digest: "", + request := operations.DownloadSchemaRevisionRequest{ + APIID: "", + VersionID: "", + RevisionID: "", } ctx := context.Background() - res, err := s.Artifacts.GetBlob(ctx, request) + res, err := s.Schemas.DownloadSchemaRevision(ctx, request) if err != nil { log.Fatal(err) } - if res.Blob != nil { + if res.TwoHundredApplicationJSONSchema != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/download"]["get"] + - target: $["paths"]["/v1/workspace/{workspaceID}/events/targets"]["get"] update: x-codeSamples: - lang: go - label: downloadSchema + label: getWorkspaceTargets source: |- package main @@ -892,24 +853,21 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.DownloadSchemaRequest{ - APIID: "", - VersionID: "", - } + request := operations.GetWorkspaceTargetsRequest{} ctx := context.Background() - res, err := s.Schemas.DownloadSchema(ctx, request) + res, err := s.Events.GetWorkspaceTargets(ctx, request) if err != nil { log.Fatal(err) } - if res.TwoHundredApplicationJSONSchema != nil { + if res.TargetSDKList != nil { // handle response } } - - target: $["paths"]["/v1/suggest/operation_ids/apply"]["post"] + - target: $["paths"]["/v1/reports"]["post"] update: x-codeSamples: - lang: go - label: applyOperationIDs + label: uploadReport source: |- package main @@ -927,23 +885,27 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.ApplyOperationIDsRequest{ - XSessionID: "", + request := operations.UploadReportRequestBody{ + Data: shared.Report{}, + File: operations.UploadReportFile{ + FileName: "your_file_here", + Content: []byte("0xA329C0ad85"), + }, } ctx := context.Background() - res, err := s.Suggest.ApplyOperationIDs(ctx, request) + res, err := s.Reports.UploadReport(ctx, request) if err != nil { log.Fatal(err) } - if res.TwoHundredApplicationJSONSchema != nil { + if res.UploadedReport != nil { // handle response } } - - target: $["paths"]["/v1/reports/linting/{documentChecksum}"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}"]["get"] update: x-codeSamples: - lang: go - label: getLintingReportSignedUrl + label: getSchemaRevision source: |- package main @@ -961,23 +923,25 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetLintingReportSignedURLRequest{ - DocumentChecksum: "", + request := operations.GetSchemaRevisionRequest{ + APIID: "", + VersionID: "", + RevisionID: "", } ctx := context.Background() - res, err := s.Reports.GetLintingReportSignedURL(ctx, request) + res, err := s.Schemas.GetSchemaRevision(ctx, request) if err != nil { log.Fatal(err) } - if res.SignedAccess != nil { + if res.Schema != nil { // handle response } } - - target: $["paths"]["/v1/auth/validate"]["get"] + - target: $["paths"]["/v1/github/configure_mintlify_repo"]["post"] update: x-codeSamples: - lang: go - label: validateApiKey + label: configureMintlifyRepo source: |- package main @@ -994,21 +958,28 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - + request := shared.GithubConfigureMintlifyRepoRequest{ + Org: "", + Repo: "", + Input: "", + Overlays: []string{ + "", + }, + } ctx := context.Background() - res, err := s.Auth.ValidateAPIKey(ctx) + res, err := s.Github.ConfigureMintlifyRepo(ctx, request) if err != nil { log.Fatal(err) } - if res.APIKeyDetails != nil { + if res != nil { // handle response } } - - target: $["paths"]["/v1/github/check_access"]["get"] + - target: $["paths"]["/v1/reports/changes/{documentChecksum}"]["get"] update: x-codeSamples: - lang: go - label: checkAccess + label: getChangesReportSignedUrl source: |- package main @@ -1026,31 +997,29 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.CheckAccessRequest{ - Org: "", - Repo: "", + request := operations.GetChangesReportSignedURLRequest{ + DocumentChecksum: "", } ctx := context.Background() - res, err := s.Github.CheckAccess(ctx, request) + res, err := s.Reports.GetChangesReportSignedURL(ctx, request) if err != nil { log.Fatal(err) } - if res != nil { + if res.SignedAccess != nil { // handle response } } - - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/revisions"]["get"] + - target: $["paths"]["/v1/organization"]["get"] update: x-codeSamples: - lang: go - label: getRevisions + label: getOrganizations source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" - "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -1061,30 +1030,27 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetRevisionsRequest{ - NamespaceName: "", - } + ctx := context.Background() - res, err := s.Artifacts.GetRevisions(ctx, request) + res, err := s.Organizations.GetOrganizations(ctx) if err != nil { log.Fatal(err) } - if res.GetRevisionsResponse != nil { + if res.Organizations != nil { // handle response } } - - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/revisions/{revision_reference}/summary"]["get"] + - target: $["paths"]["/v1/workspace/embed-access-tokens/valid"]["get"] update: x-codeSamples: - lang: go - label: getOASSummary + label: getValidEmbedAccessTokens source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" - "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -1095,31 +1061,27 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetOASSummaryRequest{ - NamespaceName: "", - RevisionReference: "", - } + ctx := context.Background() - res, err := s.Artifacts.GetOASSummary(ctx, request) + res, err := s.Embeds.GetValidEmbedAccessTokens(ctx) if err != nil { log.Fatal(err) } - if res.OASSummary != nil { + if res.EmbedTokens != nil { // handle response } } - - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/tags"]["get"] + - target: $["paths"]["/v1/artifacts/namespaces"]["get"] update: x-codeSamples: - lang: go - label: getTags + label: getNamespaces source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" - "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -1130,23 +1092,21 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetTagsRequest{ - NamespaceName: "", - } + ctx := context.Background() - res, err := s.Artifacts.GetTags(ctx, request) + res, err := s.Artifacts.GetNamespaces(ctx) if err != nil { log.Fatal(err) } - if res.GetTagsResponse != nil { + if res.GetNamespacesResponse != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema"]["post"] + - target: $["paths"]["/v1/suggest/operation_ids"]["post"] update: x-codeSamples: - lang: go - label: registerSchema + label: suggestOperationIDs source: |- package main @@ -1164,30 +1124,29 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.RegisterSchemaRequest{ - APIID: "", - VersionID: "", - RequestBody: operations.RegisterSchemaRequestBody{ - File: operations.File{ + request := operations.SuggestOperationIDsRequest{ + XSessionID: "", + RequestBody: operations.SuggestOperationIDsRequestBody{ + Schema: operations.Schema{ FileName: "your_file_here", - Content: []byte("0xCAFCA03e0e"), + Content: []byte("0xb2de88c98a"), }, }, } ctx := context.Background() - res, err := s.Schemas.RegisterSchema(ctx, request) + res, err := s.Suggest.SuggestOperationIDs(ctx, request) if err != nil { log.Fatal(err) } - if res != nil { + if res.SuggestedOperationIDs != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/generate/openapi"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}"]["delete"] update: x-codeSamples: - lang: go - label: generateOpenApiSpec + label: deleteSchema source: |- package main @@ -1205,24 +1164,25 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GenerateOpenAPISpecRequest{ + request := operations.DeleteSchemaRequest{ APIID: "", VersionID: "", + RevisionID: "", } ctx := context.Background() - res, err := s.Apis.GenerateOpenAPISpec(ctx, request) + res, err := s.Schemas.DeleteSchema(ctx, request) if err != nil { log.Fatal(err) } - if res.GenerateOpenAPISpecDiff != nil { + if res != nil { // handle response } } - - target: $["paths"]["/v1/workspace/access"]["get"] + - target: $["paths"]["/v1/workspace/{workspaceID}"]["get"] update: x-codeSamples: - lang: go - label: getWorkspaceAccess + label: getWorkspace source: |- package main @@ -1240,21 +1200,21 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetWorkspaceAccessRequest{} + request := operations.GetWorkspaceRequest{} ctx := context.Background() - res, err := s.Auth.GetWorkspaceAccess(ctx, request) + res, err := s.Workspaces.GetWorkspace(ctx, request) if err != nil { log.Fatal(err) } - if res.AccessDetails != nil { + if res.Workspace != nil { // handle response } } - - target: $["paths"]["/v1/github/publishing_prs"]["get"] + - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/tags"]["get"] update: x-codeSamples: - lang: go - label: fetchPublishingPRs + label: getTags source: |- package main @@ -1272,25 +1232,23 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.FetchPublishingPRsRequest{ - GenerateGenLockID: "", - Org: "", - Repo: "", + request := operations.GetTagsRequest{ + NamespaceName: "", } ctx := context.Background() - res, err := s.Github.FetchPublishingPRs(ctx, request) + res, err := s.Artifacts.GetTags(ctx, request) if err != nil { log.Fatal(err) } - if res.GithubPublishingPRResponse != nil { + if res.GetTagsResponse != nil { // handle response } } - - target: $["paths"]["/v1/github/publishing_secrets"]["get"] + - target: $["paths"]["/v1/reports/linting/{documentChecksum}"]["get"] update: x-codeSamples: - lang: go - label: githubCheckPublishingSecrets + label: getLintingReportSignedUrl source: |- package main @@ -1308,29 +1266,30 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GithubCheckPublishingSecretsRequest{ - GenerateGenLockID: "", + request := operations.GetLintingReportSignedURLRequest{ + DocumentChecksum: "", } ctx := context.Background() - res, err := s.Github.GithubCheckPublishingSecrets(ctx, request) + res, err := s.Reports.GetLintingReportSignedURL(ctx, request) if err != nil { log.Fatal(err) } - if res.GithubMissingPublishingSecretsResponse != nil { + if res.SignedAccess != nil { // handle response } } - - target: $["paths"]["/v1/workspace/embed-access-tokens/valid"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/metadata"]["post"] update: x-codeSamples: - lang: go - label: getValidEmbedAccessTokens + label: insertVersionMetadata source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" + "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -1341,28 +1300,34 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - + request := operations.InsertVersionMetadataRequest{ + APIID: "", + VersionID: "", + VersionMetadata: shared.VersionMetadataInput{ + MetaKey: "", + MetaValue: "", + }, + } ctx := context.Background() - res, err := s.Embeds.GetValidEmbedAccessTokens(ctx) + res, err := s.Metadata.InsertVersionMetadata(ctx, request) if err != nil { log.Fatal(err) } - if res.EmbedTokens != nil { + if res.VersionMetadata != nil { // handle response } } - - target: $["paths"]["/v1/reports/changes/{documentChecksum}"]["get"] + - target: $["paths"]["/v1/github/configure_target"]["post"] update: x-codeSamples: - lang: go - label: getChangesReportSignedUrl + label: configureTarget source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" - "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -1373,23 +1338,24 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetChangesReportSignedURLRequest{ - DocumentChecksum: "", + request := shared.GithubConfigureTargetRequest{ + Org: "", + RepoName: "", } ctx := context.Background() - res, err := s.Reports.GetChangesReportSignedURL(ctx, request) + res, err := s.Github.ConfigureTarget(ctx, request) if err != nil { log.Fatal(err) } - if res.SignedAccess != nil { + if res != nil { // handle response } } - - target: $["paths"]["/v1/short_urls"]["post"] + - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/revisions"]["get"] update: x-codeSamples: - lang: go - label: create + label: getRevisions source: |- package main @@ -1407,23 +1373,23 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.CreateRequestBody{ - URL: "http://limp-pastry.org", + request := operations.GetRevisionsRequest{ + NamespaceName: "", } ctx := context.Background() - res, err := s.ShortURLs.Create(ctx, request) + res, err := s.Artifacts.GetRevisions(ctx, request) if err != nil { log.Fatal(err) } - if res.ShortURL != nil { + if res.GetRevisionsResponse != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}"]["get"] + - target: $["paths"]["/v1/apis"]["get"] update: x-codeSamples: - lang: go - label: getAllApiVersions + label: getApis source: |- package main @@ -1441,11 +1407,9 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetAllAPIVersionsRequest{ - APIID: "", - } + request := operations.GetApisRequest{} ctx := context.Background() - res, err := s.Apis.GetAllAPIVersions(ctx, request) + res, err := s.Apis.GetApis(ctx, request) if err != nil { log.Fatal(err) } @@ -1497,11 +1461,11 @@ actions: // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/openapi"]["get"] + - target: $["paths"]["/v1/github/publishing_prs"]["get"] update: x-codeSamples: - lang: go - label: generateOpenApiSpecForApiEndpoint + label: fetchPublishingPRs source: |- package main @@ -1519,31 +1483,32 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GenerateOpenAPISpecForAPIEndpointRequest{ - APIID: "", - VersionID: "", - APIEndpointID: "", + request := operations.FetchPublishingPRsRequest{ + GenerateGenLockID: "", + Org: "", + Repo: "", } ctx := context.Background() - res, err := s.APIEndpoints.GenerateOpenAPISpecForAPIEndpoint(ctx, request) + res, err := s.Github.FetchPublishingPRs(ctx, request) if err != nil { log.Fatal(err) } - if res.GenerateOpenAPISpecDiff != nil { + if res.GithubPublishingPRResponse != nil { // handle response } } - - target: $["paths"]["/v1/user"]["get"] + - target: $["paths"]["/v1/oci/v2/{organization_slug}/{workspace_slug}/{namespace_name}/manifests/{revision_reference}"]["get"] update: x-codeSamples: - lang: go - label: getUser + label: getManifest source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" + "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -1554,27 +1519,33 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - + request := operations.GetManifestRequest{ + OrganizationSlug: "", + WorkspaceSlug: "", + NamespaceName: "", + RevisionReference: "", + } ctx := context.Background() - res, err := s.Auth.GetUser(ctx) + res, err := s.Artifacts.GetManifest(ctx, request) if err != nil { log.Fatal(err) } - if res.User != nil { + if res.Manifest != nil { // handle response } } - - target: $["paths"]["/v1/organization"]["get"] + - target: $["paths"]["/v1/apis/{apiID}"]["put"] update: x-codeSamples: - lang: go - label: getOrganizations + label: upsertApi source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" + "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -1585,13 +1556,55 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) + request := operations.UpsertAPIRequest{ + APIID: "", + API: shared.APIInput{ + APIID: "", + Description: "Synchronised 5th generation knowledge user", + VersionID: "", + }, + } + ctx := context.Background() + res, err := s.Apis.UpsertAPI(ctx, request) + if err != nil { + log.Fatal(err) + } + if res.API != nil { + // handle response + } + } + - target: $["paths"]["/v1/github/check_access"]["get"] + update: + x-codeSamples: + - lang: go + label: checkAccess + source: |- + package main + + import( + "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" + speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" + "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" + "context" + "log" + ) + func main() { + s := speakeasyclientsdkgo.New( + speakeasyclientsdkgo.WithSecurity(shared.Security{ + APIKey: speakeasyclientsdkgo.String(""), + }), + ) + request := operations.CheckAccessRequest{ + Org: "", + Repo: "", + } ctx := context.Background() - res, err := s.Organizations.GetOrganizations(ctx) + res, err := s.Github.CheckAccess(ctx, request) if err != nil { log.Fatal(err) } - if res.Organizations != nil { + if res != nil { // handle response } } @@ -1629,11 +1642,11 @@ actions: // handle response } } - - target: $["paths"]["/v1/suggest/operation_ids/{namespace_name}/{revision_reference}"]["post"] + - target: $["paths"]["/v1/workspace/{workspaceID}/events"]["get"] update: x-codeSamples: - lang: go - label: suggestOperationIDsRegistry + label: searchWorkspaceEvents source: |- package main @@ -1651,17 +1664,13 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.SuggestOperationIDsRegistryRequest{ - NamespaceName: "", - RevisionReference: "", - XSessionID: "", - } + request := operations.SearchWorkspaceEventsRequest{} ctx := context.Background() - res, err := s.Suggest.SuggestOperationIDsRegistry(ctx, request) + res, err := s.Events.SearchWorkspaceEvents(ctx, request) if err != nil { log.Fatal(err) } - if res.SuggestedOperationIDs != nil { + if res.CliEventBatch != nil { // handle response } } @@ -1700,11 +1709,11 @@ actions: // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints"]["get"] + - target: $["paths"]["/v1/eventlog/{requestID}"]["get"] update: x-codeSamples: - lang: go - label: getAllForVersionApiEndpoints + label: getRequestFromEventLog source: |- package main @@ -1722,24 +1731,23 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetAllForVersionAPIEndpointsRequest{ - APIID: "", - VersionID: "", + request := operations.GetRequestFromEventLogRequest{ + RequestID: "", } ctx := context.Background() - res, err := s.APIEndpoints.GetAllForVersionAPIEndpoints(ctx, request) + res, err := s.Requests.GetRequestFromEventLog(ctx, request) if err != nil { log.Fatal(err) } - if res.APIEndpoints != nil { + if res.UnboundedRequest != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}"]["get"] + - target: $["paths"]["/v1/github/action"]["get"] update: x-codeSamples: - lang: go - label: getSchemaRevision + label: getAction source: |- package main @@ -1755,33 +1763,33 @@ actions: s := speakeasyclientsdkgo.New( speakeasyclientsdkgo.WithSecurity(shared.Security{ APIKey: speakeasyclientsdkgo.String(""), - }), - ) - request := operations.GetSchemaRevisionRequest{ - APIID: "", - VersionID: "", - RevisionID: "", + }), + ) + request := operations.GetActionRequest{ + Org: "", + Repo: "", } ctx := context.Background() - res, err := s.Schemas.GetSchemaRevision(ctx, request) + res, err := s.Github.GetAction(ctx, request) if err != nil { log.Fatal(err) } - if res.Schema != nil { + if res.GithubGetActionResponse != nil { // handle response } } - - target: $["paths"]["/v1/github/configure_mintlify_repo"]["post"] + - target: $["paths"]["/v1/workspace/embed-access-token"]["get"] update: x-codeSamples: - lang: go - label: configureMintlifyRepo + label: getEmbedAccessToken source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" + "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -1792,28 +1800,21 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := shared.GithubConfigureMintlifyRepoRequest{ - Org: "", - Repo: "", - Input: "", - Overlays: []string{ - "", - }, - } + request := operations.GetEmbedAccessTokenRequest{} ctx := context.Background() - res, err := s.Github.ConfigureMintlifyRepo(ctx, request) + res, err := s.Embeds.GetEmbedAccessToken(ctx, request) if err != nil { log.Fatal(err) } - if res != nil { + if res.EmbedAccessTokenResponse != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/find/{displayName}"]["get"] + - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/revisions/{revision_reference}/summary"]["get"] update: x-codeSamples: - lang: go - label: findApiEndpoint + label: getOASSummary source: |- package main @@ -1831,25 +1832,24 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.FindAPIEndpointRequest{ - APIID: "", - VersionID: "", - DisplayName: "Don.Strosin", + request := operations.GetOASSummaryRequest{ + NamespaceName: "", + RevisionReference: "", } ctx := context.Background() - res, err := s.APIEndpoints.FindAPIEndpoint(ctx, request) + res, err := s.Artifacts.GetOASSummary(ctx, request) if err != nil { log.Fatal(err) } - if res.APIEndpoint != nil { + if res.OASSummary != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}"]["delete"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/openapi"]["get"] update: x-codeSamples: - lang: go - label: deleteApiEndpoint + label: generateOpenApiSpecForApiEndpoint source: |- package main @@ -1867,25 +1867,25 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.DeleteAPIEndpointRequest{ + request := operations.GenerateOpenAPISpecForAPIEndpointRequest{ APIID: "", VersionID: "", APIEndpointID: "", } ctx := context.Background() - res, err := s.APIEndpoints.DeleteAPIEndpoint(ctx, request) + res, err := s.APIEndpoints.GenerateOpenAPISpecForAPIEndpoint(ctx, request) if err != nil { log.Fatal(err) } - if res != nil { + if res.GenerateOpenAPISpecDiff != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}"]["delete"] + - target: $["paths"]["/v1/eventlog/{requestID}/generate/postman"]["get"] update: x-codeSamples: - lang: go - label: deleteSchema + label: generateRequestPostmanCollection source: |- package main @@ -1903,25 +1903,23 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.DeleteSchemaRequest{ - APIID: "", - VersionID: "", - RevisionID: "", + request := operations.GenerateRequestPostmanCollectionRequest{ + RequestID: "", } ctx := context.Background() - res, err := s.Schemas.DeleteSchema(ctx, request) + res, err := s.Requests.GenerateRequestPostmanCollection(ctx, request) if err != nil { log.Fatal(err) } - if res != nil { + if res.PostmanCollection != nil { // handle response } } - - target: $["paths"]["/v1/github/trigger_action"]["post"] + - target: $["paths"]["/v1/github/publishing_secrets"]["post"] update: x-codeSamples: - lang: go - label: triggerAction + label: githubStorePublishingSecrets source: |- package main @@ -1938,13 +1936,11 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := shared.GithubTriggerActionRequest{ - Org: "", - RepoName: "", - GenLockID: "", + request := shared.GithubStorePublishingSecretsRequest{ + GenerateGenLockID: "", } ctx := context.Background() - res, err := s.Github.TriggerAction(ctx, request) + res, err := s.Github.GithubStorePublishingSecrets(ctx, request) if err != nil { log.Fatal(err) } @@ -1983,17 +1979,19 @@ actions: // handle response } } - - target: $["paths"]["/v1/artifacts/namespaces"]["get"] + - target: $["paths"]["/v1/workspace/{workspaceID}/events"]["post"] update: x-codeSamples: - lang: go - label: getNamespaces + label: postWorkspaceEvents source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" + "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" + "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/types" "context" "log" ) @@ -2004,21 +2002,35 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - + request := operations.PostWorkspaceEventsRequest{ + RequestBody: []shared.CliEvent{ + shared.CliEvent{ + ID: "", + ExecutionID: "", + WorkspaceID: "", + SpeakeasyAPIKeyName: "", + InteractionType: shared.InteractionTypePublish, + LocalStartedAt: types.MustTimeFromString("2022-05-18T11:28:11.328Z"), + CreatedAt: types.MustTimeFromString("2024-05-07T12:35:47.182Z"), + SpeakeasyVersion: "", + Success: false, + }, + }, + } ctx := context.Background() - res, err := s.Artifacts.GetNamespaces(ctx) + res, err := s.Events.PostWorkspaceEvents(ctx, request) if err != nil { log.Fatal(err) } - if res.GetNamespacesResponse != nil { + if res != nil { // handle response } } - - target: $["paths"]["/v1/suggest/operation_ids"]["post"] + - target: $["paths"]["/v1/oci/v2/{organization_slug}/{workspace_slug}/{namespace_name}/blobs/{digest}"]["get"] update: x-codeSamples: - lang: go - label: suggestOperationIDs + label: getBlob source: |- package main @@ -2036,29 +2048,26 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.SuggestOperationIDsRequest{ - XSessionID: "", - RequestBody: operations.SuggestOperationIDsRequestBody{ - Schema: operations.Schema{ - FileName: "your_file_here", - Content: []byte("0xb2de88c98a"), - }, - }, + request := operations.GetBlobRequest{ + OrganizationSlug: "", + WorkspaceSlug: "", + NamespaceName: "", + Digest: "", } ctx := context.Background() - res, err := s.Suggest.SuggestOperationIDs(ctx, request) + res, err := s.Artifacts.GetBlob(ctx, request) if err != nil { log.Fatal(err) } - if res.SuggestedOperationIDs != nil { + if res.Blob != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/generate/postman"]["get"] + - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/tags"]["post"] update: x-codeSamples: - lang: go - label: generatePostmanCollection + label: postTags source: |- package main @@ -2076,24 +2085,23 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GeneratePostmanCollectionRequest{ - APIID: "", - VersionID: "", + request := operations.PostTagsRequest{ + NamespaceName: "", } ctx := context.Background() - res, err := s.Apis.GeneratePostmanCollection(ctx, request) + res, err := s.Artifacts.PostTags(ctx, request) if err != nil { log.Fatal(err) } - if res.PostmanCollection != nil { + if res != nil { // handle response } } - - target: $["paths"]["/v1/workspace/embed-access-token"]["get"] + - target: $["paths"]["/v1/apis/{apiID}"]["get"] update: x-codeSamples: - lang: go - label: getEmbedAccessToken + label: getAllApiVersions source: |- package main @@ -2111,21 +2119,23 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetEmbedAccessTokenRequest{} + request := operations.GetAllAPIVersionsRequest{ + APIID: "", + } ctx := context.Background() - res, err := s.Embeds.GetEmbedAccessToken(ctx, request) + res, err := s.Apis.GetAllAPIVersions(ctx, request) if err != nil { log.Fatal(err) } - if res.EmbedAccessTokenResponse != nil { + if res.Apis != nil { // handle response } } - - target: $["paths"]["/v1/workspace/{workspaceID}/events/targets/{targetID}/events"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/find/{displayName}"]["get"] update: x-codeSamples: - lang: go - label: getWorkspaceEventsByTarget + label: findApiEndpoint source: |- package main @@ -2143,23 +2153,25 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetWorkspaceEventsByTargetRequest{ - TargetID: "", + request := operations.FindAPIEndpointRequest{ + APIID: "", + VersionID: "", + DisplayName: "Don.Strosin", } ctx := context.Background() - res, err := s.Events.GetWorkspaceEventsByTarget(ctx, request) + res, err := s.APIEndpoints.FindAPIEndpoint(ctx, request) if err != nil { log.Fatal(err) } - if res.CliEventBatch != nil { + if res.APIEndpoint != nil { // handle response } } - - target: $["paths"]["/v1/workspace/{workspaceID}/events/targets"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/metadata/{metaKey}/{metaValue}"]["delete"] update: x-codeSamples: - lang: go - label: getWorkspaceTargets + label: deleteVersionMetadata source: |- package main @@ -2177,21 +2189,26 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetWorkspaceTargetsRequest{} + request := operations.DeleteVersionMetadataRequest{ + APIID: "", + VersionID: "", + MetaKey: "", + MetaValue: "", + } ctx := context.Background() - res, err := s.Events.GetWorkspaceTargets(ctx, request) + res, err := s.Metadata.DeleteVersionMetadata(ctx, request) if err != nil { log.Fatal(err) } - if res.TargetSDKList != nil { + if res != nil { // handle response } } - - target: $["paths"]["/v1/oci/v2/{organization_slug}/{workspace_slug}/{namespace_name}/manifests/{revision_reference}"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema"]["get"] update: x-codeSamples: - lang: go - label: getManifest + label: getSchema source: |- package main @@ -2209,26 +2226,24 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetManifestRequest{ - OrganizationSlug: "", - WorkspaceSlug: "", - NamespaceName: "", - RevisionReference: "", + request := operations.GetSchemaRequest{ + APIID: "", + VersionID: "", } ctx := context.Background() - res, err := s.Artifacts.GetManifest(ctx, request) + res, err := s.Schemas.GetSchema(ctx, request) if err != nil { log.Fatal(err) } - if res.Manifest != nil { + if res.Schema != nil { // handle response } } - - target: $["paths"]["/v1/reports"]["post"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/download"]["get"] update: x-codeSamples: - lang: go - label: uploadReport + label: downloadSchema source: |- package main @@ -2246,34 +2261,30 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.UploadReportRequestBody{ - Data: shared.Report{}, - File: operations.UploadReportFile{ - FileName: "your_file_here", - Content: []byte("0xA329C0ad85"), - }, + request := operations.DownloadSchemaRequest{ + APIID: "", + VersionID: "", } ctx := context.Background() - res, err := s.Reports.UploadReport(ctx, request) + res, err := s.Schemas.DownloadSchema(ctx, request) if err != nil { log.Fatal(err) } - if res.UploadedReport != nil { + if res.TwoHundredApplicationJSONSchema != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}/download"]["get"] + - target: $["paths"]["/v1/organization/usage"]["get"] update: x-codeSamples: - lang: go - label: downloadSchemaRevision + label: getOrganizationUsage source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" - "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -2284,25 +2295,21 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.DownloadSchemaRevisionRequest{ - APIID: "", - VersionID: "", - RevisionID: "", - } + ctx := context.Background() - res, err := s.Schemas.DownloadSchemaRevision(ctx, request) + res, err := s.Organizations.GetOrganizationUsage(ctx) if err != nil { log.Fatal(err) } - if res.TwoHundredApplicationJSONSchema != nil { + if res.OrganizationUsageResponse != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{baseRevisionID}/diff/{targetRevisionID}"]["get"] + - target: $["paths"]["/v1/workspace/{workspaceID}/events/targets/{targetID}/events"]["get"] update: x-codeSamples: - lang: go - label: getSchemaDiff + label: getWorkspaceEventsByTarget source: |- package main @@ -2320,33 +2327,29 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetSchemaDiffRequest{ - APIID: "", - VersionID: "", - BaseRevisionID: "", - TargetRevisionID: "", + request := operations.GetWorkspaceEventsByTargetRequest{ + TargetID: "", } ctx := context.Background() - res, err := s.Schemas.GetSchemaDiff(ctx, request) + res, err := s.Events.GetWorkspaceEventsByTarget(ctx, request) if err != nil { log.Fatal(err) } - if res.SchemaDiff != nil { + if res.CliEventBatch != nil { // handle response } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema"]["get"] + - target: $["paths"]["/v1/artifacts/preflight"]["post"] update: x-codeSamples: - lang: go - label: getSchema + label: preflight source: |- package main import( "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared" speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3" - "github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations" "context" "log" ) @@ -2357,16 +2360,13 @@ actions: APIKey: speakeasyclientsdkgo.String(""), }), ) - request := operations.GetSchemaRequest{ - APIID: "", - VersionID: "", - } + ctx := context.Background() - res, err := s.Schemas.GetSchema(ctx, request) + res, err := s.Artifacts.Preflight(ctx, nil) if err != nil { log.Fatal(err) } - if res.Schema != nil { + if res.PreflightToken != nil { // handle response } } diff --git a/docs/pkg/models/shared/githubtriggeractionrequest.md b/docs/pkg/models/shared/githubtriggeractionrequest.md index 1b73f089..65ff214e 100644 --- a/docs/pkg/models/shared/githubtriggeractionrequest.md +++ b/docs/pkg/models/shared/githubtriggeractionrequest.md @@ -7,6 +7,7 @@ A request to trigger an action on a GitHub target | Field | Type | Required | Description | | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `Force` | **bool* | :heavy_minus_sign: | Force an SDK generation | | `GenLockID` | *string* | :heavy_check_mark: | The generation lock ID | | `Org` | *string* | :heavy_check_mark: | The GitHub organization name | | `RepoName` | *string* | :heavy_check_mark: | The GitHub repository name | diff --git a/docs/sdks/apiendpoints/README.md b/docs/sdks/apiendpoints/README.md index 1fc1e5cf..492c2da4 100644 --- a/docs/sdks/apiendpoints/README.md +++ b/docs/sdks/apiendpoints/README.md @@ -55,6 +55,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -111,6 +113,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -167,6 +171,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -222,6 +228,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -275,6 +283,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -329,6 +339,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -384,6 +396,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -447,6 +461,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/apis/README.md b/docs/sdks/apis/README.md index 4c3e042c..573a0036 100644 --- a/docs/sdks/apis/README.md +++ b/docs/sdks/apis/README.md @@ -52,6 +52,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -107,6 +109,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -161,6 +165,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -215,6 +221,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -267,6 +275,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -326,6 +336,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/artifacts/README.md b/docs/sdks/artifacts/README.md index cff17e8b..cd113152 100644 --- a/docs/sdks/artifacts/README.md +++ b/docs/sdks/artifacts/README.md @@ -56,6 +56,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -112,6 +114,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -162,6 +166,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -213,6 +219,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -264,6 +272,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -315,6 +325,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -368,6 +380,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -418,6 +432,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/auth/README.md b/docs/sdks/auth/README.md index 79efc5b3..2ba9954a 100644 --- a/docs/sdks/auth/README.md +++ b/docs/sdks/auth/README.md @@ -44,6 +44,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -94,6 +96,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -144,6 +148,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -194,6 +200,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/embeds/README.md b/docs/sdks/embeds/README.md index d3e43634..9bae1989 100644 --- a/docs/sdks/embeds/README.md +++ b/docs/sdks/embeds/README.md @@ -47,6 +47,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -97,6 +99,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -149,6 +153,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index 7eceee6b..66fbe8a0 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -49,6 +49,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -101,6 +103,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -168,6 +172,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -220,6 +226,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/github/README.md b/docs/sdks/github/README.md index 8424a4ce..e6a3f67c 100644 --- a/docs/sdks/github/README.md +++ b/docs/sdks/github/README.md @@ -49,6 +49,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -101,6 +103,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -156,6 +160,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -207,6 +213,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -260,6 +268,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -312,6 +322,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -363,6 +375,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -413,6 +427,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -465,6 +481,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/metadata/README.md b/docs/sdks/metadata/README.md index 807a697e..189ecef0 100644 --- a/docs/sdks/metadata/README.md +++ b/docs/sdks/metadata/README.md @@ -51,6 +51,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -105,6 +107,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -163,6 +167,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/organizations/README.md b/docs/sdks/organizations/README.md index 5a363f09..c4bcb4a8 100644 --- a/docs/sdks/organizations/README.md +++ b/docs/sdks/organizations/README.md @@ -42,6 +42,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -94,6 +96,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -144,6 +148,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -193,6 +199,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/reports/README.md b/docs/sdks/reports/README.md index ac76ab9c..75f833b9 100644 --- a/docs/sdks/reports/README.md +++ b/docs/sdks/reports/README.md @@ -48,6 +48,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -101,6 +103,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -158,6 +162,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/requests/README.md b/docs/sdks/requests/README.md index 0751f441..6de106f9 100644 --- a/docs/sdks/requests/README.md +++ b/docs/sdks/requests/README.md @@ -49,6 +49,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -102,6 +104,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -154,6 +158,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/schemas/README.md b/docs/sdks/schemas/README.md index 529284ae..e0a9ed6f 100644 --- a/docs/sdks/schemas/README.md +++ b/docs/sdks/schemas/README.md @@ -55,6 +55,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -109,6 +111,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -164,6 +168,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -219,6 +225,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -275,6 +283,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -331,6 +341,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -386,6 +398,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -447,6 +461,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/shorturls/README.md b/docs/sdks/shorturls/README.md index 36ea257c..d013a63b 100644 --- a/docs/sdks/shorturls/README.md +++ b/docs/sdks/shorturls/README.md @@ -46,6 +46,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/suggest/README.md b/docs/sdks/suggest/README.md index c7c6f503..c5c39f77 100644 --- a/docs/sdks/suggest/README.md +++ b/docs/sdks/suggest/README.md @@ -48,6 +48,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -107,6 +109,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -162,6 +166,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/docs/sdks/workspaces/README.md b/docs/sdks/workspaces/README.md index 61960d4a..a0baa69a 100644 --- a/docs/sdks/workspaces/README.md +++ b/docs/sdks/workspaces/README.md @@ -40,6 +40,8 @@ func main() { } ``` + + ### Parameters | Parameter | Type | Required | Description | diff --git a/gen.yaml b/gen.yaml index 9057f1f1..e9838879 100644 --- a/gen.yaml +++ b/gen.yaml @@ -13,7 +13,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false go: - version: 3.12.4 + version: 3.12.5 additionalDependencies: {} allowUnknownFieldsInWeakUnions: false clientServerStatusCodesAsErrors: true diff --git a/pkg/models/shared/githubtriggeractionrequest.go b/pkg/models/shared/githubtriggeractionrequest.go index 183ebaea..21185371 100644 --- a/pkg/models/shared/githubtriggeractionrequest.go +++ b/pkg/models/shared/githubtriggeractionrequest.go @@ -4,6 +4,8 @@ package shared // GithubTriggerActionRequest - A request to trigger an action on a GitHub target type GithubTriggerActionRequest struct { + // Force an SDK generation + Force *bool `json:"force,omitempty"` // The generation lock ID GenLockID string `json:"gen_lock_id"` // The GitHub organization name @@ -16,6 +18,13 @@ type GithubTriggerActionRequest struct { TargetName *string `json:"target_name,omitempty"` } +func (o *GithubTriggerActionRequest) GetForce() *bool { + if o == nil { + return nil + } + return o.Force +} + func (o *GithubTriggerActionRequest) GetGenLockID() string { if o == nil { return "" diff --git a/pkg/utils/json.go b/pkg/utils/json.go index 63f4d5aa..48e73ee4 100644 --- a/pkg/utils/json.go +++ b/pkg/utils/json.go @@ -165,11 +165,17 @@ func UnmarshalJSON(b []byte, v interface{}, tag reflect.StructTag, topLevel bool if field.Tag.Get("const") != "" { if r, ok := unmarhsaled[fieldName]; ok { val := string(r) + if strings.HasPrefix(val, `"`) && strings.HasSuffix(val, `"`) { - val = val[1 : len(val)-1] + var err error + val, err = strconv.Unquote(val) + if err != nil { + return fmt.Errorf("failed to unquote const field `%s` value `%s`: %w", fieldName, val, err) + } } - if val != field.Tag.Get("const") { - return fmt.Errorf("const field %s does not match expected value %s", fieldName, field.Tag.Get("const")) + constValue := field.Tag.Get("const") + if val != constValue { + return fmt.Errorf("const field `%s` does not match expected value `%s` got `%s`", fieldName, constValue, val) } delete(unmarhsaled, fieldName) diff --git a/speakeasy.go b/speakeasy.go index e5bf9432..d12b9049 100644 --- a/speakeasy.go +++ b/speakeasy.go @@ -190,9 +190,9 @@ func New(opts ...SDKOption) *Speakeasy { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "0.4.0 .", - SDKVersion: "3.12.4", - GenVersion: "2.392.0", - UserAgent: "speakeasy-sdk/go 3.12.4 2.392.0 0.4.0 . github.com/speakeasy-api/speakeasy-client-sdk-go", + SDKVersion: "3.12.5", + GenVersion: "2.396.0", + UserAgent: "speakeasy-sdk/go 3.12.5 2.396.0 0.4.0 . github.com/speakeasy-api/speakeasy-client-sdk-go", Globals: globals.Globals{}, Hooks: hooks.New(), },