From 6a322d47eb83c067262cf05f6a1fca779212701e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 19:16:14 +0000 Subject: [PATCH] feat(api): properly produce empty request bodies --- .stats.yml | 2 +- account.go | 4 ++-- account_test.go | 8 ++------ editor_test.go | 3 --- environment_test.go | 10 ---------- environmentautomation_test.go | 1 - environmentautomationservice_test.go | 7 ------- environmentautomationtask_test.go | 6 ------ environmentautomationtaskexecution_test.go | 3 --- environmentclass_test.go | 1 - event_test.go | 1 - group_test.go | 1 - identity.go | 4 ++-- identity_test.go | 7 ++----- organization_test.go | 9 --------- organizationinvite_test.go | 3 --- organizationssoconfiguration_test.go | 5 ----- project_test.go | 6 ------ projectpolicy_test.go | 4 ---- runner_test.go | 8 -------- runnerconfiguration_test.go | 1 - runnerconfigurationenvironmentclass_test.go | 4 ---- runnerconfigurationhostauthenticationtoken_test.go | 5 ----- runnerconfigurationschema_test.go | 1 - runnerconfigurationscmintegration_test.go | 5 ----- runnerpolicy_test.go | 4 ---- secret_test.go | 5 ----- user.go | 4 ++-- user_test.go | 6 ++---- userpat_test.go | 3 --- 30 files changed, 13 insertions(+), 118 deletions(-) diff --git a/.stats.yml b/.stats.yml index 54b5007..a152869 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 106 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-63491b1baa3dbc60caaec79becdece3854356b354909e4bb3f1ccaab80a6be20.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-4e2df4ddd41d8f2552c00f0f93c8b655c7bfb039bd62e654dd7ace9cdd8f9a9f.yml diff --git a/account.go b/account.go index 62e8f7f..dab71f3 100644 --- a/account.go +++ b/account.go @@ -179,11 +179,11 @@ func (r accountListLoginProvidersResponseJSON) RawJSON() string { } type AccountGetParams struct { - Body interface{} `json:"body,required"` + Empty param.Field[bool] `json:"empty"` } func (r AccountGetParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) + return apijson.MarshalRoot(r) } type AccountDeleteParams struct { diff --git a/account_test.go b/account_test.go index 18f6ded..34e84cd 100644 --- a/account_test.go +++ b/account_test.go @@ -13,8 +13,7 @@ import ( "github.com/gitpod-io/flex-sdk-go/option" ) -func TestAccountGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") +func TestAccountGetWithOptionalParams(t *testing.T) { baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -27,7 +26,7 @@ func TestAccountGet(t *testing.T) { option.WithBearerToken("My Bearer Token"), ) _, err := client.Accounts.Get(context.TODO(), gitpod.AccountGetParams{ - Body: map[string]interface{}{}, + Empty: gitpod.F(true), }) if err != nil { var apierr *gitpod.Error @@ -39,7 +38,6 @@ func TestAccountGet(t *testing.T) { } func TestAccountDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -64,7 +62,6 @@ func TestAccountDeleteWithOptionalParams(t *testing.T) { } func TestAccountGetSSOLoginURLWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -90,7 +87,6 @@ func TestAccountGetSSOLoginURLWithOptionalParams(t *testing.T) { } func TestAccountListLoginProvidersWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/editor_test.go b/editor_test.go index f382b10..988395e 100644 --- a/editor_test.go +++ b/editor_test.go @@ -14,7 +14,6 @@ import ( ) func TestEditorGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -39,7 +38,6 @@ func TestEditorGetWithOptionalParams(t *testing.T) { } func TestEditorListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +67,6 @@ func TestEditorListWithOptionalParams(t *testing.T) { } func TestEditorResolveURLWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/environment_test.go b/environment_test.go index 458aca6..c5cb5fa 100644 --- a/environment_test.go +++ b/environment_test.go @@ -15,7 +15,6 @@ import ( ) func TestEnvironmentNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -87,7 +86,6 @@ func TestEnvironmentNewWithOptionalParams(t *testing.T) { } func TestEnvironmentGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -112,7 +110,6 @@ func TestEnvironmentGetWithOptionalParams(t *testing.T) { } func TestEnvironmentUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -139,7 +136,6 @@ func TestEnvironmentUpdate(t *testing.T) { } func TestEnvironmentListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -177,7 +173,6 @@ func TestEnvironmentListWithOptionalParams(t *testing.T) { } func TestEnvironmentDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -203,7 +198,6 @@ func TestEnvironmentDeleteWithOptionalParams(t *testing.T) { } func TestEnvironmentNewFromProjectWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -276,7 +270,6 @@ func TestEnvironmentNewFromProjectWithOptionalParams(t *testing.T) { } func TestEnvironmentNewLogsTokenWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -301,7 +294,6 @@ func TestEnvironmentNewLogsTokenWithOptionalParams(t *testing.T) { } func TestEnvironmentMarkActiveWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -330,7 +322,6 @@ func TestEnvironmentMarkActiveWithOptionalParams(t *testing.T) { } func TestEnvironmentStartWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -355,7 +346,6 @@ func TestEnvironmentStartWithOptionalParams(t *testing.T) { } func TestEnvironmentStopWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/environmentautomation_test.go b/environmentautomation_test.go index 6435296..6a56f34 100644 --- a/environmentautomation_test.go +++ b/environmentautomation_test.go @@ -14,7 +14,6 @@ import ( ) func TestEnvironmentAutomationUpsertWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/environmentautomationservice_test.go b/environmentautomationservice_test.go index 19e2d50..82109ec 100644 --- a/environmentautomationservice_test.go +++ b/environmentautomationservice_test.go @@ -15,7 +15,6 @@ import ( ) func TestEnvironmentAutomationServiceNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +68,6 @@ func TestEnvironmentAutomationServiceNewWithOptionalParams(t *testing.T) { } func TestEnvironmentAutomationServiceGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -94,7 +92,6 @@ func TestEnvironmentAutomationServiceGetWithOptionalParams(t *testing.T) { } func TestEnvironmentAutomationServiceUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -130,7 +127,6 @@ func TestEnvironmentAutomationServiceUpdateWithOptionalParams(t *testing.T) { } func TestEnvironmentAutomationServiceListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -165,7 +161,6 @@ func TestEnvironmentAutomationServiceListWithOptionalParams(t *testing.T) { } func TestEnvironmentAutomationServiceDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -191,7 +186,6 @@ func TestEnvironmentAutomationServiceDeleteWithOptionalParams(t *testing.T) { } func TestEnvironmentAutomationServiceStartWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -216,7 +210,6 @@ func TestEnvironmentAutomationServiceStartWithOptionalParams(t *testing.T) { } func TestEnvironmentAutomationServiceStopWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/environmentautomationtask_test.go b/environmentautomationtask_test.go index b59bf85..4324caf 100644 --- a/environmentautomationtask_test.go +++ b/environmentautomationtask_test.go @@ -15,7 +15,6 @@ import ( ) func TestEnvironmentAutomationTaskNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -63,7 +62,6 @@ func TestEnvironmentAutomationTaskNewWithOptionalParams(t *testing.T) { } func TestEnvironmentAutomationTaskGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -88,7 +86,6 @@ func TestEnvironmentAutomationTaskGetWithOptionalParams(t *testing.T) { } func TestEnvironmentAutomationTaskUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -120,7 +117,6 @@ func TestEnvironmentAutomationTaskUpdateWithOptionalParams(t *testing.T) { } func TestEnvironmentAutomationTaskListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -155,7 +151,6 @@ func TestEnvironmentAutomationTaskListWithOptionalParams(t *testing.T) { } func TestEnvironmentAutomationTaskDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -180,7 +175,6 @@ func TestEnvironmentAutomationTaskDeleteWithOptionalParams(t *testing.T) { } func TestEnvironmentAutomationTaskStartWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/environmentautomationtaskexecution_test.go b/environmentautomationtaskexecution_test.go index 737c2c0..72a5408 100644 --- a/environmentautomationtaskexecution_test.go +++ b/environmentautomationtaskexecution_test.go @@ -14,7 +14,6 @@ import ( ) func TestEnvironmentAutomationTaskExecutionGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -39,7 +38,6 @@ func TestEnvironmentAutomationTaskExecutionGetWithOptionalParams(t *testing.T) { } func TestEnvironmentAutomationTaskExecutionListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -75,7 +73,6 @@ func TestEnvironmentAutomationTaskExecutionListWithOptionalParams(t *testing.T) } func TestEnvironmentAutomationTaskExecutionStopWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/environmentclass_test.go b/environmentclass_test.go index 3998b12..0fe2d1d 100644 --- a/environmentclass_test.go +++ b/environmentclass_test.go @@ -14,7 +14,6 @@ import ( ) func TestEnvironmentClassListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/event_test.go b/event_test.go index 0620def..02bfb4a 100644 --- a/event_test.go +++ b/event_test.go @@ -14,7 +14,6 @@ import ( ) func TestEventListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/group_test.go b/group_test.go index 3a6b578..fc84f98 100644 --- a/group_test.go +++ b/group_test.go @@ -14,7 +14,6 @@ import ( ) func TestGroupListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/identity.go b/identity.go index c66e0e4..c19c3c1 100644 --- a/identity.go +++ b/identity.go @@ -179,11 +179,11 @@ func (r IdentityExchangeTokenParams) MarshalJSON() (data []byte, err error) { } type IdentityGetAuthenticatedIdentityParams struct { - Body interface{} `json:"body,required"` + Empty param.Field[bool] `json:"empty"` } func (r IdentityGetAuthenticatedIdentityParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) + return apijson.MarshalRoot(r) } type IdentityGetIDTokenParams struct { diff --git a/identity_test.go b/identity_test.go index 249191c..ef68802 100644 --- a/identity_test.go +++ b/identity_test.go @@ -14,7 +14,6 @@ import ( ) func TestIdentityExchangeTokenWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -38,8 +37,7 @@ func TestIdentityExchangeTokenWithOptionalParams(t *testing.T) { } } -func TestIdentityGetAuthenticatedIdentity(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") +func TestIdentityGetAuthenticatedIdentityWithOptionalParams(t *testing.T) { baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -52,7 +50,7 @@ func TestIdentityGetAuthenticatedIdentity(t *testing.T) { option.WithBearerToken("My Bearer Token"), ) _, err := client.Identity.GetAuthenticatedIdentity(context.TODO(), gitpod.IdentityGetAuthenticatedIdentityParams{ - Body: map[string]interface{}{}, + Empty: gitpod.F(true), }) if err != nil { var apierr *gitpod.Error @@ -64,7 +62,6 @@ func TestIdentityGetAuthenticatedIdentity(t *testing.T) { } func TestIdentityGetIDTokenWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/organization_test.go b/organization_test.go index 4a56c25..20224bb 100644 --- a/organization_test.go +++ b/organization_test.go @@ -14,7 +14,6 @@ import ( ) func TestOrganizationNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -41,7 +40,6 @@ func TestOrganizationNewWithOptionalParams(t *testing.T) { } func TestOrganizationGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -66,7 +64,6 @@ func TestOrganizationGetWithOptionalParams(t *testing.T) { } func TestOrganizationUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -95,7 +92,6 @@ func TestOrganizationUpdateWithOptionalParams(t *testing.T) { } func TestOrganizationListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -126,7 +122,6 @@ func TestOrganizationListWithOptionalParams(t *testing.T) { } func TestOrganizationDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -151,7 +146,6 @@ func TestOrganizationDeleteWithOptionalParams(t *testing.T) { } func TestOrganizationJoin(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -178,7 +172,6 @@ func TestOrganizationJoin(t *testing.T) { } func TestOrganizationLeaveWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -203,7 +196,6 @@ func TestOrganizationLeaveWithOptionalParams(t *testing.T) { } func TestOrganizationListMembersWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -234,7 +226,6 @@ func TestOrganizationListMembersWithOptionalParams(t *testing.T) { } func TestOrganizationSetRoleWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/organizationinvite_test.go b/organizationinvite_test.go index 85caf05..1f26e07 100644 --- a/organizationinvite_test.go +++ b/organizationinvite_test.go @@ -14,7 +14,6 @@ import ( ) func TestOrganizationInviteNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -39,7 +38,6 @@ func TestOrganizationInviteNewWithOptionalParams(t *testing.T) { } func TestOrganizationInviteGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -64,7 +62,6 @@ func TestOrganizationInviteGetWithOptionalParams(t *testing.T) { } func TestOrganizationInviteGetSummaryWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/organizationssoconfiguration_test.go b/organizationssoconfiguration_test.go index ab631d3..3e16d34 100644 --- a/organizationssoconfiguration_test.go +++ b/organizationssoconfiguration_test.go @@ -14,7 +14,6 @@ import ( ) func TestOrganizationSSOConfigurationNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestOrganizationSSOConfigurationNewWithOptionalParams(t *testing.T) { } func TestOrganizationSSOConfigurationGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -68,7 +66,6 @@ func TestOrganizationSSOConfigurationGetWithOptionalParams(t *testing.T) { } func TestOrganizationSSOConfigurationUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -95,7 +92,6 @@ func TestOrganizationSSOConfigurationUpdate(t *testing.T) { } func TestOrganizationSSOConfigurationListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -126,7 +122,6 @@ func TestOrganizationSSOConfigurationListWithOptionalParams(t *testing.T) { } func TestOrganizationSSOConfigurationDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/project_test.go b/project_test.go index 4d5ef17..68a8877 100644 --- a/project_test.go +++ b/project_test.go @@ -14,7 +14,6 @@ import ( ) func TestProjectNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -51,7 +50,6 @@ func TestProjectNewWithOptionalParams(t *testing.T) { } func TestProjectGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -76,7 +74,6 @@ func TestProjectGetWithOptionalParams(t *testing.T) { } func TestProjectUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -103,7 +100,6 @@ func TestProjectUpdateWithOptionalParams(t *testing.T) { } func TestProjectListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -133,7 +129,6 @@ func TestProjectListWithOptionalParams(t *testing.T) { } func TestProjectDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -158,7 +153,6 @@ func TestProjectDeleteWithOptionalParams(t *testing.T) { } func TestProjectNewFromEnvironmentWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/projectpolicy_test.go b/projectpolicy_test.go index 8076f57..25ebda2 100644 --- a/projectpolicy_test.go +++ b/projectpolicy_test.go @@ -14,7 +14,6 @@ import ( ) func TestProjectPolicyNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -41,7 +40,6 @@ func TestProjectPolicyNewWithOptionalParams(t *testing.T) { } func TestProjectPolicyUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -68,7 +66,6 @@ func TestProjectPolicyUpdateWithOptionalParams(t *testing.T) { } func TestProjectPolicyListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -99,7 +96,6 @@ func TestProjectPolicyListWithOptionalParams(t *testing.T) { } func TestProjectPolicyDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/runner_test.go b/runner_test.go index ead6915..9b7832a 100644 --- a/runner_test.go +++ b/runner_test.go @@ -14,7 +14,6 @@ import ( ) func TestRunnerNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestRunnerNewWithOptionalParams(t *testing.T) { } func TestRunnerGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -74,7 +72,6 @@ func TestRunnerGetWithOptionalParams(t *testing.T) { } func TestRunnerUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -101,7 +98,6 @@ func TestRunnerUpdate(t *testing.T) { } func TestRunnerListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -136,7 +132,6 @@ func TestRunnerListWithOptionalParams(t *testing.T) { } func TestRunnerDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -162,7 +157,6 @@ func TestRunnerDeleteWithOptionalParams(t *testing.T) { } func TestRunnerCheckAuthenticationForHostWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -188,7 +182,6 @@ func TestRunnerCheckAuthenticationForHostWithOptionalParams(t *testing.T) { } func TestRunnerNewRunnerTokenWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -213,7 +206,6 @@ func TestRunnerNewRunnerTokenWithOptionalParams(t *testing.T) { } func TestRunnerParseContextURLWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/runnerconfiguration_test.go b/runnerconfiguration_test.go index 5dbb567..033ec4b 100644 --- a/runnerconfiguration_test.go +++ b/runnerconfiguration_test.go @@ -14,7 +14,6 @@ import ( ) func TestRunnerConfigurationValidateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/runnerconfigurationenvironmentclass_test.go b/runnerconfigurationenvironmentclass_test.go index 5a32e84..2870930 100644 --- a/runnerconfigurationenvironmentclass_test.go +++ b/runnerconfigurationenvironmentclass_test.go @@ -14,7 +14,6 @@ import ( ) func TestRunnerConfigurationEnvironmentClassNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestRunnerConfigurationEnvironmentClassNewWithOptionalParams(t *testing.T) } func TestRunnerConfigurationEnvironmentClassGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -70,7 +68,6 @@ func TestRunnerConfigurationEnvironmentClassGetWithOptionalParams(t *testing.T) } func TestRunnerConfigurationEnvironmentClassUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -97,7 +94,6 @@ func TestRunnerConfigurationEnvironmentClassUpdate(t *testing.T) { } func TestRunnerConfigurationEnvironmentClassListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/runnerconfigurationhostauthenticationtoken_test.go b/runnerconfigurationhostauthenticationtoken_test.go index 9731d52..64f0978 100644 --- a/runnerconfigurationhostauthenticationtoken_test.go +++ b/runnerconfigurationhostauthenticationtoken_test.go @@ -15,7 +15,6 @@ import ( ) func TestRunnerConfigurationHostAuthenticationTokenNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestRunnerConfigurationHostAuthenticationTokenNewWithOptionalParams(t *test } func TestRunnerConfigurationHostAuthenticationTokenGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -71,7 +69,6 @@ func TestRunnerConfigurationHostAuthenticationTokenGetWithOptionalParams(t *test } func TestRunnerConfigurationHostAuthenticationTokenUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -98,7 +95,6 @@ func TestRunnerConfigurationHostAuthenticationTokenUpdate(t *testing.T) { } func TestRunnerConfigurationHostAuthenticationTokenListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -131,7 +127,6 @@ func TestRunnerConfigurationHostAuthenticationTokenListWithOptionalParams(t *tes } func TestRunnerConfigurationHostAuthenticationTokenDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/runnerconfigurationschema_test.go b/runnerconfigurationschema_test.go index 2ff86f3..46330a5 100644 --- a/runnerconfigurationschema_test.go +++ b/runnerconfigurationschema_test.go @@ -14,7 +14,6 @@ import ( ) func TestRunnerConfigurationSchemaGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/runnerconfigurationscmintegration_test.go b/runnerconfigurationscmintegration_test.go index ec4cb84..6fba401 100644 --- a/runnerconfigurationscmintegration_test.go +++ b/runnerconfigurationscmintegration_test.go @@ -14,7 +14,6 @@ import ( ) func TestRunnerConfigurationScmIntegrationNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -41,7 +40,6 @@ func TestRunnerConfigurationScmIntegrationNew(t *testing.T) { } func TestRunnerConfigurationScmIntegrationGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -66,7 +64,6 @@ func TestRunnerConfigurationScmIntegrationGetWithOptionalParams(t *testing.T) { } func TestRunnerConfigurationScmIntegrationUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -93,7 +90,6 @@ func TestRunnerConfigurationScmIntegrationUpdate(t *testing.T) { } func TestRunnerConfigurationScmIntegrationListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -126,7 +122,6 @@ func TestRunnerConfigurationScmIntegrationListWithOptionalParams(t *testing.T) { } func TestRunnerConfigurationScmIntegrationDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/runnerpolicy_test.go b/runnerpolicy_test.go index 620073b..9bc10f7 100644 --- a/runnerpolicy_test.go +++ b/runnerpolicy_test.go @@ -14,7 +14,6 @@ import ( ) func TestRunnerPolicyNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -41,7 +40,6 @@ func TestRunnerPolicyNewWithOptionalParams(t *testing.T) { } func TestRunnerPolicyUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -68,7 +66,6 @@ func TestRunnerPolicyUpdateWithOptionalParams(t *testing.T) { } func TestRunnerPolicyListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -99,7 +96,6 @@ func TestRunnerPolicyListWithOptionalParams(t *testing.T) { } func TestRunnerPolicyDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/secret_test.go b/secret_test.go index 091943d..e92d322 100644 --- a/secret_test.go +++ b/secret_test.go @@ -14,7 +14,6 @@ import ( ) func TestSecretNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestSecretNewWithOptionalParams(t *testing.T) { } func TestSecretListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +75,6 @@ func TestSecretListWithOptionalParams(t *testing.T) { } func TestSecretDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -102,7 +99,6 @@ func TestSecretDeleteWithOptionalParams(t *testing.T) { } func TestSecretGetValueWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -127,7 +123,6 @@ func TestSecretGetValueWithOptionalParams(t *testing.T) { } func TestSecretUpdateValueWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/user.go b/user.go index 306a916..325af98 100644 --- a/user.go +++ b/user.go @@ -218,11 +218,11 @@ func (r UserGetAuthenticatedUserResponseUserStatus) IsKnown() bool { type UserSetSuspendedResponse = interface{} type UserGetAuthenticatedUserParams struct { - Body interface{} `json:"body,required"` + Empty param.Field[bool] `json:"empty"` } func (r UserGetAuthenticatedUserParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) + return apijson.MarshalRoot(r) } type UserSetSuspendedParams struct { diff --git a/user_test.go b/user_test.go index b3ce25e..0508c9b 100644 --- a/user_test.go +++ b/user_test.go @@ -13,8 +13,7 @@ import ( "github.com/gitpod-io/flex-sdk-go/option" ) -func TestUserGetAuthenticatedUser(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") +func TestUserGetAuthenticatedUserWithOptionalParams(t *testing.T) { baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -27,7 +26,7 @@ func TestUserGetAuthenticatedUser(t *testing.T) { option.WithBearerToken("My Bearer Token"), ) _, err := client.Users.GetAuthenticatedUser(context.TODO(), gitpod.UserGetAuthenticatedUserParams{ - Body: map[string]interface{}{}, + Empty: gitpod.F(true), }) if err != nil { var apierr *gitpod.Error @@ -39,7 +38,6 @@ func TestUserGetAuthenticatedUser(t *testing.T) { } func TestUserSetSuspendedWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/userpat_test.go b/userpat_test.go index 83bf6b3..1b17314 100644 --- a/userpat_test.go +++ b/userpat_test.go @@ -14,7 +14,6 @@ import ( ) func TestUserPatListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestUserPatListWithOptionalParams(t *testing.T) { } func TestUserPatDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -72,7 +70,6 @@ func TestUserPatDeleteWithOptionalParams(t *testing.T) { } func TestUserPatGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL