Skip to content

Commit aa56578

Browse files
authored
Allow dictionaries and lists of primitive types
1 parent 41dc037 commit aa56578

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/python_workflow_definition/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121

2222
JsonPrimitive = Union[str, int, float, bool, None]
23+
JsonValue = Union[JsonPrimitive, list[JsonPrimitive], dict[str, JsonPrimitive]]
2324

2425

2526
class PythonWorkflowDefinitionBaseNode(BaseModel):
@@ -36,7 +37,7 @@ class PythonWorkflowDefinitionInputNode(PythonWorkflowDefinitionBaseNode):
3637

3738
type: Literal["input"]
3839
name: str
39-
value: Optional[JsonPrimitive] = None
40+
value: Optional[JsonValue] = None
4041

4142

4243
class PythonWorkflowDefinitionOutputNode(PythonWorkflowDefinitionBaseNode):

0 commit comments

Comments
 (0)