From 9aaf16e82a51d748f11355f5019628d4703f799f Mon Sep 17 00:00:00 2001 From: Mr Simon C Date: Sun, 27 Oct 2024 22:30:49 +0000 Subject: [PATCH 1/2] /v1/workspace/{slug} actually returns an array - update example output --- server/swagger/openapi.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/swagger/openapi.json b/server/swagger/openapi.json index fb343ee8362..8d06b150eba 100644 --- a/server/swagger/openapi.json +++ b/server/swagger/openapi.json @@ -1473,7 +1473,8 @@ "schema": { "type": "object", "example": { - "workspace": { + "workspace": [ + { "id": 79, "name": "My workspace", "slug": "my-workspace-123", @@ -1484,7 +1485,8 @@ "openAiPrompt": null, "documents": [], "threads": [] - } + } + ] } } } From d4dbb4a761d96d9d533fd4485be3a04a65e3a090 Mon Sep 17 00:00:00 2001 From: Mr Simon C Date: Mon, 28 Oct 2024 22:21:00 +0000 Subject: [PATCH 2/2] update swagger example to show array output --- server/endpoints/api/workspace/index.js | 26 +++++++++++++------------ server/swagger/openapi.json | 20 +++++++++---------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/server/endpoints/api/workspace/index.js b/server/endpoints/api/workspace/index.js index dca21e49f6b..090d5c7afa0 100644 --- a/server/endpoints/api/workspace/index.js +++ b/server/endpoints/api/workspace/index.js @@ -150,18 +150,20 @@ function apiWorkspaceEndpoints(app) { schema: { type: 'object', example: { - workspace: { - "id": 79, - "name": "My workspace", - "slug": "my-workspace-123", - "createdAt": "2023-08-17 00:45:03", - "openAiTemp": null, - "lastUpdatedAt": "2023-08-17 00:45:03", - "openAiHistory": 20, - "openAiPrompt": null, - "documents": [], - "threads": [] - } + workspace: [ + { + "id": 79, + "name": "My workspace", + "slug": "my-workspace-123", + "createdAt": "2023-08-17 00:45:03", + "openAiTemp": null, + "lastUpdatedAt": "2023-08-17 00:45:03", + "openAiHistory": 20, + "openAiPrompt": null, + "documents": [], + "threads": [] + } + ] } } } diff --git a/server/swagger/openapi.json b/server/swagger/openapi.json index 8d06b150eba..9406ad4249a 100644 --- a/server/swagger/openapi.json +++ b/server/swagger/openapi.json @@ -1475,16 +1475,16 @@ "example": { "workspace": [ { - "id": 79, - "name": "My workspace", - "slug": "my-workspace-123", - "createdAt": "2023-08-17 00:45:03", - "openAiTemp": null, - "lastUpdatedAt": "2023-08-17 00:45:03", - "openAiHistory": 20, - "openAiPrompt": null, - "documents": [], - "threads": [] + "id": 79, + "name": "My workspace", + "slug": "my-workspace-123", + "createdAt": "2023-08-17 00:45:03", + "openAiTemp": null, + "lastUpdatedAt": "2023-08-17 00:45:03", + "openAiHistory": 20, + "openAiPrompt": null, + "documents": [], + "threads": [] } ] }