From 991c21c7e3086254eb0f053cd1f6753405af4cd1 Mon Sep 17 00:00:00 2001 From: Gabriel Fonseca Date: Fri, 9 Oct 2026 14:52:56 +0100 Subject: [PATCH] feat(sandbox)!: remove sandbox service endpoints Remove the sandbox clients, route constants, and public accessor, and update the contract inventory and API docs. BREAKING CHANGE: remove Frontal.sandbox() and the SandboxClient and SandboxLanguagesClient APIs. --- contracts/reports/conformance.json | 8 +- contracts/reports/migration-matrix.md | 6 +- contracts/sdk-endpoints.json | 14 -- .../dev/frontal/sdk/models/ApiService.java | 1 - docs/api/README.md | 1 - docs/api/methods-as-code.md | 8 -- docs/api/sandbox.md | 22 --- scripts/check_contracts.py | 8 +- scripts/generate_endpoints.py | 1 - .../java/dev/frontal/sdk/api/Frontal.java | 5 - .../dev/frontal/sdk/resources/Endpoints.java | 14 -- .../frontal/sdk/resources/SandboxClient.java | 133 ------------------ .../sdk/resources/SandboxLanguagesClient.java | 62 -------- 13 files changed, 11 insertions(+), 272 deletions(-) delete mode 100644 docs/api/sandbox.md delete mode 100644 services/src/main/java/dev/frontal/sdk/resources/SandboxClient.java delete mode 100644 services/src/main/java/dev/frontal/sdk/resources/SandboxLanguagesClient.java diff --git a/contracts/reports/conformance.json b/contracts/reports/conformance.json index 2375227..3e13ad9 100644 --- a/contracts/reports/conformance.json +++ b/contracts/reports/conformance.json @@ -2,9 +2,9 @@ "repository": "sdk-java", "language": "Java", "status": "named-operations", - "contractEndpointEntries": 622, - "generatedEndpointConstants": 611, - "namedOperationMethods": 611, - "supportedRouteCoverage": "611/622", + "contractEndpointEntries": 619, + "generatedEndpointConstants": 608, + "namedOperationMethods": 608, + "supportedRouteCoverage": "608/619", "note": "Endpoint constants and named operations cover SDK service routes. Payloads without usable schemas retain caller-provided JSON and response types." } diff --git a/contracts/reports/migration-matrix.md b/contracts/reports/migration-matrix.md index c006549..576e9aa 100644 --- a/contracts/reports/migration-matrix.md +++ b/contracts/reports/migration-matrix.md @@ -4,9 +4,9 @@ _Status: generated route catalog and named operation surface complete. Typed mod | Metric | Value | | --- | ---: | -| Contract endpoint entries | 622 | -| Generated endpoint constants | 611 | -| Named operation methods for supported routes | 611 | +| Contract endpoint entries | 619 | +| Generated endpoint constants | 608 | +| Named operation methods for supported routes | 608 | | Contract routes omitted from the SDK surface | 11 | | Operation-specific payload schemas usable | Limited by committed contract snapshots | diff --git a/contracts/sdk-endpoints.json b/contracts/sdk-endpoints.json index e040f12..6f75ded 100644 --- a/contracts/sdk-endpoints.json +++ b/contracts/sdk-endpoints.json @@ -2146,20 +2146,6 @@ } ], "react": [], - "sandbox": [ - { - "method": "GET", - "path": "/sandbox/languages" - }, - { - "method": "POST", - "path": "/sandbox/self-test" - }, - { - "method": "POST", - "path": "/sandbox/submit" - } - ], "schedules": [ { "method": "DELETE", diff --git a/core/src/main/java/dev/frontal/sdk/models/ApiService.java b/core/src/main/java/dev/frontal/sdk/models/ApiService.java index 74246aa..babcfd6 100644 --- a/core/src/main/java/dev/frontal/sdk/models/ApiService.java +++ b/core/src/main/java/dev/frontal/sdk/models/ApiService.java @@ -16,7 +16,6 @@ public enum ApiService { ONTOLOGY("ontology"), PIPELINES("pipelines"), REACT("react"), - SANDBOX("sandbox"), SCHEDULES("schedules"), WEBHOOKS("webhooks"), WORKFLOWS("workflows"), diff --git a/docs/api/README.md b/docs/api/README.md index 8e9215f..e1d401d 100644 --- a/docs/api/README.md +++ b/docs/api/README.md @@ -24,7 +24,6 @@ Call-shaped listing of every operation: [methods as code](./methods-as-code.md). | pipelines | 11 | [pipelines](./pipelines.md) | | providers | 1 | [providers](./providers.md) | | react | 0 | [react](./react.md) | -| sandbox | 3 | [sandbox](./sandbox.md) | | schedules | 10 | [schedules](./schedules.md) | | webhook-endpoints | 7 | [webhook-endpoints](./webhook-endpoints.md) | | webhooks | 10 | [webhooks](./webhooks.md) | diff --git a/docs/api/methods-as-code.md b/docs/api/methods-as-code.md index 28c2f55..fbc1076 100644 --- a/docs/api/methods-as-code.md +++ b/docs/api/methods-as-code.md @@ -646,14 +646,6 @@ client.providers().get(providerSlug, responseType); ```java ``` -## sandbox - -```java -client.sandbox().createSelfTest(body, responseType); -client.sandbox().submit(body, responseType); -client.sandbox().languages().list(responseType); -``` - ## schedules ```java diff --git a/docs/api/sandbox.md b/docs/api/sandbox.md deleted file mode 100644 index bddf2ec..0000000 --- a/docs/api/sandbox.md +++ /dev/null @@ -1,22 +0,0 @@ -# Sandbox API - -Service accessor: `frontal.sandbox()` (`SandboxClient`). - -Operations are grouped by resource path. Collection methods use `list` and `create`; item methods use `get`, `update`, and `delete`. Calls can omit `QueryParams` when no query values are needed. Use contract-defined `JsonNode` bodies and caller-selected response types where schemas are not available. - -| Method | HTTP | Route | Parameters | Response | -| --- | --- | --- | --- | --- | -| `sandbox().createSelfTest(...)` | `POST` | `/sandbox/self-test` | `QueryParams query, @Nullable JsonNode body, Class responseType` | `@Nullable T` | -| `sandbox().createSelfTest(...)` | `POST` | `/sandbox/self-test` | `QueryParams query, @Nullable JsonNode body, TypeReference responseType` | `@Nullable T` | -| `sandbox().createSelfTest(...)` | `POST` | `/sandbox/self-test` | `@Nullable JsonNode body, Class responseType` | `@Nullable T` | -| `sandbox().createSelfTest(...)` | `POST` | `/sandbox/self-test` | `@Nullable JsonNode body, TypeReference responseType` | `@Nullable T` | -| `sandbox().submit(...)` | `POST` | `/sandbox/submit` | `QueryParams query, @Nullable JsonNode body, Class responseType` | `@Nullable T` | -| `sandbox().submit(...)` | `POST` | `/sandbox/submit` | `QueryParams query, @Nullable JsonNode body, TypeReference responseType` | `@Nullable T` | -| `sandbox().submit(...)` | `POST` | `/sandbox/submit` | `@Nullable JsonNode body, Class responseType` | `@Nullable T` | -| `sandbox().submit(...)` | `POST` | `/sandbox/submit` | `@Nullable JsonNode body, TypeReference responseType` | `@Nullable T` | -| `sandbox().languages().list(...)` | `GET` | `/sandbox/languages` | `QueryParams query, Class responseType` | `@Nullable T` | -| `sandbox().languages().list(...)` | `GET` | `/sandbox/languages` | `QueryParams query, TypeReference responseType` | `@Nullable T` | -| `sandbox().languages().list(...)` | `GET` | `/sandbox/languages` | `Class responseType` | `@Nullable T` | -| `sandbox().languages().list(...)` | `GET` | `/sandbox/languages` | `TypeReference responseType` | `@Nullable T` | - -The generic `request(...)` methods and `Endpoints` constants remain available. diff --git a/scripts/check_contracts.py b/scripts/check_contracts.py index ed915d4..719190e 100644 --- a/scripts/check_contracts.py +++ b/scripts/check_contracts.py @@ -169,10 +169,10 @@ def main() -> None: snapshots = {path.name: load_json(path) for path in SNAPSHOTS} inventory = snapshots["sdk-endpoints.json"] expected_services = { - "agents", "ai", "audit", "auth", "billing", "blob", "connectors", "data", - "governance", "lineage", "observability", "ontology", "pipelines", "react", - "sandbox", "schedules", "webhooks", "workflows", "action-runs", "connection-tests", - "events", "integrations", "invocations", "providers", "webhook-endpoints", + "action-runs", "agents", "ai", "audit", "auth", "billing", "blob", "connection-tests", + "connectors", "data", "events", "governance", "integrations", "invocations", "lineage", + "observability", "ontology", "pipelines", "providers", "react", "schedules", "webhook-endpoints", + "webhooks", "workflows", } if set(inventory) != expected_services: raise SystemExit("SDK endpoint inventory service list drifted") diff --git a/scripts/generate_endpoints.py b/scripts/generate_endpoints.py index 7f72c19..26d2c17 100644 --- a/scripts/generate_endpoints.py +++ b/scripts/generate_endpoints.py @@ -31,7 +31,6 @@ "pipelines": "PIPELINES", "providers": "PROVIDERS", "react": "REACT", - "sandbox": "SANDBOX", "schedules": "SCHEDULES", "webhooks": "WEBHOOKS", "webhook-endpoints": "WEBHOOK_ENDPOINTS", diff --git a/sdk/src/main/java/dev/frontal/sdk/api/Frontal.java b/sdk/src/main/java/dev/frontal/sdk/api/Frontal.java index 93e9fe8..8c8f53b 100644 --- a/sdk/src/main/java/dev/frontal/sdk/api/Frontal.java +++ b/sdk/src/main/java/dev/frontal/sdk/api/Frontal.java @@ -51,7 +51,6 @@ public Frontal(ApiClient apiClient) { case PIPELINES -> new PipelinesClient(apiClient); case PROVIDERS -> new ProvidersClient(apiClient); case REACT -> new ReactClient(apiClient); - case SANDBOX -> new SandboxClient(apiClient); case SCHEDULES -> new SchedulesClient(apiClient); case WEBHOOKS -> new WebhooksClient(apiClient); case WEBHOOK_ENDPOINTS -> new WebhookEndpointsClient(apiClient); @@ -153,10 +152,6 @@ public ReactClient react() { return (ReactClient) service(ApiService.REACT); } - public SandboxClient sandbox() { - return (SandboxClient) service(ApiService.SANDBOX); - } - public SchedulesClient schedules() { return (SchedulesClient) service(ApiService.SCHEDULES); } diff --git a/services/src/main/java/dev/frontal/sdk/resources/Endpoints.java b/services/src/main/java/dev/frontal/sdk/resources/Endpoints.java index 10ca367..68666a9 100644 --- a/services/src/main/java/dev/frontal/sdk/resources/Endpoints.java +++ b/services/src/main/java/dev/frontal/sdk/resources/Endpoints.java @@ -1725,20 +1725,6 @@ public static final class React { private React() {} } - public static final class Sandbox { - private Sandbox() {} - - /** Endpoint for {@code GET /sandbox/languages}. */ - public static final Endpoint GET_SANDBOX_LANGUAGES = - new Endpoint(ApiService.SANDBOX, HttpMethod.GET, "/sandbox/languages"); - /** Endpoint for {@code POST /sandbox/self-test}. */ - public static final Endpoint POST_SANDBOX_SELF_TEST = - new Endpoint(ApiService.SANDBOX, HttpMethod.POST, "/sandbox/self-test"); - /** Endpoint for {@code POST /sandbox/submit}. */ - public static final Endpoint POST_SANDBOX_SUBMIT = - new Endpoint(ApiService.SANDBOX, HttpMethod.POST, "/sandbox/submit"); - } - public static final class Schedules { private Schedules() {} diff --git a/services/src/main/java/dev/frontal/sdk/resources/SandboxClient.java b/services/src/main/java/dev/frontal/sdk/resources/SandboxClient.java deleted file mode 100644 index 7fe0e44..0000000 --- a/services/src/main/java/dev/frontal/sdk/resources/SandboxClient.java +++ /dev/null @@ -1,133 +0,0 @@ -package dev.frontal.sdk; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.JsonNode; -import java.io.IOException; -import java.util.List; -import org.jspecify.annotations.Nullable; - -/** Contract operations for sandbox. Generated by scripts/generate_endpoints.py. */ -public final class SandboxClient extends ServiceClient { - SandboxClient(ApiClient client) { - super(ApiService.SANDBOX, client); - } - - /** Returns the client for the nested resource. - * @return the languages resource client - */ - public SandboxLanguagesClient languages() { - return new SandboxLanguagesClient(client()); - } - - /** - * Calls the contract route {@code POST /sandbox/self-test}. - * @param decoded response type - * @param query query supplied to the operation - * @param body body supplied to the operation - * @param responseType responseType supplied to the operation - * @return the decoded response, or null when the response body is empty - * @throws IOException if the operation fails - * @throws InterruptedException if the operation fails - */ - @SdkOperation("sandbox|POST|/sandbox/self-test") - public @Nullable T createSelfTest(QueryParams query, @Nullable JsonNode body, Class responseType) - throws IOException, InterruptedException { - return request(Endpoints.Sandbox.POST_SANDBOX_SELF_TEST, List.of(), query, body, responseType); - } - /** - * Calls the contract route {@code POST /sandbox/self-test} using a generic response type. - * @param decoded response type - * @param query query supplied to the operation - * @param body body supplied to the operation - * @param responseType responseType supplied to the operation - * @return the decoded response, or null when the response body is empty - * @throws IOException if the operation fails - * @throws InterruptedException if the operation fails - */ - public @Nullable T createSelfTest(QueryParams query, @Nullable JsonNode body, TypeReference responseType) - throws IOException, InterruptedException { - return request(Endpoints.Sandbox.POST_SANDBOX_SELF_TEST, List.of(), query, body, responseType); - } - /** - * Calls the contract route {@code POST /sandbox/self-test} without query parameters. - * @param decoded response type - * @param body body supplied to the operation - * @param responseType responseType supplied to the operation - * @return the decoded response, or null when the response body is empty - * @throws IOException if the operation fails - * @throws InterruptedException if the operation fails - */ - public @Nullable T createSelfTest(@Nullable JsonNode body, Class responseType) - throws IOException, InterruptedException { - return createSelfTest(QueryParams.empty(), body, responseType); - } - /** - * Calls the contract route {@code POST /sandbox/self-test} without query parameters using a generic response type. - * @param decoded response type - * @param body body supplied to the operation - * @param responseType responseType supplied to the operation - * @return the decoded response, or null when the response body is empty - * @throws IOException if the operation fails - * @throws InterruptedException if the operation fails - */ - public @Nullable T createSelfTest(@Nullable JsonNode body, TypeReference responseType) - throws IOException, InterruptedException { - return createSelfTest(QueryParams.empty(), body, responseType); - } - - /** - * Calls the contract route {@code POST /sandbox/submit}. - * @param decoded response type - * @param query query supplied to the operation - * @param body body supplied to the operation - * @param responseType responseType supplied to the operation - * @return the decoded response, or null when the response body is empty - * @throws IOException if the operation fails - * @throws InterruptedException if the operation fails - */ - @SdkOperation("sandbox|POST|/sandbox/submit") - public @Nullable T submit(QueryParams query, @Nullable JsonNode body, Class responseType) - throws IOException, InterruptedException { - return request(Endpoints.Sandbox.POST_SANDBOX_SUBMIT, List.of(), query, body, responseType); - } - /** - * Calls the contract route {@code POST /sandbox/submit} using a generic response type. - * @param decoded response type - * @param query query supplied to the operation - * @param body body supplied to the operation - * @param responseType responseType supplied to the operation - * @return the decoded response, or null when the response body is empty - * @throws IOException if the operation fails - * @throws InterruptedException if the operation fails - */ - public @Nullable T submit(QueryParams query, @Nullable JsonNode body, TypeReference responseType) - throws IOException, InterruptedException { - return request(Endpoints.Sandbox.POST_SANDBOX_SUBMIT, List.of(), query, body, responseType); - } - /** - * Calls the contract route {@code POST /sandbox/submit} without query parameters. - * @param decoded response type - * @param body body supplied to the operation - * @param responseType responseType supplied to the operation - * @return the decoded response, or null when the response body is empty - * @throws IOException if the operation fails - * @throws InterruptedException if the operation fails - */ - public @Nullable T submit(@Nullable JsonNode body, Class responseType) - throws IOException, InterruptedException { - return submit(QueryParams.empty(), body, responseType); - } - /** - * Calls the contract route {@code POST /sandbox/submit} without query parameters using a generic response type. - * @param decoded response type - * @param body body supplied to the operation - * @param responseType responseType supplied to the operation - * @return the decoded response, or null when the response body is empty - * @throws IOException if the operation fails - * @throws InterruptedException if the operation fails - */ - public @Nullable T submit(@Nullable JsonNode body, TypeReference responseType) - throws IOException, InterruptedException { - return submit(QueryParams.empty(), body, responseType); - } -} diff --git a/services/src/main/java/dev/frontal/sdk/resources/SandboxLanguagesClient.java b/services/src/main/java/dev/frontal/sdk/resources/SandboxLanguagesClient.java deleted file mode 100644 index 1b64b1e..0000000 --- a/services/src/main/java/dev/frontal/sdk/resources/SandboxLanguagesClient.java +++ /dev/null @@ -1,62 +0,0 @@ -package dev.frontal.sdk; - -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.List; -import org.jspecify.annotations.Nullable; - -/** Contract operations for sandbox/languages. Generated by scripts/generate_endpoints.py. */ -public final class SandboxLanguagesClient extends ServiceClient { - SandboxLanguagesClient(ApiClient client) { - super(ApiService.SANDBOX, client); - } - - /** - * Calls the contract route {@code GET /sandbox/languages}. - * @param decoded response type - * @param query query supplied to the operation - * @param responseType responseType supplied to the operation - * @return the decoded response, or null when the response body is empty - * @throws IOException if the operation fails - * @throws InterruptedException if the operation fails - */ - @SdkOperation("sandbox|GET|/sandbox/languages") - public @Nullable T list(QueryParams query, Class responseType) throws IOException, InterruptedException { - return request(Endpoints.Sandbox.GET_SANDBOX_LANGUAGES, List.of(), query, null, responseType); - } - /** - * Calls the contract route {@code GET /sandbox/languages} using a generic response type. - * @param decoded response type - * @param query query supplied to the operation - * @param responseType responseType supplied to the operation - * @return the decoded response, or null when the response body is empty - * @throws IOException if the operation fails - * @throws InterruptedException if the operation fails - */ - public @Nullable T list(QueryParams query, TypeReference responseType) - throws IOException, InterruptedException { - return request(Endpoints.Sandbox.GET_SANDBOX_LANGUAGES, List.of(), query, null, responseType); - } - /** - * Calls the contract route {@code GET /sandbox/languages} without query parameters. - * @param decoded response type - * @param responseType responseType supplied to the operation - * @return the decoded response, or null when the response body is empty - * @throws IOException if the operation fails - * @throws InterruptedException if the operation fails - */ - public @Nullable T list(Class responseType) throws IOException, InterruptedException { - return list(QueryParams.empty(), responseType); - } - /** - * Calls the contract route {@code GET /sandbox/languages} without query parameters using a generic response type. - * @param decoded response type - * @param responseType responseType supplied to the operation - * @return the decoded response, or null when the response body is empty - * @throws IOException if the operation fails - * @throws InterruptedException if the operation fails - */ - public @Nullable T list(TypeReference responseType) throws IOException, InterruptedException { - return list(QueryParams.empty(), responseType); - } -}