From a467cce81af45aa31c3333e5b76d603cae853456 Mon Sep 17 00:00:00 2001 From: scalarbot Date: Fri, 14 Aug 2026 02:14:07 +0000 Subject: [PATCH 01/11] chore(api): regenerate SDK - Regenerated with generator `0.24.0` (previously `0.22.10`). Build: iDlbFoTWAqW0wjmWsFSDX --- .../skills/scalar-galaxy-python-sdk/SKILL.md | 2 +- .github/workflows/sdk-ci.yml | 5 +++ SKILL.md | 2 +- api.md | 32 +++++++++---------- pyproject.toml | 8 ++--- release-please-config.json | 2 +- scalar-sdk.manifest.json | 2 +- src/{ => scalar_galaxy}/__init__.py | 0 src/{ => scalar_galaxy}/_base_client.py | 14 +++++--- src/{ => scalar_galaxy}/_client.py | 16 ++++++---- src/{ => scalar_galaxy}/_compat.py | 0 src/{ => scalar_galaxy}/_constants.py | 0 src/{ => scalar_galaxy}/_event_handler.py | 0 src/{ => scalar_galaxy}/_exceptions.py | 0 src/{ => scalar_galaxy}/_files.py | 0 src/{ => scalar_galaxy}/_models.py | 0 src/{ => scalar_galaxy}/_qs.py | 0 src/{ => scalar_galaxy}/_resource.py | 0 src/{ => scalar_galaxy}/_response.py | 0 src/{ => scalar_galaxy}/_send_queue.py | 0 src/{ => scalar_galaxy}/_streaming.py | 0 src/{ => scalar_galaxy}/_types.py | 0 src/{ => scalar_galaxy}/_utils/__init__.py | 0 src/{ => scalar_galaxy}/_utils/_compat.py | 0 .../_utils/_datetime_parse.py | 0 src/{ => scalar_galaxy}/_utils/_json.py | 0 src/{ => scalar_galaxy}/_utils/_logs.py | 0 src/{ => scalar_galaxy}/_utils/_path.py | 0 src/{ => scalar_galaxy}/_utils/_proxy.py | 0 src/{ => scalar_galaxy}/_utils/_reflection.py | 0 .../_utils/_resources_proxy.py | 0 src/{ => scalar_galaxy}/_utils/_streams.py | 0 src/{ => scalar_galaxy}/_utils/_sync.py | 0 src/{ => scalar_galaxy}/_utils/_transform.py | 0 src/{ => scalar_galaxy}/_utils/_typing.py | 0 src/{ => scalar_galaxy}/_utils/_utils.py | 0 src/{ => scalar_galaxy}/_version.py | 0 src/{ => scalar_galaxy}/py.typed | 0 src/{ => scalar_galaxy}/resources/__init__.py | 0 .../resources/authentication.py | 0 .../resources/celestial_bodies.py | 0 src/{ => scalar_galaxy}/resources/planets.py | 0 src/{ => scalar_galaxy}/resources/webhooks.py | 0 src/{ => scalar_galaxy}/types/__init__.py | 0 .../authentication_create_token_params.py | 0 .../authentication_create_token_response.py | 0 .../authentication_create_user_params.py | 0 .../types/celestial_body.py | 0 .../types/celestial_body_create_params.py | 6 ++++ .../types/celestial_body_create_response.py | 0 .../types/new_planet_webhook_event.py | 0 .../types/parsed_webhook_event.py | 0 src/{ => scalar_galaxy}/types/planet.py | 0 .../types/planet_create_params.py | 2 ++ .../types/planet_list_all_data_params.py | 0 .../types/planet_list_all_data_response.py | 0 src/{ => scalar_galaxy}/types/planet_param.py | 0 .../types/planet_update_params.py | 2 ++ .../types/planet_upload_image_params.py | 0 .../types/planet_upload_image_response.py | 0 src/{ => scalar_galaxy}/types/user.py | 0 src/{ => scalar_galaxy}/types/user_param.py | 0 62 files changed, 59 insertions(+), 34 deletions(-) rename src/{ => scalar_galaxy}/__init__.py (100%) rename src/{ => scalar_galaxy}/_base_client.py (99%) rename src/{ => scalar_galaxy}/_client.py (97%) rename src/{ => scalar_galaxy}/_compat.py (100%) rename src/{ => scalar_galaxy}/_constants.py (100%) rename src/{ => scalar_galaxy}/_event_handler.py (100%) rename src/{ => scalar_galaxy}/_exceptions.py (100%) rename src/{ => scalar_galaxy}/_files.py (100%) rename src/{ => scalar_galaxy}/_models.py (100%) rename src/{ => scalar_galaxy}/_qs.py (100%) rename src/{ => scalar_galaxy}/_resource.py (100%) rename src/{ => scalar_galaxy}/_response.py (100%) rename src/{ => scalar_galaxy}/_send_queue.py (100%) rename src/{ => scalar_galaxy}/_streaming.py (100%) rename src/{ => scalar_galaxy}/_types.py (100%) rename src/{ => scalar_galaxy}/_utils/__init__.py (100%) rename src/{ => scalar_galaxy}/_utils/_compat.py (100%) rename src/{ => scalar_galaxy}/_utils/_datetime_parse.py (100%) rename src/{ => scalar_galaxy}/_utils/_json.py (100%) rename src/{ => scalar_galaxy}/_utils/_logs.py (100%) rename src/{ => scalar_galaxy}/_utils/_path.py (100%) rename src/{ => scalar_galaxy}/_utils/_proxy.py (100%) rename src/{ => scalar_galaxy}/_utils/_reflection.py (100%) rename src/{ => scalar_galaxy}/_utils/_resources_proxy.py (100%) rename src/{ => scalar_galaxy}/_utils/_streams.py (100%) rename src/{ => scalar_galaxy}/_utils/_sync.py (100%) rename src/{ => scalar_galaxy}/_utils/_transform.py (100%) rename src/{ => scalar_galaxy}/_utils/_typing.py (100%) rename src/{ => scalar_galaxy}/_utils/_utils.py (100%) rename src/{ => scalar_galaxy}/_version.py (100%) rename src/{ => scalar_galaxy}/py.typed (100%) rename src/{ => scalar_galaxy}/resources/__init__.py (100%) rename src/{ => scalar_galaxy}/resources/authentication.py (100%) rename src/{ => scalar_galaxy}/resources/celestial_bodies.py (100%) rename src/{ => scalar_galaxy}/resources/planets.py (100%) rename src/{ => scalar_galaxy}/resources/webhooks.py (100%) rename src/{ => scalar_galaxy}/types/__init__.py (100%) rename src/{ => scalar_galaxy}/types/authentication_create_token_params.py (100%) rename src/{ => scalar_galaxy}/types/authentication_create_token_response.py (100%) rename src/{ => scalar_galaxy}/types/authentication_create_user_params.py (100%) rename src/{ => scalar_galaxy}/types/celestial_body.py (100%) rename src/{ => scalar_galaxy}/types/celestial_body_create_params.py (95%) rename src/{ => scalar_galaxy}/types/celestial_body_create_response.py (100%) rename src/{ => scalar_galaxy}/types/new_planet_webhook_event.py (100%) rename src/{ => scalar_galaxy}/types/parsed_webhook_event.py (100%) rename src/{ => scalar_galaxy}/types/planet.py (100%) rename src/{ => scalar_galaxy}/types/planet_create_params.py (98%) rename src/{ => scalar_galaxy}/types/planet_list_all_data_params.py (100%) rename src/{ => scalar_galaxy}/types/planet_list_all_data_response.py (100%) rename src/{ => scalar_galaxy}/types/planet_param.py (100%) rename src/{ => scalar_galaxy}/types/planet_update_params.py (98%) rename src/{ => scalar_galaxy}/types/planet_upload_image_params.py (100%) rename src/{ => scalar_galaxy}/types/planet_upload_image_response.py (100%) rename src/{ => scalar_galaxy}/types/user.py (100%) rename src/{ => scalar_galaxy}/types/user_param.py (100%) diff --git a/.claude/skills/scalar-galaxy-python-sdk/SKILL.md b/.claude/skills/scalar-galaxy-python-sdk/SKILL.md index 713a6ad..afb0617 100644 --- a/.claude/skills/scalar-galaxy-python-sdk/SKILL.md +++ b/.claude/skills/scalar-galaxy-python-sdk/SKILL.md @@ -79,5 +79,5 @@ except APIStatusError as err: ## Reference files -- [README.md](../../../README.md) — full feature tour: client options, request options, retries and timeouts, logging. +- [README.md](../../../README.md) — full feature tour: client options, retries and timeouts, logging. - [api.md](../../../api.md) — complete catalogue of every operation with request and response types. diff --git a/.github/workflows/sdk-ci.yml b/.github/workflows/sdk-ci.yml index 0594850..52fc8dd 100644 --- a/.github/workflows/sdk-ci.yml +++ b/.github/workflows/sdk-ci.yml @@ -14,3 +14,8 @@ jobs: python-version: "3.11" - run: python -m pip install --upgrade build - run: python -m build + # Verification only, never auto-fix: the SDK is generated formatted, so a diff here means + # either hand-edited custom code or a regenerate that was not committed. ruff is pinned to + # the release that produced these bytes, since a formatter minor can change them. + - run: python -m pip install "ruff==0.16.1" + - run: ruff format --check . diff --git a/SKILL.md b/SKILL.md index 9fd040e..620d427 100644 --- a/SKILL.md +++ b/SKILL.md @@ -79,5 +79,5 @@ except APIStatusError as err: ## Reference files -- [README.md](./README.md) — full feature tour: client options, request options, retries and timeouts, logging. +- [README.md](./README.md) — full feature tour: client options, retries and timeouts, logging. - [api.md](./api.md) — complete catalogue of every operation with request and response types. diff --git a/api.md b/api.md index 679a2be..e161c40 100644 --- a/api.md +++ b/api.md @@ -38,8 +38,8 @@ It's easy to say you know them all, but do you really? Retrieve all the planets | Direction | Type | | --- | --- | -| Request | [`PlanetListAllDataParams`](./src/types/planet_list_all_data_params.py) | -| Response | [`PlanetListAllDataResponse`](./src/types/planet_list_all_data_response.py) | +| Request | [`PlanetListAllDataParams`](./src/scalar_galaxy/types/planet_list_all_data_params.py) | +| Response | [`PlanetListAllDataResponse`](./src/scalar_galaxy/types/planet_list_all_data_response.py) | ```python planet = client.planets.list_all_data( @@ -54,8 +54,8 @@ Time to play god and create a new planet. What do you think? Ah, don't think too | Direction | Type | | --- | --- | -| Request | [`PlanetCreateParams`](./src/types/planet_create_params.py) | -| Response | [`Planet`](./src/types/planet.py) | +| Request | [`PlanetCreateParams`](./src/scalar_galaxy/types/planet_create_params.py) | +| Response | [`Planet`](./src/scalar_galaxy/types/planet.py) | ```python planet = client.planets.create( @@ -69,7 +69,7 @@ You'll better learn a little bit more about the planets. It might come in handy | Direction | Type | | --- | --- | -| Response | [`Planet`](./src/types/planet.py) | +| Response | [`Planet`](./src/scalar_galaxy/types/planet.py) | ```python planet = client.planets.retrieve( @@ -83,8 +83,8 @@ Sometimes you make mistakes, that's fine. No worries, you can update all planets | Direction | Type | | --- | --- | -| Request | [`PlanetUpdateParams`](./src/types/planet_update_params.py) | -| Response | [`Planet`](./src/types/planet.py) | +| Request | [`PlanetUpdateParams`](./src/scalar_galaxy/types/planet_update_params.py) | +| Response | [`Planet`](./src/scalar_galaxy/types/planet.py) | ```python planet = client.planets.update( @@ -109,8 +109,8 @@ Got a crazy good photo of a planet? Share it with the world! | Direction | Type | | --- | --- | -| Request | [`PlanetUploadImageParams`](./src/types/planet_upload_image_params.py) | -| Response | [`PlanetUploadImageResponse`](./src/types/planet_upload_image_response.py) | +| Request | [`PlanetUploadImageParams`](./src/scalar_galaxy/types/planet_upload_image_params.py) | +| Response | [`PlanetUploadImageResponse`](./src/scalar_galaxy/types/planet_upload_image_response.py) | ```python planet = client.planets.upload_image( @@ -126,8 +126,8 @@ Stars, moons, comets, the occasional rogue asteroid — if it glows or drifts th | Direction | Type | | --- | --- | -| Request | [`CelestialBodyCreateParams`](./src/types/celestial_body_create_params.py) | -| Response | [`CelestialBodyCreateResponse`](./src/types/celestial_body_create_response.py) | +| Request | [`CelestialBodyCreateParams`](./src/scalar_galaxy/types/celestial_body_create_params.py) | +| Response | [`CelestialBodyCreateResponse`](./src/scalar_galaxy/types/celestial_body_create_response.py) | ```python celestial_body = client.celestial_bodies.create( @@ -143,8 +143,8 @@ Time to create a user account, eh? | Direction | Type | | --- | --- | -| Request | [`AuthenticationCreateUserParams`](./src/types/authentication_create_user_params.py) | -| Response | [`User`](./src/types/user.py) | +| Request | [`AuthenticationCreateUserParams`](./src/scalar_galaxy/types/authentication_create_user_params.py) | +| Response | [`User`](./src/scalar_galaxy/types/user.py) | ```python authentication = client.authentication.create_user( @@ -160,8 +160,8 @@ Yeah, this is the boring security stuff. Just get your super secret token and mo | Direction | Type | | --- | --- | -| Request | [`AuthenticationCreateTokenParams`](./src/types/authentication_create_token_params.py) | -| Response | [`AuthenticationCreateTokenResponse`](./src/types/authentication_create_token_response.py) | +| Request | [`AuthenticationCreateTokenParams`](./src/scalar_galaxy/types/authentication_create_token_params.py) | +| Response | [`AuthenticationCreateTokenResponse`](./src/scalar_galaxy/types/authentication_create_token_response.py) | ```python authentication = client.authentication.create_token( @@ -176,7 +176,7 @@ Find yourself they say. That's what you can do here. | Direction | Type | | --- | --- | -| Response | [`User`](./src/types/user.py) | +| Response | [`User`](./src/scalar_galaxy/types/user.py) | ```python authentication = client.authentication.list_me() diff --git a/pyproject.toml b/pyproject.toml index 57f2d64..0802db8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,9 @@ version = "0.1.0" # x-release-please-version description = "The Scalar Galaxy is an example OpenAPI document to test OpenAPI tools and libraries. It's a fictional universe with fictional planets and fictional data." readme = "README.md" license = "Apache-2.0" +authors = [ + { name = "Scalar Galaxy" }, +] requires-python = ">= 3.9" dependencies = [ "httpx>=0.23.0, <1", @@ -23,10 +26,7 @@ requires = ["hatchling>=1.18.0"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] -packages = ["src"] - -[tool.hatch.build.targets.wheel.sources] -"src" = "scalar_galaxy" +packages = ["src/scalar_galaxy"] [tool.ruff] line-length = 120 diff --git a/release-please-config.json b/release-please-config.json index edac523..3284fa0 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -3,7 +3,7 @@ ".": { "release-type": "python", "extra-files": [ - "src/_version.py" + "src/scalar_galaxy/_version.py" ] } }, diff --git a/scalar-sdk.manifest.json b/scalar-sdk.manifest.json index d1fee71..f735f5c 100644 --- a/scalar-sdk.manifest.json +++ b/scalar-sdk.manifest.json @@ -1,7 +1,7 @@ { "name": "ScalarGalaxy", "slug": "scalarGalaxy", - "generatorVersion": "0.22.10", + "generatorVersion": "0.24.0", "servers": [ "https://galaxy.scalar.com", "{protocol}://void.scalar.com/{path}" diff --git a/src/__init__.py b/src/scalar_galaxy/__init__.py similarity index 100% rename from src/__init__.py rename to src/scalar_galaxy/__init__.py diff --git a/src/_base_client.py b/src/scalar_galaxy/_base_client.py similarity index 99% rename from src/_base_client.py rename to src/scalar_galaxy/_base_client.py index 08cf321..d4340b7 100644 --- a/src/_base_client.py +++ b/src/scalar_galaxy/_base_client.py @@ -18,6 +18,7 @@ TYPE_CHECKING, Any, Dict, + List, Type, Union, Generic, @@ -494,7 +495,11 @@ def _custom_auth( self, security: SecurityOptions, # noqa: ARG002 ) -> httpx.Auth | None: - return None + # Single hook for custom httpx auth on both the sync and async request paths. It defaults to + # the legacy public `custom_auth` property so subclasses that already override that property + # keep applying identically on both paths; override `_custom_auth` itself to layer + # per-operation, security-aware auth on top. + return self.custom_auth def _build_headers( self, @@ -505,7 +510,7 @@ def _build_headers( retries_taken: int = 0, ) -> httpx.Headers: custom_headers = options.headers or {} - # Auth headers are folded into `default_headers` (matching Stainless), so + # Auth headers are folded into `default_headers` (matching the reference SDKs), so # merging `default_headers` here already applies the configured credentials. headers_dict = _merge_mappings(self.default_headers, custom_headers) self._validate_headers(headers_dict, custom_headers, params, cookies) @@ -1668,8 +1673,9 @@ async def request( await self._prepare_request(request) kwargs: HttpxSendArgs = {} - if self.custom_auth is not None: - kwargs["auth"] = self.custom_auth + custom_auth = self._custom_auth(options.security) + if custom_auth is not None: + kwargs["auth"] = custom_auth if options.follow_redirects is not None: kwargs["follow_redirects"] = options.follow_redirects diff --git a/src/_client.py b/src/scalar_galaxy/_client.py similarity index 97% rename from src/_client.py rename to src/scalar_galaxy/_client.py index c39ff59..e41e313 100644 --- a/src/_client.py +++ b/src/scalar_galaxy/_client.py @@ -74,6 +74,8 @@ class Galaxy(SyncAPIClient): open_id_connect: str | None webhook_secret: str | None + _environment: Literal["production", "responds_with_your_request_data"] | NotGiven + def __init__( self, *, @@ -356,7 +358,7 @@ def _validate_headers( if cookies.get("api_key") is not None: return raise TypeError( - "Could not resolve authentication method. Expected Authorization or X-API-Key or query api_key or cookie api_key to be set." + '"Could not resolve authentication method. Expected either bearer_auth, both basic_auth_username and basic_auth_password, o_auth2, open_id_connect, api_key_header, api_key_query or api_key_cookie to be set. Or for one of the `Authorization` or `X-API-Key` headers to be explicitly omitted"' ) def copy( @@ -371,7 +373,7 @@ def copy( o_auth2: str | None = None, open_id_connect: str | None = None, webhook_secret: str | None = None, - environment: str | None = None, + environment: Literal["production", "responds_with_your_request_data"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.Client | None = None, @@ -398,7 +400,7 @@ def copy( elif set_default_query is not None: params = set_default_query http_client = http_client or self._client - copied_base_url = base_url if base_url is not None else self.base_url + copied_base_url: str | httpx.URL | None = base_url if base_url is not None else self.base_url # Environment overrides must resolve their own URL instead of reusing this client's host. if environment is not None and base_url is None: copied_base_url = None @@ -458,6 +460,8 @@ class AsyncGalaxy(AsyncAPIClient): open_id_connect: str | None webhook_secret: str | None + _environment: Literal["production", "responds_with_your_request_data"] | NotGiven + def __init__( self, *, @@ -740,7 +744,7 @@ def _validate_headers( if cookies.get("api_key") is not None: return raise TypeError( - "Could not resolve authentication method. Expected Authorization or X-API-Key or query api_key or cookie api_key to be set." + '"Could not resolve authentication method. Expected either bearer_auth, both basic_auth_username and basic_auth_password, o_auth2, open_id_connect, api_key_header, api_key_query or api_key_cookie to be set. Or for one of the `Authorization` or `X-API-Key` headers to be explicitly omitted"' ) def copy( @@ -755,7 +759,7 @@ def copy( o_auth2: str | None = None, open_id_connect: str | None = None, webhook_secret: str | None = None, - environment: str | None = None, + environment: Literal["production", "responds_with_your_request_data"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.AsyncClient | None = None, @@ -782,7 +786,7 @@ def copy( elif set_default_query is not None: params = set_default_query http_client = http_client or self._client - copied_base_url = base_url if base_url is not None else self.base_url + copied_base_url: str | httpx.URL | None = base_url if base_url is not None else self.base_url # Environment overrides must resolve their own URL instead of reusing this client's host. if environment is not None and base_url is None: copied_base_url = None diff --git a/src/_compat.py b/src/scalar_galaxy/_compat.py similarity index 100% rename from src/_compat.py rename to src/scalar_galaxy/_compat.py diff --git a/src/_constants.py b/src/scalar_galaxy/_constants.py similarity index 100% rename from src/_constants.py rename to src/scalar_galaxy/_constants.py diff --git a/src/_event_handler.py b/src/scalar_galaxy/_event_handler.py similarity index 100% rename from src/_event_handler.py rename to src/scalar_galaxy/_event_handler.py diff --git a/src/_exceptions.py b/src/scalar_galaxy/_exceptions.py similarity index 100% rename from src/_exceptions.py rename to src/scalar_galaxy/_exceptions.py diff --git a/src/_files.py b/src/scalar_galaxy/_files.py similarity index 100% rename from src/_files.py rename to src/scalar_galaxy/_files.py diff --git a/src/_models.py b/src/scalar_galaxy/_models.py similarity index 100% rename from src/_models.py rename to src/scalar_galaxy/_models.py diff --git a/src/_qs.py b/src/scalar_galaxy/_qs.py similarity index 100% rename from src/_qs.py rename to src/scalar_galaxy/_qs.py diff --git a/src/_resource.py b/src/scalar_galaxy/_resource.py similarity index 100% rename from src/_resource.py rename to src/scalar_galaxy/_resource.py diff --git a/src/_response.py b/src/scalar_galaxy/_response.py similarity index 100% rename from src/_response.py rename to src/scalar_galaxy/_response.py diff --git a/src/_send_queue.py b/src/scalar_galaxy/_send_queue.py similarity index 100% rename from src/_send_queue.py rename to src/scalar_galaxy/_send_queue.py diff --git a/src/_streaming.py b/src/scalar_galaxy/_streaming.py similarity index 100% rename from src/_streaming.py rename to src/scalar_galaxy/_streaming.py diff --git a/src/_types.py b/src/scalar_galaxy/_types.py similarity index 100% rename from src/_types.py rename to src/scalar_galaxy/_types.py diff --git a/src/_utils/__init__.py b/src/scalar_galaxy/_utils/__init__.py similarity index 100% rename from src/_utils/__init__.py rename to src/scalar_galaxy/_utils/__init__.py diff --git a/src/_utils/_compat.py b/src/scalar_galaxy/_utils/_compat.py similarity index 100% rename from src/_utils/_compat.py rename to src/scalar_galaxy/_utils/_compat.py diff --git a/src/_utils/_datetime_parse.py b/src/scalar_galaxy/_utils/_datetime_parse.py similarity index 100% rename from src/_utils/_datetime_parse.py rename to src/scalar_galaxy/_utils/_datetime_parse.py diff --git a/src/_utils/_json.py b/src/scalar_galaxy/_utils/_json.py similarity index 100% rename from src/_utils/_json.py rename to src/scalar_galaxy/_utils/_json.py diff --git a/src/_utils/_logs.py b/src/scalar_galaxy/_utils/_logs.py similarity index 100% rename from src/_utils/_logs.py rename to src/scalar_galaxy/_utils/_logs.py diff --git a/src/_utils/_path.py b/src/scalar_galaxy/_utils/_path.py similarity index 100% rename from src/_utils/_path.py rename to src/scalar_galaxy/_utils/_path.py diff --git a/src/_utils/_proxy.py b/src/scalar_galaxy/_utils/_proxy.py similarity index 100% rename from src/_utils/_proxy.py rename to src/scalar_galaxy/_utils/_proxy.py diff --git a/src/_utils/_reflection.py b/src/scalar_galaxy/_utils/_reflection.py similarity index 100% rename from src/_utils/_reflection.py rename to src/scalar_galaxy/_utils/_reflection.py diff --git a/src/_utils/_resources_proxy.py b/src/scalar_galaxy/_utils/_resources_proxy.py similarity index 100% rename from src/_utils/_resources_proxy.py rename to src/scalar_galaxy/_utils/_resources_proxy.py diff --git a/src/_utils/_streams.py b/src/scalar_galaxy/_utils/_streams.py similarity index 100% rename from src/_utils/_streams.py rename to src/scalar_galaxy/_utils/_streams.py diff --git a/src/_utils/_sync.py b/src/scalar_galaxy/_utils/_sync.py similarity index 100% rename from src/_utils/_sync.py rename to src/scalar_galaxy/_utils/_sync.py diff --git a/src/_utils/_transform.py b/src/scalar_galaxy/_utils/_transform.py similarity index 100% rename from src/_utils/_transform.py rename to src/scalar_galaxy/_utils/_transform.py diff --git a/src/_utils/_typing.py b/src/scalar_galaxy/_utils/_typing.py similarity index 100% rename from src/_utils/_typing.py rename to src/scalar_galaxy/_utils/_typing.py diff --git a/src/_utils/_utils.py b/src/scalar_galaxy/_utils/_utils.py similarity index 100% rename from src/_utils/_utils.py rename to src/scalar_galaxy/_utils/_utils.py diff --git a/src/_version.py b/src/scalar_galaxy/_version.py similarity index 100% rename from src/_version.py rename to src/scalar_galaxy/_version.py diff --git a/src/py.typed b/src/scalar_galaxy/py.typed similarity index 100% rename from src/py.typed rename to src/scalar_galaxy/py.typed diff --git a/src/resources/__init__.py b/src/scalar_galaxy/resources/__init__.py similarity index 100% rename from src/resources/__init__.py rename to src/scalar_galaxy/resources/__init__.py diff --git a/src/resources/authentication.py b/src/scalar_galaxy/resources/authentication.py similarity index 100% rename from src/resources/authentication.py rename to src/scalar_galaxy/resources/authentication.py diff --git a/src/resources/celestial_bodies.py b/src/scalar_galaxy/resources/celestial_bodies.py similarity index 100% rename from src/resources/celestial_bodies.py rename to src/scalar_galaxy/resources/celestial_bodies.py diff --git a/src/resources/planets.py b/src/scalar_galaxy/resources/planets.py similarity index 100% rename from src/resources/planets.py rename to src/scalar_galaxy/resources/planets.py diff --git a/src/resources/webhooks.py b/src/scalar_galaxy/resources/webhooks.py similarity index 100% rename from src/resources/webhooks.py rename to src/scalar_galaxy/resources/webhooks.py diff --git a/src/types/__init__.py b/src/scalar_galaxy/types/__init__.py similarity index 100% rename from src/types/__init__.py rename to src/scalar_galaxy/types/__init__.py diff --git a/src/types/authentication_create_token_params.py b/src/scalar_galaxy/types/authentication_create_token_params.py similarity index 100% rename from src/types/authentication_create_token_params.py rename to src/scalar_galaxy/types/authentication_create_token_params.py diff --git a/src/types/authentication_create_token_response.py b/src/scalar_galaxy/types/authentication_create_token_response.py similarity index 100% rename from src/types/authentication_create_token_response.py rename to src/scalar_galaxy/types/authentication_create_token_response.py diff --git a/src/types/authentication_create_user_params.py b/src/scalar_galaxy/types/authentication_create_user_params.py similarity index 100% rename from src/types/authentication_create_user_params.py rename to src/scalar_galaxy/types/authentication_create_user_params.py diff --git a/src/types/celestial_body.py b/src/scalar_galaxy/types/celestial_body.py similarity index 100% rename from src/types/celestial_body.py rename to src/scalar_galaxy/types/celestial_body.py diff --git a/src/types/celestial_body_create_params.py b/src/scalar_galaxy/types/celestial_body_create_params.py similarity index 95% rename from src/types/celestial_body_create_params.py rename to src/scalar_galaxy/types/celestial_body_create_params.py index d95f6e5..49483a8 100644 --- a/src/types/celestial_body_create_params.py +++ b/src/scalar_galaxy/types/celestial_body_create_params.py @@ -36,6 +36,8 @@ class SatelliteOrbit(TypedDict, total=False): class Satellite(TypedDict, total=False): + """Every satellite in the Scalar Galaxy""" + name: Required[str] description: Optional[str] @@ -49,6 +51,8 @@ class Satellite(TypedDict, total=False): class PlanetSatellite(TypedDict, total=False): + """Every satellite in the Scalar Galaxy""" + name: Required[str] description: Optional[str] @@ -92,6 +96,8 @@ class PlanetPhysicalProperties(TypedDict, total=False): class Planet(TypedDict, total=False): + """A planet in the Scalar Galaxy""" + name: Required[str] description: Optional[str] diff --git a/src/types/celestial_body_create_response.py b/src/scalar_galaxy/types/celestial_body_create_response.py similarity index 100% rename from src/types/celestial_body_create_response.py rename to src/scalar_galaxy/types/celestial_body_create_response.py diff --git a/src/types/new_planet_webhook_event.py b/src/scalar_galaxy/types/new_planet_webhook_event.py similarity index 100% rename from src/types/new_planet_webhook_event.py rename to src/scalar_galaxy/types/new_planet_webhook_event.py diff --git a/src/types/parsed_webhook_event.py b/src/scalar_galaxy/types/parsed_webhook_event.py similarity index 100% rename from src/types/parsed_webhook_event.py rename to src/scalar_galaxy/types/parsed_webhook_event.py diff --git a/src/types/planet.py b/src/scalar_galaxy/types/planet.py similarity index 100% rename from src/types/planet.py rename to src/scalar_galaxy/types/planet.py diff --git a/src/types/planet_create_params.py b/src/scalar_galaxy/types/planet_create_params.py similarity index 98% rename from src/types/planet_create_params.py rename to src/scalar_galaxy/types/planet_create_params.py index 8149a10..7954760 100644 --- a/src/types/planet_create_params.py +++ b/src/scalar_galaxy/types/planet_create_params.py @@ -48,6 +48,8 @@ class PlanetCreateParams(TypedDict, total=False): class Satellite(TypedDict, total=False): + """Every satellite in the Scalar Galaxy""" + name: Required[str] description: Optional[str] diff --git a/src/types/planet_list_all_data_params.py b/src/scalar_galaxy/types/planet_list_all_data_params.py similarity index 100% rename from src/types/planet_list_all_data_params.py rename to src/scalar_galaxy/types/planet_list_all_data_params.py diff --git a/src/types/planet_list_all_data_response.py b/src/scalar_galaxy/types/planet_list_all_data_response.py similarity index 100% rename from src/types/planet_list_all_data_response.py rename to src/scalar_galaxy/types/planet_list_all_data_response.py diff --git a/src/types/planet_param.py b/src/scalar_galaxy/types/planet_param.py similarity index 100% rename from src/types/planet_param.py rename to src/scalar_galaxy/types/planet_param.py diff --git a/src/types/planet_update_params.py b/src/scalar_galaxy/types/planet_update_params.py similarity index 98% rename from src/types/planet_update_params.py rename to src/scalar_galaxy/types/planet_update_params.py index a73b70d..4b24c8d 100644 --- a/src/types/planet_update_params.py +++ b/src/scalar_galaxy/types/planet_update_params.py @@ -48,6 +48,8 @@ class PlanetUpdateParams(TypedDict, total=False): class Satellite(TypedDict, total=False): + """Every satellite in the Scalar Galaxy""" + name: Required[str] description: Optional[str] diff --git a/src/types/planet_upload_image_params.py b/src/scalar_galaxy/types/planet_upload_image_params.py similarity index 100% rename from src/types/planet_upload_image_params.py rename to src/scalar_galaxy/types/planet_upload_image_params.py diff --git a/src/types/planet_upload_image_response.py b/src/scalar_galaxy/types/planet_upload_image_response.py similarity index 100% rename from src/types/planet_upload_image_response.py rename to src/scalar_galaxy/types/planet_upload_image_response.py diff --git a/src/types/user.py b/src/scalar_galaxy/types/user.py similarity index 100% rename from src/types/user.py rename to src/scalar_galaxy/types/user.py diff --git a/src/types/user_param.py b/src/scalar_galaxy/types/user_param.py similarity index 100% rename from src/types/user_param.py rename to src/scalar_galaxy/types/user_param.py From bfc60224b758602477ba6bc702fc9db8657d9150 Mon Sep 17 00:00:00 2001 From: scalarbot Date: Fri, 14 Aug 2026 02:16:50 +0000 Subject: [PATCH 02/11] chore(api): update generated SDK content 1 generated file changed with no detected API surface change (documentation, examples, or file content). Build: tnVEu8dsXNWKH6IBljKUi --- openapi.augmented.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/openapi.augmented.json b/openapi.augmented.json index b88bfed..a929412 100644 --- a/openapi.augmented.json +++ b/openapi.augmented.json @@ -16,7 +16,7 @@ "x-scalar-sdk-installation": [ { "lang": "TypeScript", - "description": "```sh\nnpm install @scalar/galaxy\n```" + "description": "```sh\nnpm install @scalar/galaxy-node\n```" }, { "lang": "Python", @@ -169,7 +169,7 @@ { "lang": "TypeScript", "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst listAllData = await client.planets.listAllData({\n limit: 10,\n offset: 0,\n});\n\nconsole.log(listAllData);" + "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst listAllData = await client.planets.listAllData({\n limit: 10,\n offset: 0,\n});\n\nconsole.log(listAllData);" }, { "lang": "Python", @@ -310,7 +310,7 @@ { "lang": "TypeScript", "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst planet = await client.planets.create();\n\nconsole.log(planet);" + "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst planet = await client.planets.create();\n\nconsole.log(planet);" }, { "lang": "Python", @@ -373,7 +373,7 @@ { "lang": "TypeScript", "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst planet = await client.planets.retrieve(1);\n\nconsole.log(planet);" + "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst planet = await client.planets.retrieve(1);\n\nconsole.log(planet);" }, { "lang": "Python", @@ -440,7 +440,7 @@ { "lang": "TypeScript", "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst planet = await client.planets.update(1);\n\nconsole.log(planet);" + "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst planet = await client.planets.update(1);\n\nconsole.log(planet);" }, { "lang": "Python", @@ -475,7 +475,7 @@ { "lang": "TypeScript", "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nawait client.planets.delete(1);" + "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nawait client.planets.delete(1);" }, { "lang": "Python", @@ -538,7 +538,7 @@ { "lang": "TypeScript", "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst uploadImage = await client.planets.uploadImage(1);\n\nconsole.log(uploadImage);" + "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst uploadImage = await client.planets.uploadImage(1);\n\nconsole.log(uploadImage);" }, { "lang": "Python", @@ -584,7 +584,7 @@ { "lang": "TypeScript", "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst celestialBody = await client.celestialBodies.create({\n name: 'Mars',\n});\n\nconsole.log(celestialBody);" + "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst celestialBody = await client.celestialBodies.create({\n name: 'Mars',\n});\n\nconsole.log(celestialBody);" }, { "lang": "Python", @@ -726,7 +726,7 @@ { "lang": "TypeScript", "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst user = await client.authentication.createUser();\n\nconsole.log(user);" + "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst user = await client.authentication.createUser();\n\nconsole.log(user);" }, { "lang": "Python", @@ -808,7 +808,7 @@ { "lang": "TypeScript", "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst createToken = await client.authentication.createToken();\n\nconsole.log(createToken);" + "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst createToken = await client.authentication.createToken();\n\nconsole.log(createToken);" }, { "lang": "Python", @@ -891,7 +891,7 @@ { "lang": "TypeScript", "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst user = await client.authentication.listMe();\n\nconsole.log(user);" + "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst user = await client.authentication.listMe();\n\nconsole.log(user);" }, { "lang": "Python", From 6d8385a6460f127c363d3586233cf1c378537a27 Mon Sep 17 00:00:00 2001 From: scalarbot Date: Mon, 17 Aug 2026 22:21:02 +0000 Subject: [PATCH 03/11] chore(api): regenerate SDK - Regenerated with generator `0.27.0` (previously `0.24.0`). Build: NSi7RKfq8QnBk9czwOV3Y --- .gitignore | 4 ++-- openapi.augmented.json | 8 ++++---- scalar-sdk.manifest.json | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 0054954..e951962 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,8 @@ __pycache__/ *.py[cod] *.egg-info/ .venv/ -dist/ -build/ +/dist/ +/build/ .mypy_cache/ .pytest_cache/ .ruff_cache/ diff --git a/openapi.augmented.json b/openapi.augmented.json index a929412..1fad7fc 100644 --- a/openapi.augmented.json +++ b/openapi.augmented.json @@ -310,7 +310,7 @@ { "lang": "TypeScript", "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst planet = await client.planets.create();\n\nconsole.log(planet);" + "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst planet = await client.planets.create({\n name: 'Mars',\n});\n\nconsole.log(planet);" }, { "lang": "Python", @@ -440,7 +440,7 @@ { "lang": "TypeScript", "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst planet = await client.planets.update(1);\n\nconsole.log(planet);" + "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst planet = await client.planets.update(1, {\n name: 'Mars',\n});\n\nconsole.log(planet);" }, { "lang": "Python", @@ -726,7 +726,7 @@ { "lang": "TypeScript", "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst user = await client.authentication.createUser();\n\nconsole.log(user);" + "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst user = await client.authentication.createUser({\n name: 'Marc',\n email: 'marc@scalar.com',\n password: 'i-love-scalar',\n});\n\nconsole.log(user);" }, { "lang": "Python", @@ -808,7 +808,7 @@ { "lang": "TypeScript", "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst createToken = await client.authentication.createToken();\n\nconsole.log(createToken);" + "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst createToken = await client.authentication.createToken({\n email: 'marc@scalar.com',\n password: 'i-love-scalar',\n});\n\nconsole.log(createToken);" }, { "lang": "Python", diff --git a/scalar-sdk.manifest.json b/scalar-sdk.manifest.json index f735f5c..7a34d9e 100644 --- a/scalar-sdk.manifest.json +++ b/scalar-sdk.manifest.json @@ -1,7 +1,7 @@ { "name": "ScalarGalaxy", "slug": "scalarGalaxy", - "generatorVersion": "0.24.0", + "generatorVersion": "0.27.0", "servers": [ "https://galaxy.scalar.com", "{protocol}://void.scalar.com/{path}" From 6d667aec39db196cc0568c94e14a048498c09a5e Mon Sep 17 00:00:00 2001 From: scalarbot Date: Thu, 20 Aug 2026 22:51:30 +0000 Subject: [PATCH 04/11] chore(api): regenerate SDK - Regenerated with generator `0.27.2` (previously `0.27.0`). Build: YAfZI5mpcDvcDPz1O2WYF --- .github/workflows/sdk-ci.yml | 6 + SECURITY.md | 18 +- api.md | 6 + openapi.augmented.json | 2032 ---------------------------------- scalar-sdk.manifest.json | 2 +- 5 files changed, 30 insertions(+), 2034 deletions(-) delete mode 100644 openapi.augmented.json diff --git a/.github/workflows/sdk-ci.yml b/.github/workflows/sdk-ci.yml index 52fc8dd..d18db23 100644 --- a/.github/workflows/sdk-ci.yml +++ b/.github/workflows/sdk-ci.yml @@ -4,6 +4,12 @@ on: push: pull_request: +# Least privilege for a verification-only workflow: every job below only reads the checked-out +# tree, so the run's GITHUB_TOKEN is narrowed to that regardless of the repository's default +# grants. Declared at the workflow level so a job added later inherits the floor. +permissions: + contents: read + jobs: verify: runs-on: ubuntu-latest diff --git a/SECURITY.md b/SECURITY.md index 22d4cea..8706201 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,3 +1,19 @@ # Security Policy -Please report any vulnerabilities through the standard issue tracker. +## Reporting Security Issues + +This is a generated Python SDK for Scalar Galaxy, produced by the Scalar SDK Generator (https://scalar.com). + +If the issue is in the generated SDK itself — its runtime, authentication handling, path construction, or serialization — report it to the Scalar team at support@scalar.com. We will acknowledge the report, triage it for severity and impact, and communicate a timeline for a fix or an explanation if we decline it. + +## Responsible Disclosure + +Please allow us reasonable time to investigate and address the issue before disclosing it publicly. Do not include credentials, tokens, or private API payloads in a public issue. + +## Reporting Non-SDK Security Issues + +If the issue is in the Scalar Galaxy API or service rather than in this SDK, report it through the security process Scalar Galaxy has published. + +--- + +Generated code validates emitted paths and escapes spec-derived strings, but OpenAPI documents should still be treated as untrusted input before generation. diff --git a/api.md b/api.md index e161c40..8132371 100644 --- a/api.md +++ b/api.md @@ -32,6 +32,8 @@ client = Galaxy( ## `Planets` +Everything about planets + ### Get all planets It's easy to say you know them all, but do you really? Retrieve all the planets and check whether you missed one. @@ -120,6 +122,8 @@ planet = client.planets.upload_image( ## `CelestialBodies` +Celestial bodies are the planets and satellites in the Scalar Galaxy. + ### Create a celestial body Stars, moons, comets, the occasional rogue asteroid — if it glows or drifts through the void, you can add it here. @@ -137,6 +141,8 @@ celestial_body = client.celestial_bodies.create( ## `Authentication` +Some endpoints are public, but some require authentication. We provide all the required endpoints to create an account and authorize yourself. + ### Create a user Time to create a user account, eh? diff --git a/openapi.augmented.json b/openapi.augmented.json deleted file mode 100644 index 1fad7fc..0000000 --- a/openapi.augmented.json +++ /dev/null @@ -1,2032 +0,0 @@ -{ - "openapi": "3.1.1", - "info": { - "title": "Scalar Galaxy", - "description": "The Scalar Galaxy is an example OpenAPI document to test OpenAPI tools and libraries. It's a fictional universe with fictional planets and fictional data.\n\n## Resources\n\n* https://github.com/scalar/scalar\n* https://github.com/OAI/OpenAPI-Specification\n* https://scalar.com\n\n## Markdown Support\n\nAll descriptions *can* contain ~~tons of text~~ **Markdown**. [If GitHub supports the syntax](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax), chances are we're supporting it, too.\n\n
\n Examples\n\n **Blockquotes**\n\n > I love OpenAPI. <3\n\n **Tables**\n\n | Feature | Availability |\n | ---------------- | ------------ |\n | Markdown Support | ✓ |\n\n **Accordion**\n\n ```html\n
\n Using Details Tags\n

HTML Example

\n
\n ```\n\n **Images**\n\n Yes, there's support for images, too!\n\n ![Empty placeholder image showing the width/height](https://images.placeholders.dev/?width=1280&height=720)\n\n **Alerts**\n\n > [!tip]\n > You can use Markdown alerts in your descriptions.\n\n
\n", - "version": "0.6.12", - "contact": { - "name": "Scalar Support", - "url": "https://scalar.com", - "email": "support@scalar.com" - }, - "license": { - "name": "MIT", - "url": "https://opensource.org/license/MIT" - }, - "x-scalar-sdk-installation": [ - { - "lang": "TypeScript", - "description": "```sh\nnpm install @scalar/galaxy-node\n```" - }, - { - "lang": "Python", - "description": "```sh\npip install scalar-galaxy\n```" - } - ] - }, - "externalDocs": { - "description": "Documentation", - "url": "https://github.com/scalar/scalar" - }, - "servers": [ - { - "url": "https://galaxy.scalar.com" - }, - { - "url": "{protocol}://void.scalar.com/{path}", - "description": "Responds with your request data", - "variables": { - "protocol": { - "enum": [ - "https", - "http" - ], - "default": "https" - }, - "path": { - "default": "" - } - } - } - ], - "security": [ - { - "bearerAuth": [] - }, - { - "basicAuth": [] - }, - { - "apiKeyQuery": [] - }, - { - "apiKeyHeader": [] - }, - { - "apiKeyHeader": [], - "apiKeyQuery": [] - }, - { - "apiKeyCookie": [] - }, - { - "oAuth2": [] - }, - { - "openIdConnect": [] - } - ], - "x-speakeasy-webhooks": { - "security": { - "type": "signature", - "headerName": "x-signature", - "signatureTextEncoding": "base64", - "algorithm": "hmac-sha256" - } - }, - "tags": [ - { - "name": "Authentication", - "description": "Some endpoints are public, but some require authentication. We provide all the required endpoints to create an account and authorize yourself." - }, - { - "name": "Planets", - "description": "Everything about planets" - }, - { - "name": "Celestial Bodies", - "description": "Celestial bodies are the planets and satellites in the Scalar Galaxy." - } - ], - "paths": { - "/planets": { - "get": { - "tags": [ - "Planets" - ], - "summary": "Get all planets", - "description": "It's easy to say you know them all, but do you really? Retrieve all the planets and check whether you missed one.", - "operationId": "getAllData", - "security": [], - "parameters": [ - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/offset" - } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-ID": { - "$ref": "#/components/headers/X-Request-ID" - }, - "X-Pagination-Total": { - "$ref": "#/components/headers/X-Pagination-Total" - }, - "X-Pagination-Page": { - "$ref": "#/components/headers/X-Pagination-Page" - }, - "X-Pagination-Per-Page": { - "$ref": "#/components/headers/X-Pagination-Per-Page" - }, - "X-Cache-Control": { - "$ref": "#/components/headers/X-Cache-Control" - } - }, - "content": { - "application/json": { - "schema": { - "$id": "https://galaxy.scalar.com/schemas/PaginatedPlanets", - "$defs": { - "itemType": { - "$dynamicAnchor": "itemType", - "$ref": "#/components/schemas/Planet" - } - }, - "$ref": "#/components/schemas/PaginatedResource" - } - }, - "application/xml": { - "schema": { - "$id": "https://galaxy.scalar.com/schemas/PaginatedPlanetsXml", - "$defs": { - "itemType": { - "$dynamicAnchor": "itemType", - "$ref": "#/components/schemas/Planet" - } - }, - "$ref": "#/components/schemas/PaginatedResource" - } - } - } - } - }, - "x-post-response": "pm.test(\"Status code is 200\", () => {\n pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response has data array and meta\", () => {\n const jsonData = pm.response.json();\n pm.expect(jsonData).to.have.property(\"data\");\n pm.expect(jsonData.data).to.be.an(\"array\");\n pm.expect(jsonData).to.have.property(\"meta\");\n});\n", - "x-codeSamples": [ - { - "lang": "TypeScript", - "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst listAllData = await client.planets.listAllData({\n limit: 10,\n offset: 0,\n});\n\nconsole.log(listAllData);" - }, - { - "lang": "Python", - "label": "Python", - "source": "import os\n\nfrom scalar_galaxy import Galaxy\n\nclient = Galaxy(\n bearer_auth=os.environ.get(\"BEARER_AUTH\"),\n)\n\nplanet = client.planets.list_all_data(\n limit=10,\n offset=0,\n)\n\nprint(planet)" - } - ] - }, - "post": { - "tags": [ - "Planets" - ], - "summary": "Create a planet", - "description": "Time to play god and create a new planet. What do you think? Ah, don't think too much. What could go wrong anyway?", - "operationId": "createPlanet", - "callbacks": { - "planetCreated": { - "{$request.body#/successCallbackUrl}": { - "post": { - "security": [], - "requestBody": { - "description": "Information about the newly created planet", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Planet" - } - } - } - }, - "responses": { - "200": { - "description": "Your server returns this code if it accepts the callback" - }, - "204": { - "description": "Your server should return this HTTP status code if no longer interested in further updates" - } - } - } - } - }, - "planetCreationFailed": { - "{$request.body#/failureCallbackUrl}": { - "post": { - "security": [], - "requestBody": { - "description": "Information about which fields failed to validate", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Planet" - } - } - } - }, - "responses": { - "200": { - "description": "Your server returns this code if it accepts the failure callback notification" - } - } - } - } - }, - "planetExploded": { - "{$request.body#/successCallbackUrl}": { - "post": { - "security": [], - "requestBody": { - "description": "Information about the newly exploded planet", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Planet" - } - } - } - }, - "responses": { - "200": { - "description": "Your server returns this code if it accepts the planet explosion callback notification" - } - } - } - } - } - }, - "requestBody": { - "description": "Planet", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Planet" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Planet" - } - } - } - }, - "responses": { - "201": { - "description": "Created", - "headers": { - "X-Request-ID": { - "$ref": "#/components/headers/X-Request-ID" - }, - "Location": { - "$ref": "#/components/headers/Location" - }, - "X-Processing-Time": { - "$ref": "#/components/headers/X-Processing-Time" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Planet" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Planet" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - } - }, - "x-post-response": "pm.test(\"Status code is 201\", () => {\n pm.response.to.have.status(201);\n});\n\npm.test(\"Content-Type header is present\", () => {\n pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response is a planet with id and name\", () => {\n const jsonData = pm.response.json();\n pm.expect(jsonData).to.have.property(\"id\");\n pm.expect(jsonData).to.have.property(\"name\");\n});\n", - "x-codeSamples": [ - { - "lang": "TypeScript", - "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst planet = await client.planets.create({\n name: 'Mars',\n});\n\nconsole.log(planet);" - }, - { - "lang": "Python", - "label": "Python", - "source": "import os\n\nfrom scalar_galaxy import Galaxy\n\nclient = Galaxy(\n bearer_auth=os.environ.get(\"BEARER_AUTH\"),\n)\n\nplanet = client.planets.create(\n name=\"Mars\",\n)\n\nprint(planet)" - } - ] - } - }, - "/planets/{planetId}": { - "get": { - "tags": [ - "Planets" - ], - "summary": "Get a planet", - "description": "You'll better learn a little bit more about the planets. It might come in handy once space travel is available for everyone.", - "operationId": "getPlanet", - "security": [], - "parameters": [ - { - "$ref": "#/components/parameters/planetId" - } - ], - "responses": { - "200": { - "description": "Planet Found", - "headers": { - "X-Request-ID": { - "$ref": "#/components/headers/X-Request-ID" - }, - "ETag": { - "$ref": "#/components/headers/ETag" - }, - "Last-Modified": { - "$ref": "#/components/headers/Last-Modified" - }, - "X-Cache-Control": { - "$ref": "#/components/headers/X-Cache-Control" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Planet" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Planet" - } - } - } - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-post-response": "pm.test(\"Status code is 200\", () => {\n pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response is a planet with id and name\", () => {\n const jsonData = pm.response.json();\n pm.expect(jsonData).to.have.property(\"id\");\n pm.expect(jsonData).to.have.property(\"name\");\n});\n", - "x-codeSamples": [ - { - "lang": "TypeScript", - "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst planet = await client.planets.retrieve(1);\n\nconsole.log(planet);" - }, - { - "lang": "Python", - "label": "Python", - "source": "import os\n\nfrom scalar_galaxy import Galaxy\n\nclient = Galaxy(\n bearer_auth=os.environ.get(\"BEARER_AUTH\"),\n)\n\nplanet = client.planets.retrieve(\n planet_id=1,\n)\n\nprint(planet)" - } - ] - }, - "put": { - "tags": [ - "Planets" - ], - "summary": "Update a planet", - "description": "Sometimes you make mistakes, that's fine. No worries, you can update all planets.", - "operationId": "updatePlanet", - "requestBody": { - "description": "New information about the planet", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Planet" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Planet" - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/planetId" - } - ], - "responses": { - "200": { - "description": "Planet updated successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Planet" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Planet" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-post-response": "pm.test(\"Status code is 200\", () => {\n pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response is a planet with id and name\", () => {\n const jsonData = pm.response.json();\n pm.expect(jsonData).to.have.property(\"id\");\n pm.expect(jsonData).to.have.property(\"name\");\n});\n", - "x-codeSamples": [ - { - "lang": "TypeScript", - "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst planet = await client.planets.update(1, {\n name: 'Mars',\n});\n\nconsole.log(planet);" - }, - { - "lang": "Python", - "label": "Python", - "source": "import os\n\nfrom scalar_galaxy import Galaxy\n\nclient = Galaxy(\n bearer_auth=os.environ.get(\"BEARER_AUTH\"),\n)\n\nplanet = client.planets.update(\n planet_id=1,\n name=\"Mars\",\n)\n\nprint(planet)" - } - ] - }, - "delete": { - "tags": [ - "Planets" - ], - "summary": "Delete a planet", - "operationId": "deletePlanet", - "description": "This endpoint was used to delete planets. Unfortunately, that caused a lot of trouble for planets with life. So, this endpoint is now deprecated and should not be used anymore.", - "x-scalar-stability": "experimental", - "parameters": [ - { - "$ref": "#/components/parameters/planetId" - } - ], - "responses": { - "204": { - "description": "No Content" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-post-response": "pm.test(\"Status code is 204\", () => {\n pm.response.to.have.status(204);\n});\n", - "x-codeSamples": [ - { - "lang": "TypeScript", - "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nawait client.planets.delete(1);" - }, - { - "lang": "Python", - "label": "Python", - "source": "import os\n\nfrom scalar_galaxy import Galaxy\n\nclient = Galaxy(\n bearer_auth=os.environ.get(\"BEARER_AUTH\"),\n)\n\nclient.planets.delete(\n planet_id=1,\n)" - } - ] - } - }, - "/planets/{planetId}/image": { - "post": { - "tags": [ - "Planets" - ], - "summary": "Upload an image to a planet", - "description": "Got a crazy good photo of a planet? Share it with the world!", - "operationId": "uploadImage", - "parameters": [ - { - "$ref": "#/components/parameters/planetId" - } - ], - "requestBody": { - "description": "Image to upload", - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "image": { - "type": "string", - "format": "binary", - "description": "The image file to upload", - "examples": [ - "@mars.jpg", - "@jupiter.png" - ] - } - } - } - } - } - }, - "responses": { - "200": { - "$ref": "#/components/responses/ImageUploaded" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-post-response": "pm.test(\"Status code is 200\", () => {\n pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response has message and imageUrl\", () => {\n const jsonData = pm.response.json();\n pm.expect(jsonData).to.have.property(\"message\");\n pm.expect(jsonData).to.have.property(\"imageUrl\");\n});\n", - "x-codeSamples": [ - { - "lang": "TypeScript", - "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst uploadImage = await client.planets.uploadImage(1);\n\nconsole.log(uploadImage);" - }, - { - "lang": "Python", - "label": "Python", - "source": "import os\n\nfrom scalar_galaxy import Galaxy\n\nclient = Galaxy(\n bearer_auth=os.environ.get(\"BEARER_AUTH\"),\n)\n\nplanet = client.planets.upload_image(\n planet_id=1,\n)\n\nprint(planet)" - } - ] - } - }, - "/celestial-bodies": { - "post": { - "tags": [ - "Celestial Bodies" - ], - "summary": "Create a celestial body", - "description": "Stars, moons, comets, the occasional rogue asteroid — if it glows or drifts through the void, you can add it here.", - "operationId": "createCelestialBody", - "requestBody": { - "description": "Celestial body to create", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CelestialBody" - } - } - } - }, - "responses": { - "201": { - "description": "Celestial body created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CelestialBody" - } - } - } - } - }, - "x-post-response": "pm.test(\"Status code is 201\", () => {\n pm.response.to.have.status(201);\n});\n\npm.test(\"Content-Type header is present\", () => {\n pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response is a celestial body with id and name\", () => {\n const jsonData = pm.response.json();\n pm.expect(jsonData).to.have.property(\"id\");\n pm.expect(jsonData).to.have.property(\"name\");\n});\n", - "x-codeSamples": [ - { - "lang": "TypeScript", - "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst celestialBody = await client.celestialBodies.create({\n name: 'Mars',\n});\n\nconsole.log(celestialBody);" - }, - { - "lang": "Python", - "label": "Python", - "source": "import os\n\nfrom scalar_galaxy import Galaxy\n\nclient = Galaxy(\n bearer_auth=os.environ.get(\"BEARER_AUTH\"),\n)\n\ncelestial_body = client.celestial_bodies.create(\n name=\"Mars\",\n)\n\nprint(celestial_body)" - } - ] - } - }, - "/user/signup": { - "post": { - "tags": [ - "Authentication" - ], - "summary": "Create a user", - "description": "Time to create a user account, eh?", - "operationId": "createUser", - "security": [], - "requestBody": { - "description": "User to create", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/User" - }, - { - "$ref": "#/components/schemas/Credentials" - } - ] - }, - "examples": { - "Marc": { - "value": { - "name": "Marc", - "email": "marc@scalar.com", - "password": "i-love-scalar" - } - }, - "Cam": { - "value": { - "name": "Cam", - "email": "cam@scalar.com", - "password": "scalar-is-cool" - } - }, - "Hans": { - "value": { - "name": "Hans", - "email": "hans@scalar.com", - "password": "5c4l4r" - } - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/User" - }, - { - "$ref": "#/components/schemas/Credentials" - } - ] - }, - "examples": { - "Marc": { - "value": { - "name": "Marc", - "email": "marc@scalar.com", - "password": "i-love-scalar" - } - }, - "Cam": { - "value": { - "name": "Cam", - "email": "cam@scalar.com", - "password": "scalar-is-cool" - } - }, - "Hans": { - "value": { - "name": "Hans", - "email": "hans@scalar.com", - "password": "5c4l4r" - } - } - } - } - } - }, - "responses": { - "201": { - "description": "User account created successfully", - "headers": { - "X-Request-ID": { - "$ref": "#/components/headers/X-Request-ID" - }, - "Location": { - "$ref": "#/components/headers/Location" - }, - "X-Processing-Time": { - "$ref": "#/components/headers/X-Processing-Time" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "409": { - "$ref": "#/components/responses/Conflict" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - } - }, - "x-post-response": "pm.test(\"Status code is 201\", () => {\n pm.response.to.have.status(201);\n});\n\npm.test(\"Content-Type header is present\", () => {\n pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response is a user with id and name\", () => {\n const jsonData = pm.response.json();\n pm.expect(jsonData).to.have.property(\"id\");\n pm.expect(jsonData).to.have.property(\"name\");\n});\n", - "x-codeSamples": [ - { - "lang": "TypeScript", - "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst user = await client.authentication.createUser({\n name: 'Marc',\n email: 'marc@scalar.com',\n password: 'i-love-scalar',\n});\n\nconsole.log(user);" - }, - { - "lang": "Python", - "label": "Python", - "source": "import os\n\nfrom scalar_galaxy import Galaxy\n\nclient = Galaxy(\n bearer_auth=os.environ.get(\"BEARER_AUTH\"),\n)\n\nauthentication = client.authentication.create_user(\n name=\"Marc\",\n email=\"marc@scalar.com\",\n password=\"i-love-scalar\",\n)\n\nprint(authentication)" - } - ] - } - }, - "/auth/token": { - "post": { - "tags": [ - "Authentication" - ], - "summary": "Get a token", - "description": "Yeah, this is the boring security stuff. Just get your super secret token and move on.", - "operationId": "getToken", - "security": [], - "requestBody": { - "description": "Body for credentials to authenticate a user", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Credentials" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Credentials" - } - } - } - }, - "responses": { - "201": { - "description": "Token Created", - "headers": { - "X-Request-ID": { - "$ref": "#/components/headers/X-Request-ID" - }, - "X-RateLimit-Limit": { - "$ref": "#/components/headers/X-RateLimit-Limit" - }, - "X-RateLimit-Remaining": { - "$ref": "#/components/headers/X-RateLimit-Remaining" - }, - "X-RateLimit-Reset": { - "$ref": "#/components/headers/X-RateLimit-Reset" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Token" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Token" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - } - }, - "x-post-response": "pm.test(\"Status code is 201\", () => {\n pm.response.to.have.status(201);\n});\n\npm.test(\"Content-Type header is present\", () => {\n pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response contains token\", () => {\n const jsonData = pm.response.json();\n pm.expect(jsonData).to.have.property(\"token\");\n pm.expect(jsonData.token).to.be.an(\"string\");\n});\n", - "x-codeSamples": [ - { - "lang": "TypeScript", - "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst createToken = await client.authentication.createToken({\n email: 'marc@scalar.com',\n password: 'i-love-scalar',\n});\n\nconsole.log(createToken);" - }, - { - "lang": "Python", - "label": "Python", - "source": "import os\n\nfrom scalar_galaxy import Galaxy\n\nclient = Galaxy(\n bearer_auth=os.environ.get(\"BEARER_AUTH\"),\n)\n\nauthentication = client.authentication.create_token(\n email=\"marc@scalar.com\",\n password=\"i-love-scalar\",\n)\n\nprint(authentication)" - } - ] - } - }, - "/me": { - "get": { - "tags": [ - "Authentication" - ], - "summary": "Get authenticated user", - "description": "Find yourself they say. That's what you can do here.", - "operationId": "getMe", - "security": [ - { - "basicAuth": [] - }, - { - "oAuth2": [ - "read:account" - ] - }, - { - "bearerAuth": [] - }, - { - "apiKeyHeader": [] - }, - { - "apiKeyQuery": [] - }, - { - "apiKeyHeader": [], - "apiKeyQuery": [] - } - ], - "responses": { - "200": { - "description": "Authenticated user information retrieved successfully", - "headers": { - "X-Request-ID": { - "$ref": "#/components/headers/X-Request-ID" - }, - "ETag": { - "$ref": "#/components/headers/ETag" - }, - "Last-Modified": { - "$ref": "#/components/headers/Last-Modified" - }, - "X-Cache-Control": { - "$ref": "#/components/headers/X-Cache-Control" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - } - }, - "x-post-response": "pm.test(\"Status code is 200\", () => {\n pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response is a user with id and name\", () => {\n const jsonData = pm.response.json();\n pm.expect(jsonData).to.have.property(\"id\");\n pm.expect(jsonData).to.have.property(\"name\");\n});\n", - "x-codeSamples": [ - { - "lang": "TypeScript", - "label": "TypeScript", - "source": "import Galaxy from '@scalar/galaxy-node';\n\nconst client = new Galaxy({\n bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n environment: 'production',\n});\n\nconst user = await client.authentication.listMe();\n\nconsole.log(user);" - }, - { - "lang": "Python", - "label": "Python", - "source": "import os\n\nfrom scalar_galaxy import Galaxy\n\nclient = Galaxy(\n bearer_auth=os.environ.get(\"BEARER_AUTH\"),\n)\n\nauthentication = client.authentication.list_me()\n\nprint(authentication)" - } - ] - } - } - }, - "webhooks": { - "newPlanet": { - "post": { - "tags": [ - "Planets" - ], - "security": [], - "requestBody": { - "description": "Information about a new planet", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Planet" - } - } - } - }, - "responses": { - "200": { - "description": "Return a 200 status to indicate that the data was received successfully" - } - }, - "x-post-response": "pm.test(\"Status code is 200\", () => {\n pm.response.to.have.status(200);\n});\n" - } - } - }, - "components": { - "securitySchemes": { - "bearerAuth": { - "type": "http", - "scheme": "bearer", - "description": "JWT Bearer token authentication" - }, - "basicAuth": { - "type": "http", - "scheme": "basic", - "description": "Basic HTTP authentication" - }, - "apiKeyHeader": { - "type": "apiKey", - "in": "header", - "name": "X-API-Key", - "description": "API key request header" - }, - "apiKeyQuery": { - "type": "apiKey", - "in": "query", - "name": "api_key", - "description": "API key query parameter" - }, - "apiKeyCookie": { - "type": "apiKey", - "in": "cookie", - "name": "api_key", - "description": "API key browser cookie" - }, - "oAuth2": { - "type": "oauth2", - "description": "OAuth 2.0 authentication", - "flows": { - "authorizationCode": { - "authorizationUrl": "https://galaxy.scalar.com/oauth/authorize", - "tokenUrl": "https://galaxy.scalar.com/oauth/token", - "scopes": { - "read:account": "read your account information", - "write:planets": "modify planets in your account", - "read:planets": "read your planets" - }, - "refreshUrl": "", - "x-usePkce": "SHA-256" - }, - "clientCredentials": { - "tokenUrl": "https://galaxy.scalar.com/oauth/token", - "scopes": { - "read:account": "read your account information", - "write:planets": "modify planets in your account", - "read:planets": "read your planets" - }, - "refreshUrl": "" - }, - "implicit": { - "authorizationUrl": "https://galaxy.scalar.com/oauth/authorize", - "scopes": { - "read:account": "read your account information", - "write:planets": "modify planets in your account", - "read:planets": "read your planets" - }, - "refreshUrl": "" - }, - "password": { - "tokenUrl": "https://galaxy.scalar.com/oauth/token", - "scopes": { - "read:account": "read your account information", - "write:planets": "modify planets in your account", - "read:planets": "read your planets" - }, - "refreshUrl": "" - } - } - }, - "openIdConnect": { - "type": "openIdConnect", - "openIdConnectUrl": "https://galaxy.scalar.com/.well-known/openid-configuration", - "description": "OpenID Connect Authentication" - } - }, - "parameters": { - "planetId": { - "name": "planetId", - "description": "The ID of the planet to get", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - } - }, - "limit": { - "name": "limit", - "description": "The number of items to return", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64", - "default": 10 - } - }, - "offset": { - "name": "offset", - "description": "The number of items to skip before starting to collect the result set", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64", - "default": 0 - } - } - }, - "headers": { - "X-RateLimit-Limit": { - "description": "The number of allowed requests in the current period", - "schema": { - "type": "integer", - "example": 100 - } - }, - "X-RateLimit-Remaining": { - "description": "The number of remaining requests in the current period", - "schema": { - "type": "integer", - "example": 95 - } - }, - "X-RateLimit-Reset": { - "description": "The number of seconds left in the current period", - "schema": { - "type": "integer", - "example": 3600 - } - }, - "X-Request-ID": { - "description": "Unique identifier for the request", - "schema": { - "type": "string", - "format": "uuid", - "example": "123e4567-e89b-12d3-a456-426614174000" - } - }, - "X-Pagination-Total": { - "description": "Total number of items available", - "schema": { - "type": "integer", - "example": 1000 - } - }, - "X-Pagination-Page": { - "description": "Current page number", - "schema": { - "type": "integer", - "example": 1 - } - }, - "X-Pagination-Per-Page": { - "description": "Number of items per page", - "schema": { - "type": "integer", - "example": 10 - } - }, - "X-Cache-Control": { - "description": "Cache control directives", - "schema": { - "type": "string", - "example": "max-age=3600, public" - } - }, - "ETag": { - "description": "Entity tag for caching", - "schema": { - "type": "string", - "example": "\"33a64df551\"" - } - }, - "Last-Modified": { - "description": "The last modification date of the resource", - "schema": { - "type": "string", - "format": "date-time", - "example": "2023-12-01T12:00:00Z" - } - }, - "Location": { - "description": "The URL of the newly created resource", - "schema": { - "type": "string", - "format": "uri", - "example": "https://galaxy.scalar.com/planets/123" - } - }, - "X-Processing-Time": { - "description": "The time taken to process the request in milliseconds", - "schema": { - "type": "integer", - "example": 150 - } - } - }, - "responses": { - "ImageUploaded": { - "description": "Image uploaded", - "headers": { - "X-Request-ID": { - "$ref": "#/components/headers/X-Request-ID" - }, - "X-Cache-Control": { - "$ref": "#/components/headers/X-Cache-Control" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageUploadedMessage" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/ImageUploadedMessage" - } - } - } - }, - "BadRequest": { - "description": "Bad Request", - "headers": { - "X-Request-ID": { - "$ref": "#/components/headers/X-Request-ID" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BadRequestError" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/BadRequestError" - } - } - } - }, - "Forbidden": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenError" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/ForbiddenError" - } - } - } - }, - "NotFound": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundError" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/NotFoundError" - } - } - } - }, - "Unauthorized": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedError" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedError" - } - } - } - }, - "Conflict": { - "description": "Conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Conflict" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Conflict" - } - } - } - }, - "UnprocessableEntity": { - "description": "Unprocessable Entity", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnprocessableEntity" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/UnprocessableEntity" - } - } - } - }, - "TooManyRequests": { - "description": "Too Many Requests", - "headers": { - "X-Request-ID": { - "$ref": "#/components/headers/X-Request-ID" - }, - "X-RateLimit-Limit": { - "$ref": "#/components/headers/X-RateLimit-Limit" - }, - "X-RateLimit-Remaining": { - "$ref": "#/components/headers/X-RateLimit-Remaining" - }, - "X-RateLimit-Reset": { - "$ref": "#/components/headers/X-RateLimit-Reset" - }, - "Retry-After": { - "description": "The number of seconds to wait before retrying", - "schema": { - "type": "integer", - "example": 60 - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TooManyRequestsError" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/TooManyRequestsError" - } - } - } - } - }, - "schemas": { - "User": { - "description": "A user", - "type": "object", - "xml": { - "name": "user" - }, - "properties": { - "id": { - "type": "integer", - "format": "int64", - "readOnly": true, - "examples": [ - 1 - ] - }, - "name": { - "type": "string", - "examples": [ - "Marc", - "Cam", - "Hans" - ] - } - } - }, - "Credentials": { - "description": "Credentials to authenticate a user", - "type": "object", - "required": [ - "email", - "password" - ], - "properties": { - "email": { - "type": "string", - "format": "email", - "examples": [ - "marc@scalar.com", - "cam@scalar.com", - "hans@scalar.com" - ] - }, - "password": { - "type": "string", - "writeOnly": true, - "examples": [ - "i-love-scalar", - "i-love-oss", - "qwerty123" - ] - } - } - }, - "Token": { - "description": "A token to authenticate a user", - "type": "object", - "properties": { - "token": { - "type": "string", - "examples": [ - "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - ] - } - } - }, - "CelestialBody": { - "oneOf": [ - { - "$ref": "#/components/schemas/Planet" - }, - { - "$ref": "#/components/schemas/Satellite" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "terrestrial": "#/components/schemas/Planet", - "gas_giant": "#/components/schemas/Planet", - "ice_giant": "#/components/schemas/Planet", - "dwarf": "#/components/schemas/Planet", - "super_earth": "#/components/schemas/Planet", - "moon": "#/components/schemas/Satellite", - "asteroid": "#/components/schemas/Satellite", - "comet": "#/components/schemas/Satellite" - } - }, - "description": "A celestial body which can be either a planet or a satellite" - }, - "Planet": { - "description": "A planet in the Scalar Galaxy", - "type": "object", - "required": [ - "id", - "name" - ], - "additionalProperties": false, - "xml": { - "name": "planet" - }, - "properties": { - "id": { - "type": "integer", - "format": "int64", - "readOnly": true, - "examples": [ - 1 - ], - "x-variable": "planetId" - }, - "name": { - "type": "string", - "examples": [ - "Mars", - "Jupiter", - "HD 40307g" - ] - }, - "description": { - "type": [ - "string", - "null" - ], - "examples": [ - "The red planet", - "A gas giant with a great red spot" - ] - }, - "type": { - "type": "string", - "enum": [ - "terrestrial", - "gas_giant", - "ice_giant", - "dwarf", - "super_earth" - ], - "x-enum-varnames": [ - "Terrestrial", - "GasGiant", - "IceGiant", - "Dwarf", - "SuperEarth" - ], - "x-enum-descriptions": { - "terrestrial": "Rocky planets with solid surfaces, like Earth and Mars", - "gas_giant": "Large planets composed mainly of hydrogen and helium, like Jupiter and Saturn", - "ice_giant": "Planets composed of water, ammonia, and methane ices, like Uranus and Neptune", - "dwarf": "Small planetary bodies that don't meet full planet criteria, like Pluto", - "super_earth": "Rocky planets larger than Earth but smaller than gas giants" - }, - "examples": [ - "terrestrial" - ] - }, - "habitabilityIndex": { - "type": "number", - "format": "float", - "minimum": 0, - "maximum": 1, - "description": "A score from 0 to 1 indicating potential habitability", - "examples": [ - 0.68 - ] - }, - "physicalProperties": { - "type": "object", - "additionalProperties": { - "x-additionalPropertiesName": "measurement", - "type": "number", - "format": "float", - "description": "Additional physical measurements for the planet" - }, - "properties": { - "mass": { - "type": "number", - "format": "float", - "exclusiveMinimum": 0, - "description": "Mass in Earth masses (must be greater than 0)", - "examples": [ - 0.107 - ] - }, - "radius": { - "type": "number", - "format": "float", - "exclusiveMinimum": 0, - "description": "Radius in Earth radii (must be greater than 0)", - "examples": [ - 0.532 - ] - }, - "gravity": { - "type": "number", - "format": "float", - "description": "Surface gravity in Earth g", - "examples": [ - 0.378 - ] - }, - "temperature": { - "type": "object", - "additionalProperties": { - "x-additionalPropertiesName": "temperatureMetric", - "type": "number", - "format": "float", - "description": "Additional temperature-related measurements in Kelvin" - }, - "properties": { - "min": { - "type": "number", - "format": "float", - "description": "Minimum temperature in Kelvin", - "examples": [ - 130 - ] - }, - "max": { - "type": "number", - "format": "float", - "description": "Maximum temperature in Kelvin", - "examples": [ - 308 - ] - }, - "average": { - "type": "number", - "format": "float", - "description": "Average temperature in Kelvin", - "examples": [ - 210 - ] - } - } - } - } - }, - "atmosphere": { - "type": "array", - "description": "Atmospheric composition", - "items": { - "type": "object", - "additionalProperties": { - "x-additionalPropertiesName": "atmosphericData", - "type": "string", - "description": "Additional atmospheric composition data" - }, - "properties": { - "compound": { - "type": "string", - "examples": [ - "CO2", - "N2" - ] - }, - "percentage": { - "type": "number", - "format": "float", - "exclusiveMaximum": 100, - "examples": [ - 95.3 - ] - } - } - } - }, - "discoveredAt": { - "type": "string", - "format": "date-time", - "examples": [ - "1610-01-07T00:00:00Z" - ] - }, - "image": { - "type": [ - "string", - "null" - ], - "examples": [ - "https://cdn.scalar.com/photos/mars.jpg" - ] - }, - "satellites": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Satellite" - } - }, - "creator": { - "$ref": "#/components/schemas/User" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "examples": [ - [ - "solar-system", - "rocky", - "explored" - ] - ] - }, - "lastUpdated": { - "type": "string", - "format": "date-time", - "readOnly": true, - "examples": [ - "2024-01-15T14:30:00Z" - ] - }, - "successCallbackUrl": { - "type": "string", - "format": "uri", - "description": "URL which gets invoked upon a successful operation", - "examples": [ - "https://example.com/webhook" - ] - }, - "failureCallbackUrl": { - "type": "string", - "format": "uri", - "description": "URL which gets invoked upon a failed operation", - "examples": [ - "https://example.com/webhook" - ] - } - } - }, - "Satellite": { - "description": "Every satellite in the Scalar Galaxy", - "type": "object", - "required": [ - "name" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "readOnly": true, - "examples": [ - 1 - ] - }, - "name": { - "type": "string", - "examples": [ - "Phobos" - ] - }, - "description": { - "type": [ - "string", - "null" - ], - "examples": [ - "Phobos is the larger and innermost of the two moons of Mars." - ] - }, - "diameter": { - "type": "number", - "format": "float", - "description": "Diameter in kilometers", - "examples": [ - 22.2 - ] - }, - "type": { - "type": "string", - "enum": [ - "moon", - "asteroid", - "comet" - ], - "x-enum-varnames": [ - "Moon", - "Asteroid", - "Comet" - ], - "x-enum-descriptions": { - "moon": "Natural satellites that orbit planets", - "asteroid": "Rocky objects that orbit the sun, typically found in the asteroid belt", - "comet": "Icy bodies that release gas when approaching the sun, creating visible tails" - }, - "examples": [ - "moon" - ] - }, - "orbit": { - "type": "object", - "properties": { - "planet": { - "$ref": "#/components/schemas/Planet" - }, - "orbitalPeriod": { - "type": "number", - "format": "float", - "description": "Orbital period in Earth days", - "examples": [ - 0.319 - ] - }, - "distance": { - "type": "number", - "format": "float", - "description": "Average distance from the planet in kilometers", - "examples": [ - 9376 - ] - } - } - } - } - }, - "PaginatedResource": { - "description": "A generic paginated resource. Specializing schemas bind the item type by declaring a `$dynamicAnchor` named `itemType`, the JSON Schema 2020-12 way to express `PaginatedResource`.", - "$id": "https://galaxy.scalar.com/schemas/PaginatedResource", - "$defs": { - "itemType": { - "$dynamicAnchor": "itemType", - "not": {} - } - }, - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$dynamicRef": "#itemType" - } - }, - "meta": { - "type": "object", - "properties": { - "limit": { - "type": "integer", - "format": "int64", - "examples": [ - 10 - ] - }, - "offset": { - "type": "integer", - "format": "int64", - "examples": [ - 0 - ] - }, - "total": { - "type": "integer", - "format": "int64", - "examples": [ - 100 - ] - }, - "next": { - "type": [ - "string", - "null" - ], - "examples": [ - "/planets?limit=10&offset=10" - ] - } - } - } - } - }, - "ImageUploadedMessage": { - "x-scalar-ignore": true, - "description": "Message about an image upload", - "type": "object", - "properties": { - "message": { - "type": "string", - "examples": [ - "Image uploaded successfully" - ] - }, - "imageUrl": { - "type": "string", - "description": "The URL where the uploaded image can be accessed", - "examples": [ - "https://cdn.scalar.com/images/8f47c132-9d1f-4f83-b5a4-91db5ee757ab.jpg" - ] - }, - "uploadedAt": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the image was uploaded", - "examples": [ - "2024-01-15T14:30:00Z" - ] - }, - "fileSize": { - "type": "integer", - "description": "Size of the uploaded image in bytes", - "examples": [ - 1048576 - ] - }, - "mimeType": { - "type": "string", - "description": "The content type of the uploaded image", - "examples": [ - "image/jpeg", - "image/png" - ] - } - } - }, - "BadRequestError": { - "x-scalar-ignore": true, - "description": "RFC 7807 (https://datatracker.ietf.org/doc/html/rfc7807)", - "type": "object", - "properties": { - "type": { - "type": "string", - "examples": [ - "https://example.com/errors/bad-request" - ] - }, - "title": { - "type": "string", - "examples": [ - "Bad Request" - ] - }, - "status": { - "type": "integer", - "format": "int64", - "examples": [ - 400 - ] - }, - "detail": { - "type": "string", - "examples": [ - "The request was invalid." - ] - } - } - }, - "ForbiddenError": { - "x-scalar-ignore": true, - "description": "Error response for forbidden access (RFC 7807). Returned when the user does not have permission to access the requested resource.", - "type": "object", - "properties": { - "type": { - "type": "string", - "examples": [ - "https://example.com/errors/forbidden" - ] - }, - "title": { - "type": "string", - "examples": [ - "Forbidden" - ] - }, - "status": { - "type": "integer", - "format": "int64", - "examples": [ - 403 - ] - }, - "detail": { - "type": "string", - "examples": [ - "You are not authorized to access this resource." - ] - } - } - }, - "NotFoundError": { - "x-scalar-ignore": true, - "description": "Error response for resource not found (RFC 7807). Returned when the requested resource does not exist.", - "type": "object", - "properties": { - "type": { - "type": "string", - "examples": [ - "https://example.com/errors/not-found" - ] - }, - "title": { - "type": "string", - "examples": [ - "Not Found" - ] - }, - "status": { - "type": "integer", - "format": "int64", - "examples": [ - 404 - ] - }, - "detail": { - "type": "string", - "examples": [ - "The resource you are trying to access does not exist." - ] - } - } - }, - "UnauthorizedError": { - "x-scalar-ignore": true, - "description": "Error response for unauthorized access (RFC 7807). Returned when authentication is required or has failed.", - "type": "object", - "properties": { - "type": { - "type": "string", - "examples": [ - "https://example.com/errors/not-found" - ] - }, - "title": { - "type": "string", - "examples": [ - "Unauthorized" - ] - }, - "status": { - "type": "integer", - "format": "int64", - "examples": [ - 401 - ] - }, - "detail": { - "type": "string", - "examples": [ - "You are not authorized to access this resource." - ] - } - } - }, - "Conflict": { - "x-scalar-ignore": true, - "description": "Error response for resource conflicts (RFC 7807). Returned when the request conflicts with the current state of the resource.", - "type": "object", - "properties": { - "type": { - "type": "string", - "examples": [ - "https://example.com/errors/conflict" - ] - }, - "title": { - "type": "string", - "examples": [ - "Conflict" - ] - }, - "status": { - "type": "integer", - "format": "int64", - "examples": [ - 409 - ] - }, - "detail": { - "type": "string", - "examples": [ - "The resource you are trying to access is in conflict." - ] - } - } - }, - "UnprocessableEntity": { - "x-scalar-ignore": true, - "description": "Error response for unprocessable entity (RFC 7807). Returned when the request is well-formed but contains semantic errors.", - "type": "object", - "properties": { - "type": { - "type": "string", - "examples": [ - "https://example.com/errors/unprocessable-entity" - ] - }, - "title": { - "type": "string", - "examples": [ - "Unprocessable Entity" - ] - }, - "status": { - "type": "integer", - "format": "int64", - "examples": [ - 422 - ] - }, - "detail": { - "type": "string", - "examples": [ - "The request was invalid." - ] - } - } - }, - "TooManyRequestsError": { - "x-scalar-ignore": true, - "description": "Error response for rate limiting (RFC 7807). Returned when the client has exceeded the rate limit for requests.", - "type": "object", - "properties": { - "type": { - "type": "string", - "examples": [ - "https://example.com/errors/too-many-requests" - ] - }, - "title": { - "type": "string", - "examples": [ - "Too Many Requests" - ] - }, - "status": { - "type": "integer", - "format": "int64", - "examples": [ - 429 - ] - }, - "detail": { - "type": "string", - "examples": [ - "Rate limit exceeded. Please try again later." - ] - } - } - } - } - } -} diff --git a/scalar-sdk.manifest.json b/scalar-sdk.manifest.json index 7a34d9e..2cf7675 100644 --- a/scalar-sdk.manifest.json +++ b/scalar-sdk.manifest.json @@ -1,7 +1,7 @@ { "name": "ScalarGalaxy", "slug": "scalarGalaxy", - "generatorVersion": "0.27.0", + "generatorVersion": "0.27.2", "servers": [ "https://galaxy.scalar.com", "{protocol}://void.scalar.com/{path}" From 988f4f1baddcf265f99ded5fb0ab0672acba74ce Mon Sep 17 00:00:00 2001 From: scalarbot Date: Fri, 28 Aug 2026 17:19:02 +0000 Subject: [PATCH 05/11] feat(api)!: remove operation planets.uploadImage (+6 more changes) - Regenerated with generator `0.30.1` (previously `0.27.2`). - Added operation `planets.delteImage` (`POST /planets/{planetId}/image`). - Removed operation `planets.uploadImage` (`POST /planets/{planetId}/image`). - Added schema `DelteImageResponseHeaders`. - Added schema `DelteImageStatus400ResponseHeaders`. - Removed schema `UploadImageResponseHeaders`. - Removed schema `UploadImageStatus400ResponseHeaders`. BREAKING CHANGE: 3 breaking changes to the SDK surface. - Removed operation `planets.uploadImage` (`POST /planets/{planetId}/image`). - Removed schema `UploadImageResponseHeaders`. - Removed schema `UploadImageStatus400ResponseHeaders`. Build: kCCEoZ6AaOmrdYOWVhq7l --- api.md | 6 +- scalar-sdk.manifest.json | 20 +-- src/scalar_galaxy/_version.py | 2 +- src/scalar_galaxy/resources/planets.py | 44 ++--- src/scalar_galaxy/types/__init__.py | 4 +- ...params.py => planet_delte_image_params.py} | 4 +- ...onse.py => planet_delte_image_response.py} | 4 +- tests/smoke-test.py | 168 +++++++++++++++--- 8 files changed, 184 insertions(+), 68 deletions(-) rename src/scalar_galaxy/types/{planet_upload_image_params.py => planet_delte_image_params.py} (72%) rename src/scalar_galaxy/types/{planet_upload_image_response.py => planet_delte_image_response.py} (89%) diff --git a/api.md b/api.md index 8132371..7c4076f 100644 --- a/api.md +++ b/api.md @@ -111,11 +111,11 @@ Got a crazy good photo of a planet? Share it with the world! | Direction | Type | | --- | --- | -| Request | [`PlanetUploadImageParams`](./src/scalar_galaxy/types/planet_upload_image_params.py) | -| Response | [`PlanetUploadImageResponse`](./src/scalar_galaxy/types/planet_upload_image_response.py) | +| Request | [`PlanetDelteImageParams`](./src/scalar_galaxy/types/planet_delte_image_params.py) | +| Response | [`PlanetDelteImageResponse`](./src/scalar_galaxy/types/planet_delte_image_response.py) | ```python -planet = client.planets.upload_image( +planet = client.planets.delte_image( planet_id=1, ) ``` diff --git a/scalar-sdk.manifest.json b/scalar-sdk.manifest.json index 2cf7675..36efabe 100644 --- a/scalar-sdk.manifest.json +++ b/scalar-sdk.manifest.json @@ -1,7 +1,7 @@ { "name": "ScalarGalaxy", "slug": "scalarGalaxy", - "generatorVersion": "0.27.2", + "generatorVersion": "0.30.1", "servers": [ "https://galaxy.scalar.com", "{protocol}://void.scalar.com/{path}" @@ -1202,8 +1202,8 @@ } }, { - "name": "UploadImageResponseHeaders", - "source": "UploadImageResponseHeaders", + "name": "DelteImageResponseHeaders", + "source": "DelteImageResponseHeaders", "publicAliases": [], "deprecated": false, "type": { @@ -1235,8 +1235,8 @@ } }, { - "name": "UploadImageStatus400ResponseHeaders", - "source": "UploadImageStatus400ResponseHeaders", + "name": "DelteImageStatus400ResponseHeaders", + "source": "DelteImageStatus400ResponseHeaders", "publicAliases": [], "deprecated": false, "type": { @@ -2188,8 +2188,8 @@ { "resource": "planets", "publicResource": "planets", - "operation": "uploadImage", - "publicOperation": "uploadImage", + "operation": "delteImage", + "publicOperation": "delteImage", "deprecated": false, "method": "POST", "path": "/planets/{planetId}/image", @@ -2229,7 +2229,7 @@ "publicCookieParams": [], "cookieParamDetails": [], "paramsModel": { - "publicName": "PlanetUploadImageParams" + "publicName": "PlanetDelteImageParams" }, "requestBody": { "contentType": "multipart/form-data", @@ -2260,7 +2260,7 @@ ] }, "responseHeadersModel": { - "name": "UploadImageResponseHeaders", + "name": "DelteImageResponseHeaders", "publicAliases": [] }, "result": { @@ -2287,7 +2287,7 @@ } ], "headersModel": { - "name": "UploadImageStatus400ResponseHeaders", + "name": "DelteImageStatus400ResponseHeaders", "publicAliases": [] } }, diff --git a/src/scalar_galaxy/_version.py b/src/scalar_galaxy/_version.py index 9512f26..ac0cb05 100644 --- a/src/scalar_galaxy/_version.py +++ b/src/scalar_galaxy/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Scalar. See README.md for details. __title__ = "scalarGalaxy" -__version__ = "0.1.0" # x-release-please-version +__version__ = "0.2.1" # x-release-please-version diff --git a/src/scalar_galaxy/resources/planets.py b/src/scalar_galaxy/resources/planets.py index 82724f2..d2e1d20 100644 --- a/src/scalar_galaxy/resources/planets.py +++ b/src/scalar_galaxy/resources/planets.py @@ -22,10 +22,10 @@ ) from .._base_client import make_request_options from ..types.planet_list_all_data_response import PlanetListAllDataResponse -from ..types import planet_list_all_data_params, planet_create_params, planet_update_params, planet_upload_image_params +from ..types import planet_list_all_data_params, planet_create_params, planet_update_params, planet_delte_image_params from ..types.planet import Planet from ..types.user_param import UserParam -from ..types.planet_upload_image_response import PlanetUploadImageResponse +from ..types.planet_delte_image_response import PlanetDelteImageResponse __all__ = ["PlanetsResource", "AsyncPlanetsResource"] @@ -337,7 +337,7 @@ def delete( cast_to=NoneType, ) - def upload_image( + def delte_image( self, planet_id: int, *, @@ -348,7 +348,7 @@ def upload_image( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> PlanetUploadImageResponse: + ) -> PlanetDelteImageResponse: """ Got a crazy good photo of a planet? Share it with the world! @@ -361,11 +361,11 @@ def upload_image( timeout: Override the client-level default timeout for this request, in seconds. Returns: - PlanetUploadImageResponse: Image uploaded + PlanetDelteImageResponse: Image uploaded Example: ```python - planet = client.planets.upload_image( + planet = client.planets.delte_image( planet_id=1, ) ``` @@ -382,12 +382,12 @@ def upload_image( extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._post( path_template("/planets/{planetId}/image", **{"planetId": planet_id}), - body=maybe_transform(body, planet_upload_image_params.PlanetUploadImageParams), + body=maybe_transform(body, planet_delte_image_params.PlanetDelteImageParams), files=files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PlanetUploadImageResponse, + cast_to=PlanetDelteImageResponse, ) @@ -698,7 +698,7 @@ async def delete( cast_to=NoneType, ) - async def upload_image( + async def delte_image( self, planet_id: int, *, @@ -709,7 +709,7 @@ async def upload_image( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> PlanetUploadImageResponse: + ) -> PlanetDelteImageResponse: """ Got a crazy good photo of a planet? Share it with the world! @@ -722,11 +722,11 @@ async def upload_image( timeout: Override the client-level default timeout for this request, in seconds. Returns: - PlanetUploadImageResponse: Image uploaded + PlanetDelteImageResponse: Image uploaded Example: ```python - planet = await client.planets.upload_image( + planet = await client.planets.delte_image( planet_id=1, ) ``` @@ -743,12 +743,12 @@ async def upload_image( extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._post( path_template("/planets/{planetId}/image", **{"planetId": planet_id}), - body=await async_maybe_transform(body, planet_upload_image_params.PlanetUploadImageParams), + body=await async_maybe_transform(body, planet_delte_image_params.PlanetDelteImageParams), files=files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PlanetUploadImageResponse, + cast_to=PlanetDelteImageResponse, ) @@ -771,8 +771,8 @@ def __init__(self, planets: PlanetsResource) -> None: self.delete = to_raw_response_wrapper( planets.delete, ) - self.upload_image = to_raw_response_wrapper( - planets.upload_image, + self.delte_image = to_raw_response_wrapper( + planets.delte_image, ) @@ -795,8 +795,8 @@ def __init__(self, planets: AsyncPlanetsResource) -> None: self.delete = async_to_raw_response_wrapper( planets.delete, ) - self.upload_image = async_to_raw_response_wrapper( - planets.upload_image, + self.delte_image = async_to_raw_response_wrapper( + planets.delte_image, ) @@ -819,8 +819,8 @@ def __init__(self, planets: PlanetsResource) -> None: self.delete = to_streamed_response_wrapper( planets.delete, ) - self.upload_image = to_streamed_response_wrapper( - planets.upload_image, + self.delte_image = to_streamed_response_wrapper( + planets.delte_image, ) @@ -843,6 +843,6 @@ def __init__(self, planets: AsyncPlanetsResource) -> None: self.delete = async_to_streamed_response_wrapper( planets.delete, ) - self.upload_image = async_to_streamed_response_wrapper( - planets.upload_image, + self.delte_image = async_to_streamed_response_wrapper( + planets.delte_image, ) diff --git a/src/scalar_galaxy/types/__init__.py b/src/scalar_galaxy/types/__init__.py index b9a8e9b..f0cc61b 100644 --- a/src/scalar_galaxy/types/__init__.py +++ b/src/scalar_galaxy/types/__init__.py @@ -19,8 +19,8 @@ from .planet_list_all_data_params import PlanetListAllDataParams as PlanetListAllDataParams from .planet_create_params import PlanetCreateParams as PlanetCreateParams from .planet_update_params import PlanetUpdateParams as PlanetUpdateParams -from .planet_upload_image_response import PlanetUploadImageResponse as PlanetUploadImageResponse -from .planet_upload_image_params import PlanetUploadImageParams as PlanetUploadImageParams +from .planet_delte_image_response import PlanetDelteImageResponse as PlanetDelteImageResponse +from .planet_delte_image_params import PlanetDelteImageParams as PlanetDelteImageParams from .celestial_body_create_response import CelestialBodyCreateResponse as CelestialBodyCreateResponse from .celestial_body_create_params import CelestialBodyCreateParams as CelestialBodyCreateParams from .authentication_create_user_params import AuthenticationCreateUserParams as AuthenticationCreateUserParams diff --git a/src/scalar_galaxy/types/planet_upload_image_params.py b/src/scalar_galaxy/types/planet_delte_image_params.py similarity index 72% rename from src/scalar_galaxy/types/planet_upload_image_params.py rename to src/scalar_galaxy/types/planet_delte_image_params.py index f23dd80..d09eb62 100644 --- a/src/scalar_galaxy/types/planet_upload_image_params.py +++ b/src/scalar_galaxy/types/planet_delte_image_params.py @@ -5,9 +5,9 @@ from typing_extensions import TypedDict from .._types import FileTypes -__all__ = ["PlanetUploadImageParams"] +__all__ = ["PlanetDelteImageParams"] -class PlanetUploadImageParams(TypedDict, total=False): +class PlanetDelteImageParams(TypedDict, total=False): image: FileTypes """The image file to upload""" diff --git a/src/scalar_galaxy/types/planet_upload_image_response.py b/src/scalar_galaxy/types/planet_delte_image_response.py similarity index 89% rename from src/scalar_galaxy/types/planet_upload_image_response.py rename to src/scalar_galaxy/types/planet_delte_image_response.py index f5dc345..9e48e7c 100644 --- a/src/scalar_galaxy/types/planet_upload_image_response.py +++ b/src/scalar_galaxy/types/planet_delte_image_response.py @@ -7,10 +7,10 @@ from .._models import BaseModel -__all__ = ["PlanetUploadImageResponse"] +__all__ = ["PlanetDelteImageResponse"] -class PlanetUploadImageResponse(BaseModel): +class PlanetDelteImageResponse(BaseModel): message: Optional[str] = None image_url: Optional[str] = FieldInfo(alias="imageUrl", default=None) diff --git a/tests/smoke-test.py b/tests/smoke-test.py index e7e85b1..07fd5a9 100644 --- a/tests/smoke-test.py +++ b/tests/smoke-test.py @@ -25,18 +25,26 @@ class SmokeResult(TypedDict, total=False): operation: str method: str path: str + label: str status: str durationMs: int error: str -class SmokeCase(TypedDict): +class _SmokeCaseBase(TypedDict): operation: str method: str path: str run: Callable[[], Any] +# `label` says which of an operation's two calls this is — "required params" or "all params". +# It sits in a total=False extension because it is absent when the operation contributed a +# single case, while the fields above are always present. +class SmokeCase(_SmokeCaseBase, total=False): + label: str + + def _smoke_case_0() -> None: planet = client.planets.list_all_data( limit=10, @@ -51,37 +59,99 @@ def _smoke_case_1() -> None: def _smoke_case_2() -> None: + planet = client.planets.create( + name="Mars", + description="The red planet", + type="terrestrial", + habitability_index=0.68, + physical_properties={"mass": 0.107, "radius": 0.532, "gravity": 0.378, "temperature": {}}, + atmosphere=[], + discovered_at="1610-01-07T00:00:00Z", + image="https://cdn.scalar.com/photos/mars.jpg", + satellites=[], + creator={"name": "Marc"}, + tags=[], + success_callback_url="https://example.com/webhook", + failure_callback_url="https://example.com/webhook", + ) + + +def _smoke_case_3() -> None: planet = client.planets.retrieve( planet_id=1, ) -def _smoke_case_3() -> None: +def _smoke_case_4() -> None: planet = client.planets.update( planet_id=1, name="Mars", ) -def _smoke_case_4() -> None: +def _smoke_case_5() -> None: + planet = client.planets.update( + planet_id=1, + name="Mars", + description="The red planet", + type="terrestrial", + habitability_index=0.68, + physical_properties={"mass": 0.107, "radius": 0.532, "gravity": 0.378, "temperature": {}}, + atmosphere=[], + discovered_at="1610-01-07T00:00:00Z", + image="https://cdn.scalar.com/photos/mars.jpg", + satellites=[], + creator={"name": "Marc"}, + tags=[], + success_callback_url="https://example.com/webhook", + failure_callback_url="https://example.com/webhook", + ) + + +def _smoke_case_6() -> None: client.planets.delete( planet_id=1, ) -def _smoke_case_5() -> None: - planet = client.planets.upload_image( +def _smoke_case_7() -> None: + planet = client.planets.delte_image( planet_id=1, ) -def _smoke_case_6() -> None: +def _smoke_case_8() -> None: + planet = client.planets.delte_image( + planet_id=1, + image=b"@mars.jpg", + ) + + +def _smoke_case_9() -> None: celestial_body = client.celestial_bodies.create( name="Mars", ) -def _smoke_case_7() -> None: +def _smoke_case_10() -> None: + celestial_body = client.celestial_bodies.create( + name="Mars", + description="The red planet", + type="terrestrial", + habitability_index=0.68, + physical_properties={"mass": 0.107, "radius": 0.532, "gravity": 0.378, "temperature": {}}, + atmosphere=[], + discovered_at="1610-01-07T00:00:00Z", + image="https://cdn.scalar.com/photos/mars.jpg", + satellites=[], + creator={"name": "Marc"}, + tags=[], + success_callback_url="https://example.com/webhook", + failure_callback_url="https://example.com/webhook", + ) + + +def _smoke_case_11() -> None: authentication = client.authentication.create_user( name="Marc", email="marc@scalar.com", @@ -89,14 +159,14 @@ def _smoke_case_7() -> None: ) -def _smoke_case_8() -> None: +def _smoke_case_12() -> None: authentication = client.authentication.create_token( email="marc@scalar.com", password="i-love-scalar", ) -def _smoke_case_9() -> None: +def _smoke_case_13() -> None: authentication = client.authentication.list_me() @@ -111,55 +181,87 @@ def _smoke_case_9() -> None: "operation": "create", "method": "POST", "path": "/planets", + "label": "required params", "run": _smoke_case_1, }, + { + "operation": "create", + "method": "POST", + "path": "/planets", + "label": "all params", + "run": _smoke_case_2, + }, { "operation": "retrieve", "method": "GET", "path": "/planets/{planetId}", - "run": _smoke_case_2, + "run": _smoke_case_3, }, { "operation": "update", "method": "PUT", "path": "/planets/{planetId}", - "run": _smoke_case_3, + "label": "required params", + "run": _smoke_case_4, + }, + { + "operation": "update", + "method": "PUT", + "path": "/planets/{planetId}", + "label": "all params", + "run": _smoke_case_5, }, { "operation": "delete", "method": "DELETE", "path": "/planets/{planetId}", - "run": _smoke_case_4, + "run": _smoke_case_6, }, { - "operation": "uploadImage", + "operation": "delteImage", "method": "POST", "path": "/planets/{planetId}/image", - "run": _smoke_case_5, + "label": "required params", + "run": _smoke_case_7, + }, + { + "operation": "delteImage", + "method": "POST", + "path": "/planets/{planetId}/image", + "label": "all params", + "run": _smoke_case_8, }, { "operation": "create", "method": "POST", "path": "/celestial-bodies", - "run": _smoke_case_6, + "label": "required params", + "run": _smoke_case_9, + }, + { + "operation": "create", + "method": "POST", + "path": "/celestial-bodies", + "label": "all params", + "run": _smoke_case_10, }, { "operation": "createUser", "method": "POST", "path": "/user/signup", - "run": _smoke_case_7, + "run": _smoke_case_11, }, { "operation": "createToken", "method": "POST", "path": "/auth/token", - "run": _smoke_case_8, + "run": _smoke_case_12, }, { "operation": "listMe", "method": "GET", "path": "/me", - "run": _smoke_case_9, + "run": _smoke_case_13, }, ] @@ -186,22 +288,33 @@ def _smoke_concurrency(case_count: int) -> int: return min(DEFAULT_SMOKE_CONCURRENCY, case_count) +def _case_identity(case: SmokeCase) -> SmokeResult: + # `label` is carried through only when the operation contributed both of its calls, so a + # single-case operation reports exactly as it did before there were two. + identity: SmokeResult = { + "operation": case["operation"], + "method": case["method"], + "path": case["path"], + } + label = case.get("label") + if label: + identity["label"] = label + return identity + + def _run_case(case: SmokeCase) -> SmokeResult: started_at = time.monotonic() + identity = _case_identity(case) try: case["run"]() return { - "operation": case["operation"], - "method": case["method"], - "path": case["path"], + **identity, "status": "passed", "durationMs": int((time.monotonic() - started_at) * 1000), } except Exception: return { - "operation": case["operation"], - "method": case["method"], - "path": case["path"], + **identity, "status": "failed", "durationMs": int((time.monotonic() - started_at) * 1000), "error": traceback.format_exc(), @@ -226,11 +339,14 @@ def main() -> None: ) else: for result in results: + suffix = f" [{result['label']}]" if result.get("label") else "" if result["status"] == "passed": - print(f"PASS {result['operation']} ({result['method']} {result['path']}) {result['durationMs']}ms") + print( + f"PASS {result['operation']}{suffix} ({result['method']} {result['path']}) {result['durationMs']}ms" + ) else: print( - f"FAIL {result['operation']} ({result['method']} {result['path']})\n{result.get('error', '')}", + f"FAIL {result['operation']}{suffix} ({result['method']} {result['path']})\n{result.get('error', '')}", file=sys.stderr, ) if not results: From 82b71a4001d4d3aee107eaf80886c49ee35a255f Mon Sep 17 00:00:00 2001 From: scalarbot Date: Fri, 28 Aug 2026 17:30:17 +0000 Subject: [PATCH 06/11] chore(api): update generated SDK content 3 generated files changed with no detected API surface change (documentation, examples, or file content). Build: m9TTq4lm0y4ma5jsjbhpp --- .github/workflows/release-please.yml | 36 ++++++++++++++++++++++++++++ .github/workflows/sdk-release.yml | 34 ++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/sdk-release.yml diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index e08c57a..374ce63 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -55,3 +55,39 @@ jobs: git checkout -B scalar-next origin/scalar-next git merge --no-edit -m "Sync release ${{ steps.release.outputs.tag_name }} back to scalar-next" "${{ steps.release.outputs.sha }}" git push origin scalar-next + publish: + needs: release-please + # `!cancelled()` keeps publishing even when the back-sync to the integration branch + # failed: a raced integration branch must not block the release from reaching its + # registry. + if: ${{ !cancelled() && needs.release-please.outputs.release_created == 'true' }} + runs-on: ubuntu-latest + # Job-level permissions replace the workflow's release-cutting grants with the publish + # floor. OIDC trusted publishing verifies this run's claims, which name this workflow + # file — register release-please.yml as the trusted publisher on the registry. + permissions: + contents: read + id-token: write + packages: write + env: + VERSIONING_POLICY: manual + steps: + # Publishing runs inline — a top-level job of this same run — rather than dispatching + # sdk-release.yml: workflow_dispatch resolves the target workflow on the repository's + # default branch only, so a dispatch would 404 whenever the release line is any other + # branch, while OIDC trusted publishing accepts this job because it stays top-level + # (never a reusable-workflow call). The release-please job cut the tag earlier in this + # run; checking it out publishes exactly the released commit, not the branch head that + # triggered the workflow. + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + ref: ${{ needs.release-please.outputs.tag_name }} + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: "3.11" + - run: python -m pip install --upgrade build + - run: python -m build + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 + with: + skip-existing: true diff --git a/.github/workflows/sdk-release.yml b/.github/workflows/sdk-release.yml new file mode 100644 index 0000000..123442c --- /dev/null +++ b/.github/workflows/sdk-release.yml @@ -0,0 +1,34 @@ +name: Python SDK Release + +on: + # Manual re-publish only: the automated publish for each release runs as the `publish` job + # inside release-please.yml, in the same run that cuts the tag (dispatching a workflow here + # instead would resolve it on the repository's default branch only, which breaks releasing + # from any other release line). Dispatch this workflow at an existing release tag to re-run + # a failed or skipped publish. A dispatched run is top-level, so OIDC trusted-publisher + # claims name this file; register it as an additional trusted publisher only when manual + # re-publishes are used. Never add a workflow_call trigger here — registries reject + # publishes from called (reusable) workflows. + workflow_dispatch: + +permissions: + contents: read + id-token: write + packages: write + +jobs: + release: + runs-on: ubuntu-latest + env: + VERSIONING_POLICY: manual + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: "3.11" + - run: python -m pip install --upgrade build + - run: python -m build + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 + with: + skip-existing: true From ea460eb3b604fa91f07a13037c1c23dbd6e7ff46 Mon Sep 17 00:00:00 2001 From: scalarbot Date: Fri, 28 Aug 2026 17:47:34 +0000 Subject: [PATCH 07/11] feat(api)!: update SDK surface (2 changes) - Added environment `void` (`https://void.scalar.com/`). - Removed environment `responds_with_your_request_data`. BREAKING CHANGE: Removed environment `responds_with_your_request_data`. Build: mcpGSRzEJ7YsqyKHHqTdb --- scalar-sdk.manifest.json | 4 ++-- src/scalar_galaxy/_client.py | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scalar-sdk.manifest.json b/scalar-sdk.manifest.json index 36efabe..2a801e0 100644 --- a/scalar-sdk.manifest.json +++ b/scalar-sdk.manifest.json @@ -8,11 +8,11 @@ ], "environments": { "production": "https://galaxy.scalar.com", - "responds_with_your_request_data": "{protocol}://void.scalar.com/{path}" + "void": "https://void.scalar.com/" }, "environmentOrder": [ "production", - "responds_with_your_request_data" + "void" ], "auth": [ "bearer", diff --git a/src/scalar_galaxy/_client.py b/src/scalar_galaxy/_client.py index e41e313..c1e3e74 100644 --- a/src/scalar_galaxy/_client.py +++ b/src/scalar_galaxy/_client.py @@ -46,7 +46,7 @@ ENVIRONMENTS: dict[str, str] = { "production": "https://galaxy.scalar.com", - "responds_with_your_request_data": "{protocol}://void.scalar.com/{path}", + "void": "https://void.scalar.com/", } __all__ = [ @@ -74,7 +74,7 @@ class Galaxy(SyncAPIClient): open_id_connect: str | None webhook_secret: str | None - _environment: Literal["production", "responds_with_your_request_data"] | NotGiven + _environment: Literal["production", "void"] | NotGiven def __init__( self, @@ -88,7 +88,7 @@ def __init__( o_auth2: str | None = None, open_id_connect: str | None = None, webhook_secret: str | None = None, - environment: Literal["production", "responds_with_your_request_data"] | NotGiven = not_given, + environment: Literal["production", "void"] | NotGiven = not_given, base_url: str | httpx.URL | None | NotGiven = not_given, timeout: float | Timeout | None | NotGiven = not_given, max_retries: int = DEFAULT_MAX_RETRIES, @@ -373,7 +373,7 @@ def copy( o_auth2: str | None = None, open_id_connect: str | None = None, webhook_secret: str | None = None, - environment: Literal["production", "responds_with_your_request_data"] | None = None, + environment: Literal["production", "void"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.Client | None = None, @@ -460,7 +460,7 @@ class AsyncGalaxy(AsyncAPIClient): open_id_connect: str | None webhook_secret: str | None - _environment: Literal["production", "responds_with_your_request_data"] | NotGiven + _environment: Literal["production", "void"] | NotGiven def __init__( self, @@ -474,7 +474,7 @@ def __init__( o_auth2: str | None = None, open_id_connect: str | None = None, webhook_secret: str | None = None, - environment: Literal["production", "responds_with_your_request_data"] | NotGiven = not_given, + environment: Literal["production", "void"] | NotGiven = not_given, base_url: str | httpx.URL | None | NotGiven = not_given, timeout: float | Timeout | None | NotGiven = not_given, max_retries: int = DEFAULT_MAX_RETRIES, @@ -759,7 +759,7 @@ def copy( o_auth2: str | None = None, open_id_connect: str | None = None, webhook_secret: str | None = None, - environment: Literal["production", "responds_with_your_request_data"] | None = None, + environment: Literal["production", "void"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.AsyncClient | None = None, From 39f800dceb4381e9ecadf9c4d3aa3269c77161bf Mon Sep 17 00:00:00 2001 From: scalarbot Date: Fri, 28 Aug 2026 17:55:52 +0000 Subject: [PATCH 08/11] chore(api): update generated SDK content 1 generated file changed with no detected API surface change (documentation, examples, or file content). Build: Lfhf8SyffSnC9rNUrM1Fr --- src/scalar_galaxy/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scalar_galaxy/_version.py b/src/scalar_galaxy/_version.py index ac0cb05..30c8c73 100644 --- a/src/scalar_galaxy/_version.py +++ b/src/scalar_galaxy/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Scalar. See README.md for details. __title__ = "scalarGalaxy" -__version__ = "0.2.1" # x-release-please-version +__version__ = "0.3.0" # x-release-please-version From c9ecb1505b78dae1c365af49b3471faad18e48b6 Mon Sep 17 00:00:00 2001 From: scalarbot Date: Fri, 28 Aug 2026 23:58:17 +0000 Subject: [PATCH 09/11] chore(api): regenerate SDK - Regenerated with generator `0.31.1` (previously `0.30.1`). Build: bpLGhSyRAVMHm0HIVD40M --- scalar-sdk.manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scalar-sdk.manifest.json b/scalar-sdk.manifest.json index 2a801e0..faf7e4a 100644 --- a/scalar-sdk.manifest.json +++ b/scalar-sdk.manifest.json @@ -1,7 +1,7 @@ { "name": "ScalarGalaxy", "slug": "scalarGalaxy", - "generatorVersion": "0.30.1", + "generatorVersion": "0.31.1", "servers": [ "https://galaxy.scalar.com", "{protocol}://void.scalar.com/{path}" From c83f53eacd51c58ddd59f4ec94693f947b71694a Mon Sep 17 00:00:00 2001 From: scalarbot Date: Tue, 1 Sep 2026 21:27:40 +0000 Subject: [PATCH 10/11] chore(api): regenerate SDK - Regenerated with generator `0.32.0` (previously `0.31.1`). Build: 91iFVED2NgCyYZ7u68nAC --- scalar-sdk.manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scalar-sdk.manifest.json b/scalar-sdk.manifest.json index faf7e4a..f5957b4 100644 --- a/scalar-sdk.manifest.json +++ b/scalar-sdk.manifest.json @@ -1,7 +1,7 @@ { "name": "ScalarGalaxy", "slug": "scalarGalaxy", - "generatorVersion": "0.31.1", + "generatorVersion": "0.32.0", "servers": [ "https://galaxy.scalar.com", "{protocol}://void.scalar.com/{path}" From 11dcec3c09b537e707cc8cb9fd51df3ffaa016d9 Mon Sep 17 00:00:00 2001 From: "scalar-docs[bot]" <148485328+scalar-docs[bot]@users.noreply.github.com> Date: Wed, 2 Sep 2026 02:30:17 +0000 Subject: [PATCH 11/11] release: 0.3.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ pyproject.toml | 2 +- src/scalar_galaxy/_version.py | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0ee8c01..816df2d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.3.0" + ".": "0.3.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index dc07b8c..9792a3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [0.3.1](https://github.com/scalar/galaxy-python/compare/v0.3.0...v0.3.1) (2026-09-02) + + +### Chores + +* **api:** regenerate SDK ([c83f53e](https://github.com/scalar/galaxy-python/commit/c83f53eacd51c58ddd59f4ec94693f947b71694a)) +* **api:** regenerate SDK ([c9ecb15](https://github.com/scalar/galaxy-python/commit/c9ecb1505b78dae1c365af49b3471faad18e48b6)) +* **api:** update generated SDK content ([39f800d](https://github.com/scalar/galaxy-python/commit/39f800dceb4381e9ecadf9c4d3aa3269c77161bf)) + ## [0.3.0](https://github.com/scalar/galaxy-python/compare/v0.2.1...v0.3.0) (2026-08-28) diff --git a/pyproject.toml b/pyproject.toml index 7116b1d..0cd6a90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "scalar-galaxy" -version = "0.3.0" # x-release-please-version +version = "0.3.1" # x-release-please-version description = "The Scalar Galaxy is an example OpenAPI document to test OpenAPI tools and libraries. It's a fictional universe with fictional planets and fictional data." readme = "README.md" license = "Apache-2.0" diff --git a/src/scalar_galaxy/_version.py b/src/scalar_galaxy/_version.py index 30c8c73..58cf69a 100644 --- a/src/scalar_galaxy/_version.py +++ b/src/scalar_galaxy/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Scalar. See README.md for details. __title__ = "scalarGalaxy" -__version__ = "0.3.0" # x-release-please-version +__version__ = "0.3.1" # x-release-please-version