You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "If the request is cloneable, clone it into multiple responses.\n\n# Examples ``` # bevy_impulse::Diagram::from_json_str(r#\" { \"start\": \"fork_clone\", \"ops\": { \"fork_clone\": { \"type\": \"fork_clone\", \"next\": [\"terminate\"] } } } # \"#)?; # Ok::<_, serde_json::Error>(())",
81
74
"type": "object",
82
75
"required": [
83
76
"next",
@@ -87,7 +80,7 @@
87
80
"next": {
88
81
"type": "array",
89
82
"items": {
90
-
"type": "string"
83
+
"$ref": "#/definitions/NextOperation"
91
84
}
92
85
},
93
86
"type": {
@@ -99,7 +92,7 @@
99
92
}
100
93
},
101
94
{
102
-
"description": "If the request is a tuple of (T1, T2, T3, ...), unzip it into multiple responses of T1, T2, T3, ...\n\n# Examples ``` # bevy_impulse::Diagram::from_json_str(r#\" { \"ops\": { \"start\": { \"type\": \"start\", \"next\": \"unzip\" }, \"unzip\": { \"type\": \"unzip\", \"next\": [\"terminate\"] }, \"terminate\": { \"type\": \"terminate\" } } } # \"#)?; # Ok::<_, serde_json::Error>(())",
95
+
"description": "If the request is a tuple of (T1, T2, T3, ...), unzip it into multiple responses of T1, T2, T3, ...\n\n# Examples ``` # bevy_impulse::Diagram::from_json_str(r#\" { \"start\": \"unzip\", \"ops\": { \"unzip\": { \"type\": \"unzip\", \"next\": [{ \"builtin\": \"terminate\" }] } } } # \"#)?; # Ok::<_, serde_json::Error>(())",
103
96
"type": "object",
104
97
"required": [
105
98
"next",
@@ -109,7 +102,7 @@
109
102
"next": {
110
103
"type": "array",
111
104
"items": {
112
-
"type": "string"
105
+
"$ref": "#/definitions/NextOperation"
113
106
}
114
107
},
115
108
"type": {
@@ -121,7 +114,7 @@
121
114
}
122
115
},
123
116
{
124
-
"description": "If the request is a `Result<_, _>`, branch it to `Ok` and `Err`.\n\n# Examples ``` # bevy_impulse::Diagram::from_json_str(r#\" { \"ops\": { \"start\": { \"type\": \"start\", \"next\": \"fork_result\" }, \"fork_result\": { \"type\": \"fork_result\", \"ok\": \"terminate\",\"err\": \"dispose\" }, \"dispose\": { \"type\": \"dispose\" }, \"terminate\": { \"type\": \"terminate\" } } } # \"#)?; # Ok::<_, serde_json::Error>(())",
117
+
"description": "If the request is a `Result<_, _>`, branch it to `Ok` and `Err`.\n\n# Examples ``` # bevy_impulse::Diagram::from_json_str(r#\" { \"start\": \"fork_result\", \"ops\": { \"fork_result\": { \"type\": \"fork_result\", \"ok\": {\"builtin\": \"terminate\" }, \"err\": { \"builtin\": \"dispose\" } } } } # \"#)?; # Ok::<_, serde_json::Error>(())",
125
118
"type": "object",
126
119
"required": [
127
120
"err",
@@ -130,10 +123,10 @@
130
123
],
131
124
"properties": {
132
125
"err": {
133
-
"type": "string"
126
+
"$ref": "#/definitions/NextOperation"
134
127
},
135
128
"ok": {
136
-
"type": "string"
129
+
"$ref": "#/definitions/NextOperation"
137
130
},
138
131
"type": {
139
132
"type": "string",
@@ -144,7 +137,7 @@
144
137
}
145
138
},
146
139
{
147
-
"description": "If the request is a list-like or map-like object, split it into multiple responses. Note that the split output is a tuple of `(KeyOrIndex, Value)`, nodes receiving a split output should have request of that type instead of just the value type.\n\n# Examples ``` # bevy_impulse::Diagram::from_json_str(r#\" { \"ops\": { \"start\": { \"type\": \"start\", \"next\": \"split\" }, \"split\": { \"type\": \"split\", \"index\": [\"terminate\"] }, \"terminate\": { \"type\": \"terminate\" } } } # \"#)?; # Ok::<_, serde_json::Error>(()) ```",
140
+
"description": "If the request is a list-like or map-like object, split it into multiple responses. Note that the split output is a tuple of `(KeyOrIndex, Value)`, nodes receiving a split output should have request of that type instead of just the value type.\n\n# Examples ``` # bevy_impulse::Diagram::from_json_str(r#\" { \"start\": \"split\", \"ops\": { \"split\": { \"type\": \"split\", \"index\": [{ \"builtin\": \"terminate\" }] } } } # \"#)?; # Ok::<_, serde_json::Error>(()) ```",
148
141
"type": "object",
149
142
"oneOf": [
150
143
{
@@ -156,7 +149,7 @@
156
149
"index": {
157
150
"type": "array",
158
151
"items": {
159
-
"type": "string"
152
+
"$ref": "#/definitions/NextOperation"
160
153
}
161
154
}
162
155
},
@@ -171,7 +164,7 @@
171
164
"key": {
172
165
"type": "object",
173
166
"additionalProperties": {
174
-
"type": "string"
167
+
"$ref": "#/definitions/NextOperation"
175
168
}
176
169
}
177
170
},
@@ -183,9 +176,13 @@
183
176
],
184
177
"properties": {
185
178
"remaining": {
186
-
"type": [
187
-
"string",
188
-
"null"
179
+
"anyOf": [
180
+
{
181
+
"$ref": "#/definitions/NextOperation"
182
+
},
183
+
{
184
+
"type": "null"
185
+
}
189
186
]
190
187
},
191
188
"type": {
@@ -197,15 +194,15 @@
197
194
}
198
195
},
199
196
{
200
-
"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#\" { \"ops\": { \"start\": { \"type\": \"start\", \"next\": \"split\" }, \"split\": { \"type\": \"split\", \"index\": [\"op1\", \"op2\"] }, \"op1\": { \"type\": \"node\", \"builder\": \"foo\", \"next\": \"join\" }, \"op2\": { \"type\": \"node\", \"builder\": \"bar\", \"next\": \"join\" }, \"join\": { \"type\": \"join\", \"next\": \"terminate\" }, \"terminate\": { \"type\": \"terminate\" } } } # \"#)?; # Ok::<_, serde_json::Error>(()) ```",
197
+
"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#\" { \"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>(()) ```",
201
198
"type": "object",
202
199
"required": [
203
200
"next",
204
201
"type"
205
202
],
206
203
"properties": {
207
204
"next": {
208
-
"type": "string"
205
+
"$ref": "#/definitions/NextOperation"
209
206
},
210
207
"type": {
211
208
"type": "string",
@@ -216,7 +213,7 @@
216
213
}
217
214
},
218
215
{
219
-
"description": "If the request is serializable, transform it by running it through a [CEL](https://cel.dev/) program. The context includes a \"request\" variable which contains the request.\n\n# Examples ``` # bevy_impulse::Diagram::from_json_str(r#\" { \"ops\": { \"start\": { \"type\": \"start\", \"next\": \"transform\" }, \"transform\": { \"type\": \"transform\", \"cel\": \"request.name\", \"next\": \"terminate\" }, \"terminate\": { \"type\": \"terminate\" } } } # \"#)?; # Ok::<_, serde_json::Error>(()) ```\n\nNote that due to how `serde_json` performs serialization, positive integers are always serialized as unsigned. In CEL, You can't do an operation between unsigned and signed so it is recommended to always perform explicit casts.\n\n# Examples ``` # bevy_impulse::Diagram::from_json_str(r#\" { \"ops\": { \"start\": { \"type\": \"start\", \"next\": \"transform\" }, \"transform\": { \"type\": \"transform\", \"cel\": \"int(request.score) * 3\", \"next\": \"terminate\" }, \"terminate\": { \"type\": \"terminate\" } } } # \"#)?; # Ok::<_, serde_json::Error>(()) ```",
216
+
"description": "If the request is serializable, transform it by running it through a [CEL](https://cel.dev/) program. The context includes a \"request\" variable which contains the request.\n\n# Examples ``` # bevy_impulse::Diagram::from_json_str(r#\" { \"start\": \"transform\", \"ops\": { \"transform\": { \"type\": \"transform\", \"cel\": \"request.name\", \"next\": { \"builtin\": \"terminate\" } } } } # \"#)?; # Ok::<_, serde_json::Error>(()) ```\n\nNote that due to how `serde_json` performs serialization, positive integers are always serialized as unsigned. In CEL, You can't do an operation between unsigned and signed so it is recommended to always perform explicit casts.\n\n# Examples ``` # bevy_impulse::Diagram::from_json_str(r#\" { \"start\": \"transform\", \"ops\": { \"transform\": { \"type\": \"transform\", \"cel\": \"int(request.score) * 3\", \"next\": { \"builtin\": \"terminate\" } } } } # \"#)?; # Ok::<_, serde_json::Error>(()) ```",
0 commit comments