Skip to content

Commit 7232ba6

Browse files
feat(api): update with latest API spec (#24)
1 parent 33e7aed commit 7232ba6

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

Diff for: .stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-36f9d46890bf3667f5a6529bdb156fe1560834ad8187c4271aa0b0024de1adb5.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-a058dd6f8c83b32adb6f30bae2db8295468b8ffc391342a960ec6f393c50b83e.yml

Diff for: editor.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ func (r *EditorService) ResolveURL(ctx context.Context, body EditorResolveURLPar
7474
}
7575

7676
type Editor struct {
77-
ID string `json:"id"`
78-
Alias string `json:"alias"`
79-
IconURL string `json:"iconUrl"`
80-
InstallationInstructions string `json:"installationInstructions"`
81-
Name string `json:"name"`
82-
ShortDescription string `json:"shortDescription"`
83-
URLTemplate string `json:"urlTemplate"`
77+
ID string `json:"id,required"`
78+
Alias string `json:"alias,required"`
79+
IconURL string `json:"iconUrl,required"`
80+
InstallationInstructions string `json:"installationInstructions,required"`
81+
Name string `json:"name,required"`
82+
ShortDescription string `json:"shortDescription,required"`
83+
URLTemplate string `json:"urlTemplate,required"`
8484
JSON editorJSON `json:"-"`
8585
}
8686

@@ -107,7 +107,7 @@ func (r editorJSON) RawJSON() string {
107107

108108
type EditorGetResponse struct {
109109
// editor contains the editor
110-
Editor Editor `json:"editor"`
110+
Editor Editor `json:"editor,required"`
111111
JSON editorGetResponseJSON `json:"-"`
112112
}
113113

@@ -129,7 +129,7 @@ func (r editorGetResponseJSON) RawJSON() string {
129129

130130
type EditorResolveURLResponse struct {
131131
// url is the resolved editor URL
132-
URL string `json:"url"`
132+
URL string `json:"url,required"`
133133
JSON editorResolveURLResponseJSON `json:"-"`
134134
}
135135

@@ -151,7 +151,7 @@ func (r editorResolveURLResponseJSON) RawJSON() string {
151151

152152
type EditorGetParams struct {
153153
// id is the ID of the editor to get
154-
ID param.Field[string] `json:"id"`
154+
ID param.Field[string] `json:"id,required"`
155155
}
156156

157157
func (r EditorGetParams) MarshalJSON() (data []byte, err error) {
@@ -193,11 +193,11 @@ func (r EditorListParamsPagination) MarshalJSON() (data []byte, err error) {
193193

194194
type EditorResolveURLParams struct {
195195
// editorId is the ID of the editor to resolve the URL for
196-
EditorID param.Field[string] `json:"editorId" format:"uuid"`
196+
EditorID param.Field[string] `json:"editorId,required" format:"uuid"`
197197
// environmentId is the ID of the environment to resolve the URL for
198-
EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"`
198+
EnvironmentID param.Field[string] `json:"environmentId,required" format:"uuid"`
199199
// organizationId is the ID of the organization to resolve the URL for
200-
OrganizationID param.Field[string] `json:"organizationId" format:"uuid"`
200+
OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
201201
}
202202

203203
func (r EditorResolveURLParams) MarshalJSON() (data []byte, err error) {

Diff for: editor_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/gitpod-io/gitpod-sdk-go/option"
1414
)
1515

16-
func TestEditorGetWithOptionalParams(t *testing.T) {
16+
func TestEditorGet(t *testing.T) {
1717
t.Skip("skipped: tests are disabled for the time being")
1818
baseURL := "http://localhost:4010"
1919
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
@@ -68,7 +68,7 @@ func TestEditorListWithOptionalParams(t *testing.T) {
6868
}
6969
}
7070

71-
func TestEditorResolveURLWithOptionalParams(t *testing.T) {
71+
func TestEditorResolveURL(t *testing.T) {
7272
t.Skip("skipped: tests are disabled for the time being")
7373
baseURL := "http://localhost:4010"
7474
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {

0 commit comments

Comments
 (0)