Skip to content

feat(api): update with latest API spec #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-36f9d46890bf3667f5a6529bdb156fe1560834ad8187c4271aa0b0024de1adb5.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-a058dd6f8c83b32adb6f30bae2db8295468b8ffc391342a960ec6f393c50b83e.yml
16 changes: 8 additions & 8 deletions src/gitpod/resources/editors.py
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ def with_streaming_response(self) -> EditorsResourceWithStreamingResponse:
def retrieve(
self,
*,
id: str | NotGiven = NOT_GIVEN,
id: str,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -132,9 +132,9 @@ def list(
def resolve_url(
self,
*,
editor_id: str | NotGiven = NOT_GIVEN,
environment_id: str | NotGiven = NOT_GIVEN,
organization_id: str | NotGiven = NOT_GIVEN,
editor_id: str,
environment_id: str,
organization_id: str,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -200,7 +200,7 @@ def with_streaming_response(self) -> AsyncEditorsResourceWithStreamingResponse:
async def retrieve(
self,
*,
id: str | NotGiven = NOT_GIVEN,
id: str,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -282,9 +282,9 @@ def list(
async def resolve_url(
self,
*,
editor_id: str | NotGiven = NOT_GIVEN,
environment_id: str | NotGiven = NOT_GIVEN,
organization_id: str | NotGiven = NOT_GIVEN,
editor_id: str,
environment_id: str,
organization_id: str,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
15 changes: 7 additions & 8 deletions src/gitpod/types/editor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional

from pydantic import Field as FieldInfo

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


class Editor(BaseModel):
id: Optional[str] = None
id: str

alias: Optional[str] = None
alias: str

icon_url: Optional[str] = FieldInfo(alias="iconUrl", default=None)
icon_url: str = FieldInfo(alias="iconUrl")

installation_instructions: Optional[str] = FieldInfo(alias="installationInstructions", default=None)
installation_instructions: str = FieldInfo(alias="installationInstructions")

name: Optional[str] = None
name: str

short_description: Optional[str] = FieldInfo(alias="shortDescription", default=None)
short_description: str = FieldInfo(alias="shortDescription")

url_template: Optional[str] = FieldInfo(alias="urlTemplate", default=None)
url_template: str = FieldInfo(alias="urlTemplate")
8 changes: 4 additions & 4 deletions src/gitpod/types/editor_resolve_url_params.py
Original file line number Diff line number Diff line change
@@ -2,19 +2,19 @@

from __future__ import annotations

from typing_extensions import Annotated, TypedDict
from typing_extensions import Required, Annotated, TypedDict

from .._utils import PropertyInfo

__all__ = ["EditorResolveURLParams"]


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

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

organization_id: Annotated[str, PropertyInfo(alias="organizationId")]
organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]]
"""organizationId is the ID of the organization to resolve the URL for"""
3 changes: 1 addition & 2 deletions src/gitpod/types/editor_resolve_url_response.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional

from .._models import BaseModel

__all__ = ["EditorResolveURLResponse"]


class EditorResolveURLResponse(BaseModel):
url: Optional[str] = None
url: str
"""url is the resolved editor URL"""
4 changes: 2 additions & 2 deletions src/gitpod/types/editor_retrieve_params.py
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@

from __future__ import annotations

from typing_extensions import TypedDict
from typing_extensions import Required, TypedDict

__all__ = ["EditorRetrieveParams"]


class EditorRetrieveParams(TypedDict, total=False):
id: str
id: Required[str]
"""id is the ID of the editor to get"""
3 changes: 1 addition & 2 deletions src/gitpod/types/editor_retrieve_response.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional

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


class EditorRetrieveResponse(BaseModel):
editor: Optional[Editor] = None
editor: Editor
"""editor contains the editor"""
64 changes: 32 additions & 32 deletions tests/api_resources/test_editors.py
Original file line number Diff line number Diff line change
@@ -25,12 +25,6 @@ class TestEditors:
@pytest.mark.skip()
@parametrize
def test_method_retrieve(self, client: Gitpod) -> None:
editor = client.editors.retrieve()
assert_matches_type(EditorRetrieveResponse, editor, path=["response"])

@pytest.mark.skip()
@parametrize
def test_method_retrieve_with_all_params(self, client: Gitpod) -> None:
editor = client.editors.retrieve(
id="id",
)
@@ -39,7 +33,9 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_retrieve(self, client: Gitpod) -> None:
response = client.editors.with_raw_response.retrieve()
response = client.editors.with_raw_response.retrieve(
id="id",
)

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

@@ -102,12 +100,6 @@ def test_streaming_response_list(self, client: Gitpod) -> None:
@pytest.mark.skip()
@parametrize
def test_method_resolve_url(self, client: Gitpod) -> None:
editor = client.editors.resolve_url()
assert_matches_type(EditorResolveURLResponse, editor, path=["response"])

@pytest.mark.skip()
@parametrize
def test_method_resolve_url_with_all_params(self, client: Gitpod) -> None:
editor = client.editors.resolve_url(
editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
@@ -118,7 +110,11 @@ def test_method_resolve_url_with_all_params(self, client: Gitpod) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_resolve_url(self, client: Gitpod) -> None:
response = client.editors.with_raw_response.resolve_url()
response = client.editors.with_raw_response.resolve_url(
editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)

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

@@ -144,12 +144,6 @@ class TestAsyncEditors:
@pytest.mark.skip()
@parametrize
async def test_method_retrieve(self, async_client: AsyncGitpod) -> None:
editor = await async_client.editors.retrieve()
assert_matches_type(EditorRetrieveResponse, editor, path=["response"])

@pytest.mark.skip()
@parametrize
async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None:
editor = await async_client.editors.retrieve(
id="id",
)
@@ -158,7 +152,9 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod)
@pytest.mark.skip()
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None:
response = await async_client.editors.with_raw_response.retrieve()
response = await async_client.editors.with_raw_response.retrieve(
id="id",
)

assert response.is_closed is True
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:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None:
async with async_client.editors.with_streaming_response.retrieve() as response:
async with async_client.editors.with_streaming_response.retrieve(
id="id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

@@ -221,12 +219,6 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_resolve_url(self, async_client: AsyncGitpod) -> None:
editor = await async_client.editors.resolve_url()
assert_matches_type(EditorResolveURLResponse, editor, path=["response"])

@pytest.mark.skip()
@parametrize
async def test_method_resolve_url_with_all_params(self, async_client: AsyncGitpod) -> None:
editor = await async_client.editors.resolve_url(
editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
@@ -237,7 +229,11 @@ async def test_method_resolve_url_with_all_params(self, async_client: AsyncGitpo
@pytest.mark.skip()
@parametrize
async def test_raw_response_resolve_url(self, async_client: AsyncGitpod) -> None:
response = await async_client.editors.with_raw_response.resolve_url()
response = await async_client.editors.with_raw_response.resolve_url(
editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)

assert response.is_closed is True
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
@pytest.mark.skip()
@parametrize
async def test_streaming_response_resolve_url(self, async_client: AsyncGitpod) -> None:
async with async_client.editors.with_streaming_response.resolve_url() as response:
async with async_client.editors.with_streaming_response.resolve_url(
editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"