Skip to content

Commit

Permalink
Feature/update api example outputs (#2547)
Browse files Browse the repository at this point in the history
* /v1/workspace/{slug} actually returns an array - update example output

* update swagger example to show array output
  • Loading branch information
MrSimonC authored Oct 29, 2024
1 parent 4eeac27 commit ccde891
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 24 deletions.
26 changes: 14 additions & 12 deletions server/endpoints/api/workspace/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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": []
}
]
}
}
}
Expand Down
26 changes: 14 additions & 12 deletions server/swagger/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1473,18 +1473,20 @@
"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": []
}
]
}
}
}
Expand Down

0 comments on commit ccde891

Please sign in to comment.