summaryrefslogtreecommitdiff
path: root/schema/openapi.json
diff options
context:
space:
mode:
Diffstat (limited to 'schema/openapi.json')
-rw-r--r--schema/openapi.json1027
1 files changed, 1027 insertions, 0 deletions
diff --git a/schema/openapi.json b/schema/openapi.json
new file mode 100644
index 00000000..8880fd20
--- /dev/null
+++ b/schema/openapi.json
@@ -0,0 +1,1027 @@
+{
+ "openapi": "3.0.2",
+ "info": {
+ "title": "Continue API",
+ "description": "Continue API",
+ "version": "1.0"
+ },
+ "paths": {
+ "/debug/run": {
+ "post": {
+ "tags": ["debug"],
+ "summary": "Run",
+ "description": "Returns boolean indicating whether error was found, edited, and solved, or not all of these.",
+ "operationId": "run_debug_run_post",
+ "parameters": [
+ {
+ "required": true,
+ "schema": {
+ "title": "Filepath",
+ "type": "string"
+ },
+ "name": "filepath",
+ "in": "query"
+ },
+ {
+ "required": false,
+ "schema": {
+ "title": "Make Edit",
+ "type": "boolean",
+ "default": false
+ },
+ "name": "make_edit",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/debug/inline": {
+ "post": {
+ "tags": ["debug"],
+ "summary": "Inline",
+ "operationId": "inline_debug_inline_post",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/InlineBody"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CompletionResponse"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/debug/suggestion": {
+ "get": {
+ "tags": ["debug"],
+ "summary": "Suggestion",
+ "operationId": "suggestion_debug_suggestion_get",
+ "parameters": [
+ {
+ "required": true,
+ "schema": {
+ "title": "Traceback",
+ "type": "string"
+ },
+ "name": "traceback",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CompletionResponse"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/debug/list": {
+ "post": {
+ "tags": ["debug"],
+ "summary": "Listten",
+ "operationId": "listten_debug_list_post",
+ "parameters": [
+ {
+ "required": false,
+ "schema": {
+ "title": "X-Vsc-Machine-Id",
+ "type": "string",
+ "default": "anonymous"
+ },
+ "name": "x-vsc-machine-id",
+ "in": "header"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SerializedDebugContext"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CompletionResponse"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/debug/explain": {
+ "post": {
+ "tags": ["debug"],
+ "summary": "Explain",
+ "operationId": "explain_debug_explain_post",
+ "parameters": [
+ {
+ "required": false,
+ "schema": {
+ "title": "X-Vsc-Machine-Id",
+ "type": "string",
+ "default": "anonymous"
+ },
+ "name": "x-vsc-machine-id",
+ "in": "header"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SerializedDebugContext"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ExplainResponse"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/debug/edit": {
+ "post": {
+ "tags": ["debug"],
+ "summary": "Edit Endpoint",
+ "operationId": "edit_endpoint_debug_edit_post",
+ "parameters": [
+ {
+ "required": false,
+ "schema": {
+ "title": "X-Vsc-Machine-Id",
+ "type": "string",
+ "default": "anonymous"
+ },
+ "name": "x-vsc-machine-id",
+ "in": "header"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SerializedDebugContext"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EditResp"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/debug/find": {
+ "post": {
+ "tags": ["debug"],
+ "summary": "Find Sus Code Endpoint",
+ "operationId": "find_sus_code_endpoint_debug_find_post",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/FindBody"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/FindResp"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/debug/parse_traceback": {
+ "get": {
+ "tags": ["debug"],
+ "summary": "Parse Traceback Endpoint",
+ "operationId": "parse_traceback_endpoint_debug_parse_traceback_get",
+ "parameters": [
+ {
+ "required": true,
+ "schema": {
+ "title": "Traceback",
+ "type": "string"
+ },
+ "name": "traceback",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Traceback"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/debug/find_docs": {
+ "get": {
+ "tags": ["debug"],
+ "summary": "Find Docs Endpoint",
+ "operationId": "find_docs_endpoint_debug_find_docs_get",
+ "parameters": [
+ {
+ "required": true,
+ "schema": {
+ "title": "Traceback",
+ "type": "string"
+ },
+ "name": "traceback",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OptionalCompletionResponse"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/docstring/forline": {
+ "get": {
+ "tags": ["docstring"],
+ "summary": "Forline",
+ "description": "Write a docstring for a function at a line number",
+ "operationId": "forline_docstring_forline_get",
+ "parameters": [
+ {
+ "required": true,
+ "schema": {
+ "title": "Filecontents",
+ "type": "string"
+ },
+ "name": "filecontents",
+ "in": "query"
+ },
+ {
+ "required": true,
+ "schema": {
+ "title": "Lineno",
+ "type": "integer"
+ },
+ "name": "lineno",
+ "in": "query"
+ },
+ {
+ "required": false,
+ "schema": {
+ "title": "Format",
+ "type": "string",
+ "default": "google"
+ },
+ "name": "format",
+ "in": "query"
+ },
+ {
+ "required": false,
+ "schema": {
+ "title": "X-Vsc-Machine-Id",
+ "type": "string",
+ "default": "anonymous"
+ },
+ "name": "x-vsc-machine-id",
+ "in": "header"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/unittest/forline": {
+ "post": {
+ "tags": ["unittest"],
+ "summary": "Forline",
+ "description": "Write unit test for the function encapsulating the given line number.",
+ "operationId": "forline_unittest_forline_post",
+ "parameters": [
+ {
+ "required": false,
+ "schema": {
+ "title": "X-Vsc-Machine-Id",
+ "type": "string",
+ "default": "anonymous"
+ },
+ "name": "x-vsc-machine-id",
+ "in": "header"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/FilePosition"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CompletionResponse"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/unittest/failingtest": {
+ "post": {
+ "tags": ["unittest"],
+ "summary": "Failingtest",
+ "description": "Write a failing test for the function encapsulating the given line number.",
+ "operationId": "failingtest_unittest_failingtest_post",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/FailingTestBody"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CompletionResponse"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/chat/test": {
+ "get": {
+ "tags": ["chat"],
+ "summary": "Test",
+ "operationId": "test_chat_test_get",
+ "parameters": [
+ {
+ "required": true,
+ "schema": {
+ "title": "Prompt",
+ "type": "string"
+ },
+ "name": "prompt",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/chat/complete": {
+ "post": {
+ "tags": ["chat"],
+ "summary": "Complete",
+ "operationId": "complete_chat_complete_post",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ChatHistory"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HTTPValidationError"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/test": {
+ "get": {
+ "summary": "Test",
+ "operationId": "test_test_get",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "ChatHistory": {
+ "title": "ChatHistory",
+ "required": ["messages"],
+ "type": "object",
+ "properties": {
+ "messages": {
+ "title": "Messages",
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ChatMessage"
+ }
+ }
+ }
+ },
+ "ChatMessage": {
+ "title": "ChatMessage",
+ "required": ["role", "content"],
+ "type": "object",
+ "properties": {
+ "role": {
+ "title": "Role",
+ "type": "string"
+ },
+ "content": {
+ "title": "Content",
+ "type": "string"
+ }
+ }
+ },
+ "CompletionResponse": {
+ "title": "CompletionResponse",
+ "required": ["completion"],
+ "type": "object",
+ "properties": {
+ "completion": {
+ "title": "Completion",
+ "type": "string"
+ }
+ }
+ },
+ "EditResp": {
+ "title": "EditResp",
+ "required": ["completion"],
+ "type": "object",
+ "properties": {
+ "completion": {
+ "title": "Completion",
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/FileEdit"
+ }
+ }
+ }
+ },
+ "ExplainResponse": {
+ "title": "ExplainResponse",
+ "required": ["completion"],
+ "type": "object",
+ "properties": {
+ "completion": {
+ "title": "Completion",
+ "type": "string"
+ }
+ }
+ },
+ "FailingTestBody": {
+ "title": "FailingTestBody",
+ "required": ["description", "fp"],
+ "type": "object",
+ "properties": {
+ "description": {
+ "title": "Description",
+ "type": "string"
+ },
+ "fp": {
+ "$ref": "#/components/schemas/FilePosition"
+ }
+ },
+ "description": "A failing test body."
+ },
+ "FileEdit": {
+ "title": "FileEdit",
+ "required": ["filepath", "range", "replacement"],
+ "type": "object",
+ "properties": {
+ "filepath": {
+ "title": "Filepath",
+ "type": "string"
+ },
+ "range": {
+ "$ref": "#/components/schemas/Range"
+ },
+ "replacement": {
+ "title": "Replacement",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "FilePosition": {
+ "title": "FilePosition",
+ "required": ["filecontents", "lineno"],
+ "type": "object",
+ "properties": {
+ "filecontents": {
+ "title": "Filecontents",
+ "type": "string"
+ },
+ "lineno": {
+ "title": "Lineno",
+ "type": "integer"
+ }
+ },
+ "description": "A position in a file."
+ },
+ "FindBody": {
+ "title": "FindBody",
+ "required": ["traceback", "filesystem"],
+ "type": "object",
+ "properties": {
+ "traceback": {
+ "title": "Traceback",
+ "type": "string"
+ },
+ "filesystem": {
+ "title": "Filesystem",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "description": {
+ "title": "Description",
+ "type": "string"
+ }
+ }
+ },
+ "FindResp": {
+ "title": "FindResp",
+ "required": ["response"],
+ "type": "object",
+ "properties": {
+ "response": {
+ "title": "Response",
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/RangeInFile"
+ }
+ }
+ }
+ },
+ "HTTPValidationError": {
+ "title": "HTTPValidationError",
+ "type": "object",
+ "properties": {
+ "detail": {
+ "title": "Detail",
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ValidationError"
+ }
+ }
+ }
+ },
+ "InlineBody": {
+ "title": "InlineBody",
+ "required": ["filecontents", "startline", "endline"],
+ "type": "object",
+ "properties": {
+ "filecontents": {
+ "title": "Filecontents",
+ "type": "string"
+ },
+ "startline": {
+ "title": "Startline",
+ "type": "integer"
+ },
+ "endline": {
+ "title": "Endline",
+ "type": "integer"
+ },
+ "traceback": {
+ "title": "Traceback",
+ "type": "string",
+ "default": ""
+ }
+ }
+ },
+ "OptionalCompletionResponse": {
+ "title": "OptionalCompletionResponse",
+ "type": "object",
+ "properties": {
+ "completion": {
+ "title": "Completion",
+ "type": "string"
+ }
+ }
+ },
+ "Position": {
+ "title": "Position",
+ "required": ["line", "character"],
+ "type": "object",
+ "properties": {
+ "line": {
+ "title": "Line",
+ "type": "integer"
+ },
+ "character": {
+ "title": "Character",
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false
+ },
+ "ProgrammingLangauge": {
+ "title": "ProgrammingLangauge",
+ "enum": ["python", "javascript", "typescript"],
+ "type": "string",
+ "description": "An enumeration."
+ },
+ "Range": {
+ "title": "Range",
+ "required": ["start", "end"],
+ "type": "object",
+ "properties": {
+ "start": {
+ "$ref": "#/components/schemas/Position"
+ },
+ "end": {
+ "$ref": "#/components/schemas/Position"
+ }
+ },
+ "additionalProperties": false,
+ "description": "A range in a file. 0-indexed."
+ },
+ "RangeInFile": {
+ "title": "RangeInFile",
+ "required": ["filepath", "range"],
+ "type": "object",
+ "properties": {
+ "filepath": {
+ "title": "Filepath",
+ "type": "string"
+ },
+ "range": {
+ "$ref": "#/components/schemas/Range"
+ }
+ },
+ "additionalProperties": false
+ },
+ "SerializedDebugContext": {
+ "title": "SerializedDebugContext",
+ "required": ["ranges_in_files", "filesystem"],
+ "type": "object",
+ "properties": {
+ "traceback": {
+ "title": "Traceback",
+ "type": "string"
+ },
+ "ranges_in_files": {
+ "title": "Ranges In Files",
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/RangeInFile"
+ }
+ },
+ "filesystem": {
+ "title": "Filesystem",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "description": {
+ "title": "Description",
+ "type": "string"
+ }
+ }
+ },
+ "Traceback": {
+ "title": "Traceback",
+ "required": ["frames", "message", "error_type", "language"],
+ "type": "object",
+ "properties": {
+ "frames": {
+ "title": "Frames",
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/TracebackFrame"
+ }
+ },
+ "message": {
+ "title": "Message",
+ "type": "string"
+ },
+ "error_type": {
+ "title": "Error Type",
+ "type": "string"
+ },
+ "language": {
+ "$ref": "#/components/schemas/ProgrammingLangauge"
+ },
+ "full_traceback": {
+ "title": "Full Traceback",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "TracebackFrame": {
+ "title": "TracebackFrame",
+ "required": ["filepath", "lineno", "function"],
+ "type": "object",
+ "properties": {
+ "filepath": {
+ "title": "Filepath",
+ "type": "string"
+ },
+ "lineno": {
+ "title": "Lineno",
+ "type": "integer"
+ },
+ "function": {
+ "title": "Function",
+ "type": "string"
+ },
+ "code": {
+ "title": "Code",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "ValidationError": {
+ "title": "ValidationError",
+ "required": ["loc", "msg", "type"],
+ "type": "object",
+ "properties": {
+ "loc": {
+ "title": "Location",
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "integer"
+ }
+ ]
+ }
+ },
+ "msg": {
+ "title": "Message",
+ "type": "string"
+ },
+ "type": {
+ "title": "Error Type",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+}