From defeb96c38e57bafc83651411481fc05d9596ba3 Mon Sep 17 00:00:00 2001 From: timothycarambat <rambat1010@gmail.com> Date: Tue, 18 Feb 2025 16:02:55 -0800 Subject: [PATCH] patch swagger --- server/endpoints/api/document/index.js | 11 ++++-- server/swagger/openapi.json | 48 +++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 3 deletions(-) diff --git a/server/endpoints/api/document/index.js b/server/endpoints/api/document/index.js index 014784fe4..f07d18685 100644 --- a/server/endpoints/api/document/index.js +++ b/server/endpoints/api/document/index.js @@ -423,9 +423,16 @@ function apiDocumentEndpoints(app) { cached: false, pinnedWorkspaces: [], watched: false, - // ... other document metadata + more: "data", + }, + { + name: "document2.json", + type: "file", + cached: false, + pinnedWorkspaces: [], + watched: false, + more: "data", }, - // more documents ] } } diff --git a/server/swagger/openapi.json b/server/swagger/openapi.json index 3c52dc164..dd45fe34b 100644 --- a/server/swagger/openapi.json +++ b/server/swagger/openapi.json @@ -1142,8 +1142,54 @@ } ], "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "example": { + "folder": "custom-documents", + "documents": [ + { + "name": "document1.json", + "type": "file", + "cached": false, + "pinnedWorkspaces": [], + "watched": false, + "more": "data" + }, + { + "name": "document2.json", + "type": "file", + "cached": false, + "pinnedWorkspaces": [], + "watched": false, + "more": "data" + } + ] + } + } + } + } + }, "403": { - "description": "Forbidden" + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidAPIKey" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/InvalidAPIKey" + } + } + } + }, + "500": { + "description": "Internal Server Error" } } } -- GitLab