diff --git a/pyproject.toml b/pyproject.toml index 36d03ac..25cd7a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath-dev" -version = "0.0.3" +version = "0.0.4" description = "UiPath Developer Console" readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" diff --git a/src/uipath/dev/ui/panels/new_run_panel.py b/src/uipath/dev/ui/panels/new_run_panel.py index d45dedc..8a60111 100644 --- a/src/uipath/dev/ui/panels/new_run_panel.py +++ b/src/uipath/dev/ui/panels/new_run_panel.py @@ -34,6 +34,8 @@ def _mock_value(sub_schema: dict[str, Any], required: bool = True) -> Any: # 3) Objects: recurse into mock_json_from_schema if t == "object": + if "properties" not in sub_schema: + return {} return mock_json_from_schema(sub_schema) # 4) Arrays: mock a single item based on "items" schema @@ -62,7 +64,10 @@ def _mock_value(sub_schema: dict[str, Any], required: bool = True) -> Any: return None # Top-level: if it's an object with properties, build a dict - if schema.get("type") == "object" and "properties" in schema: + if schema.get("type") == "object": + if "properties" not in schema: + return {} + props: dict[str, Any] = schema.get("properties", {}) required_keys = set(schema.get("required", [])) result: dict[str, Any] = {} diff --git a/uv.lock b/uv.lock index e8bc0a3..79f4233 100644 --- a/uv.lock +++ b/uv.lock @@ -1002,7 +1002,7 @@ wheels = [ [[package]] name = "uipath-dev" -version = "0.0.3" +version = "0.0.4" source = { editable = "." } dependencies = [ { name = "pyperclip" },