From 6c75cada1fca51adfd3dc0783c6906238373b15c Mon Sep 17 00:00:00 2001 From: FanouZeng-TT <18280587072@163.com> Date: Fri, 21 Aug 2026 21:53:28 +0800 Subject: [PATCH 1/2] fix(rest/python): publish the REST OpenAPI schema URL --- rest/python/server/integration_test.py | 11 +++++++++++ rest/python/server/routes/discovery_profile.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/rest/python/server/integration_test.py b/rest/python/server/integration_test.py index 88de62d..d5f7a7e 100644 --- a/rest/python/server/integration_test.py +++ b/rest/python/server/integration_test.py @@ -1314,6 +1314,17 @@ def test_profile_publishes_the_webhook_signing_key(self) -> None: self.assertIn(jwk, profile.get("signing_keys", [])) self.assertIn(jwk, profile.get("ucp", {}).get("keys", [])) + def test_profile_publishes_rest_service_schema(self) -> None: + """The REST service points to the published OpenAPI document.""" + with self.client: + profile = self.client.get("/.well-known/ucp").json() + + service = profile["ucp"]["services"]["dev.ucp.shopping"][0] + self.assertEqual( + service["schema"], + "https://ucp.dev/2026-04-08/services/shopping/rest.openapi.json", + ) + def test_version_invalid_format(self) -> None: """Tests that UCP-Agent with invalid version format is rejected.""" with self.client: diff --git a/rest/python/server/routes/discovery_profile.json b/rest/python/server/routes/discovery_profile.json index 5c031fe..e0cf122 100644 --- a/rest/python/server/routes/discovery_profile.json +++ b/rest/python/server/routes/discovery_profile.json @@ -8,7 +8,7 @@ "spec": "https://ucp.dev/2026-04-08/specification/overview", "transport": "rest", "endpoint": "{{ENDPOINT}}", - "schema": "https://ucp.dev/2026-04-08/services/shopping/openapi.json" + "schema": "https://ucp.dev/2026-04-08/services/shopping/rest.openapi.json" } ] }, From 42c707d92c516d792bc82d108dc40df35fffcd1c Mon Sep 17 00:00:00 2001 From: FanouZeng-TT <18280587072@163.com> Date: Fri, 21 Aug 2026 22:05:32 +0800 Subject: [PATCH 2/2] test(rest/python): derive the discovery schema version --- rest/python/server/integration_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rest/python/server/integration_test.py b/rest/python/server/integration_test.py index d5f7a7e..485abd0 100644 --- a/rest/python/server/integration_test.py +++ b/rest/python/server/integration_test.py @@ -1320,9 +1320,10 @@ def test_profile_publishes_rest_service_schema(self) -> None: profile = self.client.get("/.well-known/ucp").json() service = profile["ucp"]["services"]["dev.ucp.shopping"][0] + version = profile["ucp"]["version"] self.assertEqual( service["schema"], - "https://ucp.dev/2026-04-08/services/shopping/rest.openapi.json", + f"https://ucp.dev/{version}/services/shopping/rest.openapi.json", ) def test_version_invalid_format(self) -> None: