Skip to content

Commit 3efd0b4

Browse files
committed
fix: separate stateful and stateless return objects.
1 parent bb132bd commit 3efd0b4

File tree

1 file changed

+75
-30
lines changed

1 file changed

+75
-30
lines changed

openapi.json

Lines changed: 75 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@
593593
"application/json": {
594594
"schema": {
595595
"items": {
596-
"$ref": "#/components/schemas/Run"
596+
"$ref": "#/components/schemas/RunStateful"
597597
},
598598
"type": "array"
599599
}
@@ -648,7 +648,7 @@
648648
"content": {
649649
"application/json": {
650650
"schema": {
651-
"$ref": "#/components/schemas/Run"
651+
"$ref": "#/components/schemas/RunStateful"
652652
}
653653
}
654654
}
@@ -668,7 +668,7 @@
668668
"content": {
669669
"application/json": {
670670
"schema": {
671-
"$ref": "#/components/schemas/Run"
671+
"$ref": "#/components/schemas/RunStateful"
672672
}
673673
}
674674
}
@@ -820,7 +820,7 @@
820820
"content": {
821821
"application/json": {
822822
"schema": {
823-
"$ref": "#/components/schemas/RunWaitResponse"
823+
"$ref": "#/components/schemas/RunWaitResponseStateful"
824824
}
825825
}
826826
}
@@ -898,7 +898,7 @@
898898
"content": {
899899
"application/json": {
900900
"schema": {
901-
"$ref": "#/components/schemas/RunWaitResponse"
901+
"$ref": "#/components/schemas/RunWaitResponseStateful"
902902
}
903903
}
904904
}
@@ -966,7 +966,7 @@
966966
"content": {
967967
"application/json": {
968968
"schema": {
969-
"$ref": "#/components/schemas/Run"
969+
"$ref": "#/components/schemas/RunStateful"
970970
}
971971
}
972972
}
@@ -1016,7 +1016,7 @@
10161016
"content": {
10171017
"application/json": {
10181018
"schema": {
1019-
"$ref": "#/components/schemas/Run"
1019+
"$ref": "#/components/schemas/RunStateful"
10201020
}
10211021
}
10221022
}
@@ -1267,7 +1267,7 @@
12671267
"content": {
12681268
"application/json": {
12691269
"schema": {
1270-
"$ref": "#/components/schemas/Run"
1270+
"$ref": "#/components/schemas/RunStateless"
12711271
}
12721272
}
12731273
}
@@ -1287,7 +1287,7 @@
12871287
"content": {
12881288
"application/json": {
12891289
"schema": {
1290-
"$ref": "#/components/schemas/Run"
1290+
"$ref": "#/components/schemas/RunStateless"
12911291
}
12921292
}
12931293
}
@@ -1350,7 +1350,7 @@
13501350
"application/json": {
13511351
"schema": {
13521352
"items": {
1353-
"$ref": "#/components/schemas/Run"
1353+
"$ref": "#/components/schemas/RunStateless"
13541354
},
13551355
"type": "array",
13561356
"title": "Run Search Response"
@@ -1457,7 +1457,7 @@
14571457
"content": {
14581458
"application/json": {
14591459
"schema": {
1460-
"$ref": "#/components/schemas/RunWaitResponse"
1460+
"$ref": "#/components/schemas/RunWaitResponseStateless"
14611461
}
14621462
}
14631463
}
@@ -1523,7 +1523,7 @@
15231523
"content": {
15241524
"application/json": {
15251525
"schema": {
1526-
"$ref": "#/components/schemas/RunWaitResponse"
1526+
"$ref": "#/components/schemas/RunWaitResponseStateless"
15271527
}
15281528
}
15291529
}
@@ -1579,7 +1579,7 @@
15791579
"content": {
15801580
"application/json": {
15811581
"schema": {
1582-
"$ref": "#/components/schemas/Run"
1582+
"$ref": "#/components/schemas/RunStateless"
15831583
}
15841584
}
15851585
}
@@ -1629,7 +1629,7 @@
16291629
"content": {
16301630
"application/json": {
16311631
"schema": {
1632-
"$ref": "#/components/schemas/Run"
1632+
"$ref": "#/components/schemas/RunStateless"
16331633
}
16341634
}
16351635
}
@@ -2192,18 +2192,8 @@
21922192
},
21932193
"Run": {
21942194
"title": "Agent Run",
2195-
"description": "Holds all the information of a run",
2195+
"description": "Holds common information of a run",
21962196
"properties": {
2197-
"creation": {
2198-
"oneOf": [
2199-
{
2200-
"$ref": "#/components/schemas/RunCreateStateful"
2201-
},
2202-
{
2203-
"$ref": "#/components/schemas/RunCreateStateless"
2204-
}
2205-
]
2206-
},
22072197
"run_id": {
22082198
"type": "string",
22092199
"format": "uuid",
@@ -2222,7 +2212,6 @@
22222212
"title": "Agent Id",
22232213
"description": "The agent that was used for this run."
22242214
},
2225-
22262215
"created_at": {
22272216
"type": "string",
22282217
"format": "date-time",
@@ -2242,14 +2231,57 @@
22422231
}
22432232
},
22442233
"required": [
2245-
"creation",
22462234
"run_id",
22472235
"agent_id",
22482236
"created_at",
22492237
"updated_at",
22502238
"status"
22512239
]
22522240
},
2241+
"RunStateless": {
2242+
"title": "Agent Run Stateless",
2243+
"description": "Holds all the information of a stateless run",
2244+
"allOf": [
2245+
{
2246+
"$ref": "#/components/schemas/Run"
2247+
},
2248+
{
2249+
"type": "object",
2250+
"properties": {
2251+
"creation": {
2252+
"$ref": "#/components/schemas/RunCreateStateless",
2253+
"title": "Creation",
2254+
"description": ""
2255+
}
2256+
},
2257+
"required": [
2258+
"creation"
2259+
]
2260+
}
2261+
]
2262+
},
2263+
"RunStateful": {
2264+
"title": "Agent Run Stateful",
2265+
"description": "Holds all the information of a stateful run",
2266+
"allOf": [
2267+
{
2268+
"$ref": "#/components/schemas/Run"
2269+
},
2270+
{
2271+
"type": "object",
2272+
"properties": {
2273+
"creation": {
2274+
"$ref": "#/components/schemas/RunCreateStateful",
2275+
"title": "Creation",
2276+
"description": ""
2277+
}
2278+
},
2279+
"required": [
2280+
"creation"
2281+
]
2282+
}
2283+
]
2284+
},
22532285
"RunCreateStateful": {
22542286
"allOf": [
22552287
{
@@ -2280,11 +2312,24 @@
22802312
"title": "RunCreateStateful",
22812313
"description": "Payload for creating a stateful run."
22822314
},
2283-
"RunWaitResponse": {
2315+
"RunWaitResponseStateful": {
2316+
"type": "object",
2317+
"properties": {
2318+
"run": {
2319+
"$ref": "#/components/schemas/RunStateful",
2320+
"title": "Run",
2321+
"description": "The run information."
2322+
},
2323+
"output": {
2324+
"$ref": "#/components/schemas/RunOutput"
2325+
}
2326+
}
2327+
},
2328+
"RunWaitResponseStateless": {
22842329
"type": "object",
22852330
"properties": {
22862331
"run": {
2287-
"$ref": "#/components/schemas/Run",
2332+
"$ref": "#/components/schemas/RunStateless",
22882333
"title": "Run",
22892334
"description": "The run information."
22902335
},
@@ -2314,7 +2359,7 @@
23142359
}
23152360
}
23162361
],
2317-
"title": "RunCreateStateful",
2362+
"title": "RunCreateStateless",
23182363
"description": "Payload for creating a stateless run."
23192364
},
23202365
"ThreadSearchRequest": {

0 commit comments

Comments
 (0)