Skip to content

Commit 80f6e19

Browse files
feat(api): update with latest API spec (#27)
1 parent e4040d1 commit 80f6e19

8 files changed

+56
-59
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: src/gitpod/resources/editors.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def with_streaming_response(self) -> EditorsResourceWithStreamingResponse:
5050
def retrieve(
5151
self,
5252
*,
53-
id: str | NotGiven = NOT_GIVEN,
53+
id: str,
5454
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5555
# The extra values given here take precedence over values defined on the client or passed to this method.
5656
extra_headers: Headers | None = None,
@@ -132,9 +132,9 @@ def list(
132132
def resolve_url(
133133
self,
134134
*,
135-
editor_id: str | NotGiven = NOT_GIVEN,
136-
environment_id: str | NotGiven = NOT_GIVEN,
137-
organization_id: str | NotGiven = NOT_GIVEN,
135+
editor_id: str,
136+
environment_id: str,
137+
organization_id: str,
138138
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
139139
# The extra values given here take precedence over values defined on the client or passed to this method.
140140
extra_headers: Headers | None = None,
@@ -200,7 +200,7 @@ def with_streaming_response(self) -> AsyncEditorsResourceWithStreamingResponse:
200200
async def retrieve(
201201
self,
202202
*,
203-
id: str | NotGiven = NOT_GIVEN,
203+
id: str,
204204
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
205205
# The extra values given here take precedence over values defined on the client or passed to this method.
206206
extra_headers: Headers | None = None,
@@ -282,9 +282,9 @@ def list(
282282
async def resolve_url(
283283
self,
284284
*,
285-
editor_id: str | NotGiven = NOT_GIVEN,
286-
environment_id: str | NotGiven = NOT_GIVEN,
287-
organization_id: str | NotGiven = NOT_GIVEN,
285+
editor_id: str,
286+
environment_id: str,
287+
organization_id: str,
288288
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
289289
# The extra values given here take precedence over values defined on the client or passed to this method.
290290
extra_headers: Headers | None = None,

Diff for: src/gitpod/types/editor.py

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Optional
43

54
from pydantic import Field as FieldInfo
65

@@ -10,16 +9,16 @@
109

1110

1211
class Editor(BaseModel):
13-
id: Optional[str] = None
12+
id: str
1413

15-
alias: Optional[str] = None
14+
alias: str
1615

17-
icon_url: Optional[str] = FieldInfo(alias="iconUrl", default=None)
16+
icon_url: str = FieldInfo(alias="iconUrl")
1817

19-
installation_instructions: Optional[str] = FieldInfo(alias="installationInstructions", default=None)
18+
installation_instructions: str = FieldInfo(alias="installationInstructions")
2019

21-
name: Optional[str] = None
20+
name: str
2221

23-
short_description: Optional[str] = FieldInfo(alias="shortDescription", default=None)
22+
short_description: str = FieldInfo(alias="shortDescription")
2423

25-
url_template: Optional[str] = FieldInfo(alias="urlTemplate", default=None)
24+
url_template: str = FieldInfo(alias="urlTemplate")

Diff for: src/gitpod/types/editor_resolve_url_params.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Annotated, TypedDict
5+
from typing_extensions import Required, Annotated, TypedDict
66

77
from .._utils import PropertyInfo
88

99
__all__ = ["EditorResolveURLParams"]
1010

1111

1212
class EditorResolveURLParams(TypedDict, total=False):
13-
editor_id: Annotated[str, PropertyInfo(alias="editorId")]
13+
editor_id: Required[Annotated[str, PropertyInfo(alias="editorId")]]
1414
"""editorId is the ID of the editor to resolve the URL for"""
1515

16-
environment_id: Annotated[str, PropertyInfo(alias="environmentId")]
16+
environment_id: Required[Annotated[str, PropertyInfo(alias="environmentId")]]
1717
"""environmentId is the ID of the environment to resolve the URL for"""
1818

19-
organization_id: Annotated[str, PropertyInfo(alias="organizationId")]
19+
organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]]
2020
"""organizationId is the ID of the organization to resolve the URL for"""

Diff for: src/gitpod/types/editor_resolve_url_response.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Optional
43

54
from .._models import BaseModel
65

76
__all__ = ["EditorResolveURLResponse"]
87

98

109
class EditorResolveURLResponse(BaseModel):
11-
url: Optional[str] = None
10+
url: str
1211
"""url is the resolved editor URL"""

Diff for: src/gitpod/types/editor_retrieve_params.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import TypedDict
5+
from typing_extensions import Required, TypedDict
66

77
__all__ = ["EditorRetrieveParams"]
88

99

1010
class EditorRetrieveParams(TypedDict, total=False):
11-
id: str
11+
id: Required[str]
1212
"""id is the ID of the editor to get"""

Diff for: src/gitpod/types/editor_retrieve_response.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Optional
43

54
from .editor import Editor
65
from .._models import BaseModel
@@ -9,5 +8,5 @@
98

109

1110
class EditorRetrieveResponse(BaseModel):
12-
editor: Optional[Editor] = None
11+
editor: Editor
1312
"""editor contains the editor"""

Diff for: tests/api_resources/test_editors.py

+32-32
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ class TestEditors:
2525
@pytest.mark.skip()
2626
@parametrize
2727
def test_method_retrieve(self, client: Gitpod) -> None:
28-
editor = client.editors.retrieve()
29-
assert_matches_type(EditorRetrieveResponse, editor, path=["response"])
30-
31-
@pytest.mark.skip()
32-
@parametrize
33-
def test_method_retrieve_with_all_params(self, client: Gitpod) -> None:
3428
editor = client.editors.retrieve(
3529
id="id",
3630
)
@@ -39,7 +33,9 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None:
3933
@pytest.mark.skip()
4034
@parametrize
4135
def test_raw_response_retrieve(self, client: Gitpod) -> None:
42-
response = client.editors.with_raw_response.retrieve()
36+
response = client.editors.with_raw_response.retrieve(
37+
id="id",
38+
)
4339

4440
assert response.is_closed is True
4541
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -49,7 +45,9 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None:
4945
@pytest.mark.skip()
5046
@parametrize
5147
def test_streaming_response_retrieve(self, client: Gitpod) -> None:
52-
with client.editors.with_streaming_response.retrieve() as response:
48+
with client.editors.with_streaming_response.retrieve(
49+
id="id",
50+
) as response:
5351
assert not response.is_closed
5452
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
5553

@@ -102,12 +100,6 @@ def test_streaming_response_list(self, client: Gitpod) -> None:
102100
@pytest.mark.skip()
103101
@parametrize
104102
def test_method_resolve_url(self, client: Gitpod) -> None:
105-
editor = client.editors.resolve_url()
106-
assert_matches_type(EditorResolveURLResponse, editor, path=["response"])
107-
108-
@pytest.mark.skip()
109-
@parametrize
110-
def test_method_resolve_url_with_all_params(self, client: Gitpod) -> None:
111103
editor = client.editors.resolve_url(
112104
editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
113105
environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
@@ -118,7 +110,11 @@ def test_method_resolve_url_with_all_params(self, client: Gitpod) -> None:
118110
@pytest.mark.skip()
119111
@parametrize
120112
def test_raw_response_resolve_url(self, client: Gitpod) -> None:
121-
response = client.editors.with_raw_response.resolve_url()
113+
response = client.editors.with_raw_response.resolve_url(
114+
editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
115+
environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
116+
organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
117+
)
122118

123119
assert response.is_closed is True
124120
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -128,7 +124,11 @@ def test_raw_response_resolve_url(self, client: Gitpod) -> None:
128124
@pytest.mark.skip()
129125
@parametrize
130126
def test_streaming_response_resolve_url(self, client: Gitpod) -> None:
131-
with client.editors.with_streaming_response.resolve_url() as response:
127+
with client.editors.with_streaming_response.resolve_url(
128+
editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
129+
environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
130+
organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
131+
) as response:
132132
assert not response.is_closed
133133
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
134134

@@ -144,12 +144,6 @@ class TestAsyncEditors:
144144
@pytest.mark.skip()
145145
@parametrize
146146
async def test_method_retrieve(self, async_client: AsyncGitpod) -> None:
147-
editor = await async_client.editors.retrieve()
148-
assert_matches_type(EditorRetrieveResponse, editor, path=["response"])
149-
150-
@pytest.mark.skip()
151-
@parametrize
152-
async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None:
153147
editor = await async_client.editors.retrieve(
154148
id="id",
155149
)
@@ -158,7 +152,9 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod)
158152
@pytest.mark.skip()
159153
@parametrize
160154
async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None:
161-
response = await async_client.editors.with_raw_response.retrieve()
155+
response = await async_client.editors.with_raw_response.retrieve(
156+
id="id",
157+
)
162158

163159
assert response.is_closed is True
164160
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -168,7 +164,9 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None:
168164
@pytest.mark.skip()
169165
@parametrize
170166
async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None:
171-
async with async_client.editors.with_streaming_response.retrieve() as response:
167+
async with async_client.editors.with_streaming_response.retrieve(
168+
id="id",
169+
) as response:
172170
assert not response.is_closed
173171
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
174172

@@ -221,12 +219,6 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None:
221219
@pytest.mark.skip()
222220
@parametrize
223221
async def test_method_resolve_url(self, async_client: AsyncGitpod) -> None:
224-
editor = await async_client.editors.resolve_url()
225-
assert_matches_type(EditorResolveURLResponse, editor, path=["response"])
226-
227-
@pytest.mark.skip()
228-
@parametrize
229-
async def test_method_resolve_url_with_all_params(self, async_client: AsyncGitpod) -> None:
230222
editor = await async_client.editors.resolve_url(
231223
editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
232224
environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
@@ -237,7 +229,11 @@ async def test_method_resolve_url_with_all_params(self, async_client: AsyncGitpo
237229
@pytest.mark.skip()
238230
@parametrize
239231
async def test_raw_response_resolve_url(self, async_client: AsyncGitpod) -> None:
240-
response = await async_client.editors.with_raw_response.resolve_url()
232+
response = await async_client.editors.with_raw_response.resolve_url(
233+
editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
234+
environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
235+
organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
236+
)
241237

242238
assert response.is_closed is True
243239
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -247,7 +243,11 @@ async def test_raw_response_resolve_url(self, async_client: AsyncGitpod) -> None
247243
@pytest.mark.skip()
248244
@parametrize
249245
async def test_streaming_response_resolve_url(self, async_client: AsyncGitpod) -> None:
250-
async with async_client.editors.with_streaming_response.resolve_url() as response:
246+
async with async_client.editors.with_streaming_response.resolve_url(
247+
editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
248+
environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
249+
organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
250+
) as response:
251251
assert not response.is_closed
252252
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
253253

0 commit comments

Comments
 (0)