File tree Expand file tree Collapse file tree
KitX Core Contracts/KitX.Core.Contract/Workflow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,8 +184,22 @@ public class BlueprintPin
184184}
185185
186186/// <summary>
187- /// Base class for all blueprint nodes
187+ /// Base class for all blueprint nodes.
188+ /// Uses polymorphic JSON serialization so that concrete node types
189+ /// round-trip correctly through System.Text.Json.
188190/// </summary>
191+ [ JsonPolymorphic ( UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling . FallBackToBaseType ) ]
192+ [ JsonDerivedType ( typeof ( EntryNode ) , "Entry" ) ]
193+ [ JsonDerivedType ( typeof ( BranchNode ) , "Branch" ) ]
194+ [ JsonDerivedType ( typeof ( LoopNode ) , "Loop" ) ]
195+ [ JsonDerivedType ( typeof ( BreakNode ) , "Break" ) ]
196+ [ JsonDerivedType ( typeof ( ConstNode ) , "Const" ) ]
197+ [ JsonDerivedType ( typeof ( CallNode ) , "Call" ) ]
198+ [ JsonDerivedType ( typeof ( CallHelperNode ) , "CallHelper" ) ]
199+ [ JsonDerivedType ( typeof ( GetNode ) , "Get" ) ]
200+ [ JsonDerivedType ( typeof ( SetNode ) , "Set" ) ]
201+ [ JsonDerivedType ( typeof ( PrintNode ) , "Print" ) ]
202+ [ JsonDerivedType ( typeof ( PauseNode ) , "Pause" ) ]
189203public abstract class BlueprintNode
190204{
191205 /// <summary>
You can’t perform that action at this time.
0 commit comments