Skip to content

Commit 9239354

Browse files
PopescuTudorclaude
authored andcommitted
fix(platform): add Swagger (type 7) to McpServerType (#1762)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent d763f4f commit 9239354

5 files changed

Lines changed: 22 additions & 3 deletions

File tree

packages/uipath-platform/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-platform"
3-
version = "0.1.76"
3+
version = "0.1.77"
44
description = "HTTP client library for programmatic access to UiPath Platform"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

packages/uipath-platform/src/uipath/platform/orchestrator/mcp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class McpServerType(IntEnum):
1818
Remote = 4 # HTTP connection to remote MCP server
1919
ProcessAssistant = 5 # Dynamic user process assistant
2020
Platform = 6 # Platform MCP server (e.g: Orchestrator, TestManager)
21+
Swagger = 7 # User-provided Swagger/OpenAPI spec exposed as MCP server
2122

2223

2324
class McpServerStatus(IntEnum):

packages/uipath-platform/tests/services/test_mcp_service.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,3 +551,21 @@ async def test_retrieve_async_passes_all_kwargs(
551551
call_kwargs.kwargs["headers"][HEADER_FOLDER_KEY]
552552
== "test-folder-key"
553553
)
554+
555+
556+
class TestMcpServerType:
557+
"""Tests for the McpServerType enum and McpServer validation."""
558+
559+
def test_swagger_type_value(self) -> None:
560+
from uipath.platform.orchestrator.mcp import McpServerType
561+
562+
assert McpServerType.Swagger == 7
563+
564+
def test_validate_swagger_server(self) -> None:
565+
"""A Swagger (type=7) server must validate — regression for backend
566+
server types newer than the SDK's enum."""
567+
server = McpServer.model_validate(
568+
{"slug": "contoso-directory", "name": "Employee Directory", "type": 7}
569+
)
570+
assert server.type == 7
571+
assert server.slug == "contoso-directory"

packages/uipath-platform/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/uipath/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)