Skip to content

Commit 632dfc2

Browse files
committed
fix docs
Signed-off-by: Teo Koon Peng <[email protected]>
1 parent 064ec4e commit 632dfc2

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

diagram.schema.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
}
2929
},
3030
"definitions": {
31+
"BuiltinSource": {
32+
"type": "string",
33+
"enum": [
34+
"start"
35+
]
36+
},
3137
"BuiltinTarget": {
3238
"oneOf": [
3339
{
@@ -199,10 +205,11 @@
199205
}
200206
},
201207
{
202-
"description": "Wait for an item to be emitted from each of the inputs, then combined the oldest of each into an array.\n\n# Examples ``` # bevy_impulse::Diagram::from_json_str(r#\" { \"version\": \"0.1.0\", \"start\": \"split\", \"ops\": { \"split\": { \"type\": \"split\", \"index\": [\"op1\", \"op2\"] }, \"op1\": { \"type\": \"node\", \"builder\": \"foo\", \"next\": \"join\" }, \"op2\": { \"type\": \"node\", \"builder\": \"bar\", \"next\": \"join\" }, \"join\": { \"type\": \"join\", \"next\": { \"builtin\": \"terminate\" } } } } # \"#)?; # Ok::<_, serde_json::Error>(()) ```",
208+
"description": "Wait for an item to be emitted from each of the inputs, then combined the oldest of each into an array.\n\n# Examples ``` # bevy_impulse::Diagram::from_json_str(r#\" { \"version\": \"0.1.0\", \"start\": \"split\", \"ops\": { \"split\": { \"type\": \"split\", \"index\": [\"op1\", \"op2\"] }, \"op1\": { \"type\": \"node\", \"builder\": \"foo\", \"next\": \"join\" }, \"op2\": { \"type\": \"node\", \"builder\": \"bar\", \"next\": \"join\" }, \"join\": { \"type\": \"join\", \"order\": [\"op1\", \"op2\"], \"next\": { \"builtin\": \"terminate\" } } } } # \"#)?; # Ok::<_, serde_json::Error>(()) ```",
203209
"type": "object",
204210
"required": [
205211
"next",
212+
"order",
206213
"type"
207214
],
208215
"properties": {
@@ -216,6 +223,13 @@
216223
"null"
217224
]
218225
},
226+
"order": {
227+
"description": "Controls the order of the resulting join. Each item must be an operation id of one of the incoming outputs.",
228+
"type": "array",
229+
"items": {
230+
"$ref": "#/definitions/SourceOperation"
231+
}
232+
},
219233
"type": {
220234
"type": "string",
221235
"enum": [
@@ -281,6 +295,24 @@
281295
}
282296
}
283297
]
298+
},
299+
"SourceOperation": {
300+
"anyOf": [
301+
{
302+
"type": "string"
303+
},
304+
{
305+
"type": "object",
306+
"required": [
307+
"builtin"
308+
],
309+
"properties": {
310+
"builtin": {
311+
"$ref": "#/definitions/BuiltinSource"
312+
}
313+
}
314+
}
315+
]
284316
}
285317
}
286318
}

src/diagram.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ pub enum DiagramOperation {
262262
/// },
263263
/// "join": {
264264
/// "type": "join",
265+
/// "order": ["op1", "op2"],
265266
/// "next": { "builtin": "terminate" }
266267
/// }
267268
/// }

0 commit comments

Comments
 (0)