initial commit
This commit is contained in:
62
interfaces/openrpc.json
Normal file
62
interfaces/openrpc.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"openrpc": "1.2.6",
|
||||
"info": {
|
||||
"title": "Circle WebSocket Server API",
|
||||
"version": "0.1.0",
|
||||
"description": "API for interacting with a Circle's WebSocket server, primarily for Rhai script execution."
|
||||
},
|
||||
"methods": [
|
||||
{
|
||||
"name": "play",
|
||||
"summary": "Executes a Rhai script on the server.",
|
||||
"params": [
|
||||
{
|
||||
"name": "script",
|
||||
"description": "The Rhai script to execute.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"name": "playResult",
|
||||
"description": "The output from the executed Rhai script.",
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PlayResult"
|
||||
}
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"name": "Simple Script Execution",
|
||||
"params": [
|
||||
{
|
||||
"name": "script",
|
||||
"value": "let x = 10; x * 2"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"name": "playResult",
|
||||
"value": {
|
||||
"output": "20"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"components": {
|
||||
"schemas": {
|
||||
"PlayResult": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"output": {
|
||||
"type": "string",
|
||||
"description": "The string representation of the Rhai script's evaluation result."
|
||||
}
|
||||
},
|
||||
"required": ["output"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user