Skip to content

Commit ab018d8

Browse files
committed
chore(rivetkit): add actor router to the openapi spec
1 parent 1126267 commit ab018d8

File tree

2 files changed

+469
-3
lines changed

2 files changed

+469
-3
lines changed

rivetkit-openapi/openapi.json

Lines changed: 331 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,337 @@
331331
}
332332
}
333333
}
334+
},
335+
"/actors/names": {
336+
"get": {
337+
"parameters": [
338+
{
339+
"schema": {
340+
"type": "string"
341+
},
342+
"required": true,
343+
"name": "namespace",
344+
"in": "query"
345+
}
346+
],
347+
"responses": {
348+
"200": {
349+
"description": "Success",
350+
"content": {
351+
"application/json": {
352+
"schema": {
353+
"type": "object",
354+
"properties": {
355+
"names": {
356+
"type": "object",
357+
"additionalProperties": {
358+
"type": "object",
359+
"properties": {
360+
"metadata": {
361+
"type": "object",
362+
"additionalProperties": {
363+
"nullable": true
364+
}
365+
}
366+
},
367+
"required": [
368+
"metadata"
369+
]
370+
}
371+
}
372+
},
373+
"required": [
374+
"names"
375+
]
376+
}
377+
}
378+
}
379+
},
380+
"400": {
381+
"description": "User error"
382+
},
383+
"500": {
384+
"description": "Internal error"
385+
}
386+
}
387+
}
388+
},
389+
"/gateway/{actorId}/health": {
390+
"get": {
391+
"parameters": [
392+
{
393+
"name": "actorId",
394+
"in": "path",
395+
"required": true,
396+
"schema": {
397+
"type": "string"
398+
},
399+
"description": "The ID of the actor to target"
400+
}
401+
],
402+
"responses": {
403+
"200": {
404+
"description": "Health check",
405+
"content": {
406+
"text/plain": {
407+
"schema": {
408+
"type": "string"
409+
}
410+
}
411+
}
412+
}
413+
}
414+
}
415+
},
416+
"/gateway/{actorId}/action/{action}": {
417+
"post": {
418+
"parameters": [
419+
{
420+
"name": "actorId",
421+
"in": "path",
422+
"required": true,
423+
"schema": {
424+
"type": "string"
425+
},
426+
"description": "The ID of the actor to target"
427+
},
428+
{
429+
"name": "action",
430+
"in": "path",
431+
"required": true,
432+
"schema": {
433+
"type": "string"
434+
},
435+
"description": "The name of the action to execute"
436+
}
437+
],
438+
"requestBody": {
439+
"content": {
440+
"application/json": {
441+
"schema": {
442+
"type": "object",
443+
"properties": {
444+
"args": {}
445+
},
446+
"additionalProperties": false
447+
}
448+
}
449+
}
450+
},
451+
"responses": {
452+
"200": {
453+
"description": "Action executed successfully",
454+
"content": {
455+
"application/json": {
456+
"schema": {
457+
"type": "object",
458+
"properties": {
459+
"output": {}
460+
},
461+
"additionalProperties": false
462+
}
463+
}
464+
}
465+
},
466+
"400": {
467+
"description": "Invalid action"
468+
},
469+
"500": {
470+
"description": "Internal error"
471+
}
472+
}
473+
}
474+
},
475+
"/gateway/{actorId}/request/{path}": {
476+
"get": {
477+
"parameters": [
478+
{
479+
"name": "actorId",
480+
"in": "path",
481+
"required": true,
482+
"schema": {
483+
"type": "string"
484+
},
485+
"description": "The ID of the actor to target"
486+
},
487+
{
488+
"name": "path",
489+
"in": "path",
490+
"required": true,
491+
"schema": {
492+
"type": "string"
493+
},
494+
"description": "The HTTP path to forward to the actor"
495+
}
496+
],
497+
"responses": {
498+
"200": {
499+
"description": "Response from actor's raw HTTP handler"
500+
}
501+
}
502+
},
503+
"post": {
504+
"parameters": [
505+
{
506+
"name": "actorId",
507+
"in": "path",
508+
"required": true,
509+
"schema": {
510+
"type": "string"
511+
},
512+
"description": "The ID of the actor to target"
513+
},
514+
{
515+
"name": "path",
516+
"in": "path",
517+
"required": true,
518+
"schema": {
519+
"type": "string"
520+
},
521+
"description": "The HTTP path to forward to the actor"
522+
}
523+
],
524+
"responses": {
525+
"200": {
526+
"description": "Response from actor's raw HTTP handler"
527+
}
528+
}
529+
},
530+
"put": {
531+
"parameters": [
532+
{
533+
"name": "actorId",
534+
"in": "path",
535+
"required": true,
536+
"schema": {
537+
"type": "string"
538+
},
539+
"description": "The ID of the actor to target"
540+
},
541+
{
542+
"name": "path",
543+
"in": "path",
544+
"required": true,
545+
"schema": {
546+
"type": "string"
547+
},
548+
"description": "The HTTP path to forward to the actor"
549+
}
550+
],
551+
"responses": {
552+
"200": {
553+
"description": "Response from actor's raw HTTP handler"
554+
}
555+
}
556+
},
557+
"delete": {
558+
"parameters": [
559+
{
560+
"name": "actorId",
561+
"in": "path",
562+
"required": true,
563+
"schema": {
564+
"type": "string"
565+
},
566+
"description": "The ID of the actor to target"
567+
},
568+
{
569+
"name": "path",
570+
"in": "path",
571+
"required": true,
572+
"schema": {
573+
"type": "string"
574+
},
575+
"description": "The HTTP path to forward to the actor"
576+
}
577+
],
578+
"responses": {
579+
"200": {
580+
"description": "Response from actor's raw HTTP handler"
581+
}
582+
}
583+
},
584+
"patch": {
585+
"parameters": [
586+
{
587+
"name": "actorId",
588+
"in": "path",
589+
"required": true,
590+
"schema": {
591+
"type": "string"
592+
},
593+
"description": "The ID of the actor to target"
594+
},
595+
{
596+
"name": "path",
597+
"in": "path",
598+
"required": true,
599+
"schema": {
600+
"type": "string"
601+
},
602+
"description": "The HTTP path to forward to the actor"
603+
}
604+
],
605+
"responses": {
606+
"200": {
607+
"description": "Response from actor's raw HTTP handler"
608+
}
609+
}
610+
},
611+
"head": {
612+
"parameters": [
613+
{
614+
"name": "actorId",
615+
"in": "path",
616+
"required": true,
617+
"schema": {
618+
"type": "string"
619+
},
620+
"description": "The ID of the actor to target"
621+
},
622+
{
623+
"name": "path",
624+
"in": "path",
625+
"required": true,
626+
"schema": {
627+
"type": "string"
628+
},
629+
"description": "The HTTP path to forward to the actor"
630+
}
631+
],
632+
"responses": {
633+
"200": {
634+
"description": "Response from actor's raw HTTP handler"
635+
}
636+
}
637+
},
638+
"options": {
639+
"parameters": [
640+
{
641+
"name": "actorId",
642+
"in": "path",
643+
"required": true,
644+
"schema": {
645+
"type": "string"
646+
},
647+
"description": "The ID of the actor to target"
648+
},
649+
{
650+
"name": "path",
651+
"in": "path",
652+
"required": true,
653+
"schema": {
654+
"type": "string"
655+
},
656+
"description": "The HTTP path to forward to the actor"
657+
}
658+
],
659+
"responses": {
660+
"200": {
661+
"description": "Response from actor's raw HTTP handler"
662+
}
663+
}
664+
}
334665
}
335666
}
336667
}

0 commit comments

Comments
 (0)