updated README

This commit is contained in:
ION606
2025-10-03 09:38:46 -04:00
parent e954bf82fb
commit 665fcbe191
9 changed files with 310 additions and 572 deletions
+93
View File
@@ -0,0 +1,93 @@
{
"openapi": "3.1.0",
"info": {
"title": "Container Code Runner",
"version": "1.0.0",
"description": "run source code inside a sandboxed container. important: provide pure source code only; do not wrap code in shell commands or pipelines."
},
"paths": {
"/execute": {
"post": {
"operationId": "execute",
"summary": "Run code in a sandboxed container",
"description": "use the language directly, not bash + the language. e.g., `#include...` (good) vs `echo '#include...' && gcc` (bad). pass only pure source text in `code`.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"language": {
"type": "string",
"enum": "Object.keys(LANGS)",
"description": "the programming language to run. do not use 'bash' to wrap or invoke compilers/interpreters; select the actual language (e.g., 'c', 'cpp', 'python')."
},
"code": {
"type": "string",
"description": "pure source code only. do not include shell commands, redirections, pipes, or `echo`/`printf` wrappers. examples:\n\tgood: `print('hi')`;\n\tbad: `echo \"print('hi')\" | python`."
},
"args": {
"type": "array",
"items": {
"type": "string"
}
},
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"path",
"content"
],
"description": "optional supporting files. contents must be pure file text, not shell commands."
}
}
},
"required": [
"language",
"code"
]
}
}
}
},
"responses": {
"200": {
"description": "Execution result",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"stdout": {
"type": "string"
},
"stderr": {
"type": "string"
},
"exitCode": {
"type": "integer"
},
"timedOut": {
"type": "boolean"
}
}
}
}
}
}
}
}
}
}
}