1
+ {
2
+ "openapi" : " 3.0.0" ,
3
+ "info" : {
4
+ "version" : " 0.8.0" ,
5
+ "title" : " ActorCore API"
6
+ },
7
+ "components" : {
8
+ "schemas" : {
9
+ "ResolveResponse" : {
10
+ "type" : " object" ,
11
+ "properties" : {
12
+ "i" : {
13
+ "type" : " string" ,
14
+ "example" : " actor-123"
15
+ }
16
+ },
17
+ "required" : [
18
+ " i"
19
+ ]
20
+ },
21
+ "ResolveQuery" : {
22
+ "type" : " object" ,
23
+ "properties" : {
24
+ "query" : {
25
+ "nullable" : true ,
26
+ "example" : {
27
+ "getForId" : {
28
+ "actorId" : " actor-123"
29
+ }
30
+ }
31
+ }
32
+ }
33
+ },
34
+ "ActionResponse" : {
35
+ "nullable" : true
36
+ },
37
+ "ActionRequest" : {
38
+ "type" : " object" ,
39
+ "properties" : {
40
+ "query" : {
41
+ "nullable" : true ,
42
+ "example" : {
43
+ "getForId" : {
44
+ "actorId" : " actor-123"
45
+ }
46
+ }
47
+ },
48
+ "body" : {
49
+ "nullable" : true ,
50
+ "example" : {
51
+ "param1" : " value1" ,
52
+ "param2" : 123
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "ConnectionMessageResponse" : {
58
+ "nullable" : true
59
+ },
60
+ "ConnectionMessageRequest" : {
61
+ "type" : " object" ,
62
+ "properties" : {
63
+ "message" : {
64
+ "nullable" : true ,
65
+ "example" : {
66
+ "type" : " message" ,
67
+ "content" : " Hello, actor!"
68
+ }
69
+ }
70
+ }
71
+ }
72
+ },
73
+ "parameters" : {}
74
+ },
75
+ "paths" : {
76
+ "/actors/resolve" : {
77
+ "post" : {
78
+ "parameters" : [
79
+ {
80
+ "schema" : {
81
+ "type" : " string" ,
82
+ "description" : " Actor query information"
83
+ },
84
+ "required" : true ,
85
+ "name" : " X-AC-Query" ,
86
+ "in" : " header"
87
+ }
88
+ ],
89
+ "requestBody" : {
90
+ "content" : {
91
+ "application/json" : {
92
+ "schema" : {
93
+ "$ref" : " #/components/schemas/ResolveQuery"
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "responses" : {
99
+ "200" : {
100
+ "description" : " Success" ,
101
+ "content" : {
102
+ "application/json" : {
103
+ "schema" : {
104
+ "$ref" : " #/components/schemas/ResolveResponse"
105
+ }
106
+ }
107
+ }
108
+ },
109
+ "400" : {
110
+ "description" : " User error"
111
+ },
112
+ "500" : {
113
+ "description" : " Internal error"
114
+ }
115
+ }
116
+ }
117
+ },
118
+ "/actors/connect/websocket" : {
119
+ "get" : {
120
+ "parameters" : [
121
+ {
122
+ "schema" : {
123
+ "type" : " string" ,
124
+ "description" : " The encoding format to use for the response (json, cbor)" ,
125
+ "example" : " json"
126
+ },
127
+ "required" : true ,
128
+ "name" : " encoding" ,
129
+ "in" : " query"
130
+ },
131
+ {
132
+ "schema" : {
133
+ "type" : " string" ,
134
+ "description" : " Actor query information"
135
+ },
136
+ "required" : true ,
137
+ "name" : " query" ,
138
+ "in" : " query"
139
+ }
140
+ ],
141
+ "responses" : {
142
+ "101" : {
143
+ "description" : " WebSocket upgrade"
144
+ }
145
+ }
146
+ }
147
+ },
148
+ "/actors/connect/sse" : {
149
+ "get" : {
150
+ "parameters" : [
151
+ {
152
+ "schema" : {
153
+ "type" : " string" ,
154
+ "description" : " The encoding format to use for the response (json, cbor)" ,
155
+ "example" : " json"
156
+ },
157
+ "required" : true ,
158
+ "name" : " X-AC-Encoding" ,
159
+ "in" : " header"
160
+ },
161
+ {
162
+ "schema" : {
163
+ "type" : " string" ,
164
+ "description" : " Actor query information"
165
+ },
166
+ "required" : true ,
167
+ "name" : " X-AC-Query" ,
168
+ "in" : " header"
169
+ },
170
+ {
171
+ "schema" : {
172
+ "type" : " string" ,
173
+ "description" : " Connection parameters"
174
+ },
175
+ "required" : false ,
176
+ "name" : " X-AC-Conn-Params" ,
177
+ "in" : " header"
178
+ }
179
+ ],
180
+ "responses" : {
181
+ "200" : {
182
+ "description" : " SSE stream" ,
183
+ "content" : {
184
+ "text/event-stream" : {
185
+ "schema" : {
186
+ "nullable" : true
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
193
+ },
194
+ "/actors/actions/{action}" : {
195
+ "post" : {
196
+ "parameters" : [
197
+ {
198
+ "schema" : {
199
+ "type" : " string" ,
200
+ "example" : " myAction"
201
+ },
202
+ "required" : true ,
203
+ "name" : " action" ,
204
+ "in" : " path"
205
+ },
206
+ {
207
+ "schema" : {
208
+ "type" : " string" ,
209
+ "description" : " The encoding format to use for the response (json, cbor)" ,
210
+ "example" : " json"
211
+ },
212
+ "required" : true ,
213
+ "name" : " X-AC-Encoding" ,
214
+ "in" : " header"
215
+ },
216
+ {
217
+ "schema" : {
218
+ "type" : " string" ,
219
+ "description" : " Connection parameters"
220
+ },
221
+ "required" : false ,
222
+ "name" : " X-AC-Conn-Params" ,
223
+ "in" : " header"
224
+ }
225
+ ],
226
+ "requestBody" : {
227
+ "content" : {
228
+ "application/json" : {
229
+ "schema" : {
230
+ "$ref" : " #/components/schemas/ActionRequest"
231
+ }
232
+ }
233
+ }
234
+ },
235
+ "responses" : {
236
+ "200" : {
237
+ "description" : " Success" ,
238
+ "content" : {
239
+ "application/json" : {
240
+ "schema" : {
241
+ "$ref" : " #/components/schemas/ActionResponse"
242
+ }
243
+ }
244
+ }
245
+ },
246
+ "400" : {
247
+ "description" : " User error"
248
+ },
249
+ "500" : {
250
+ "description" : " Internal error"
251
+ }
252
+ }
253
+ }
254
+ },
255
+ "/actors/message" : {
256
+ "post" : {
257
+ "parameters" : [
258
+ {
259
+ "schema" : {
260
+ "type" : " string" ,
261
+ "description" : " Actor ID (used in some endpoints)" ,
262
+ "example" : " actor-123456"
263
+ },
264
+ "required" : true ,
265
+ "name" : " X-AC-Actor" ,
266
+ "in" : " header"
267
+ },
268
+ {
269
+ "schema" : {
270
+ "type" : " string" ,
271
+ "description" : " Connection ID" ,
272
+ "example" : " conn-123456"
273
+ },
274
+ "required" : true ,
275
+ "name" : " X-AC-Conn" ,
276
+ "in" : " header"
277
+ },
278
+ {
279
+ "schema" : {
280
+ "type" : " string" ,
281
+ "description" : " The encoding format to use for the response (json, cbor)" ,
282
+ "example" : " json"
283
+ },
284
+ "required" : true ,
285
+ "name" : " X-AC-Encoding" ,
286
+ "in" : " header"
287
+ },
288
+ {
289
+ "schema" : {
290
+ "type" : " string" ,
291
+ "description" : " Connection token"
292
+ },
293
+ "required" : true ,
294
+ "name" : " X-AC-Conn-Token" ,
295
+ "in" : " header"
296
+ }
297
+ ],
298
+ "requestBody" : {
299
+ "content" : {
300
+ "application/json" : {
301
+ "schema" : {
302
+ "$ref" : " #/components/schemas/ConnectionMessageRequest"
303
+ }
304
+ }
305
+ }
306
+ },
307
+ "responses" : {
308
+ "200" : {
309
+ "description" : " Success" ,
310
+ "content" : {
311
+ "application/json" : {
312
+ "schema" : {
313
+ "$ref" : " #/components/schemas/ConnectionMessageResponse"
314
+ }
315
+ }
316
+ }
317
+ },
318
+ "400" : {
319
+ "description" : " User error"
320
+ },
321
+ "500" : {
322
+ "description" : " Internal error"
323
+ }
324
+ }
325
+ }
326
+ }
327
+ }
328
+ }
0 commit comments