fix validation issue

This commit is contained in:
timothycarambat 2024-08-07 14:24:24 -07:00
parent d93c43fe68
commit c9e19264eb
2 changed files with 60 additions and 2 deletions
server
endpoints/api/embed
swagger

View file

@ -35,6 +35,17 @@ function apiEmbedEndpoints(app) {
"chat_mode": "chat",
"createdAt": "2023-04-02T14:30:00Z",
"workspace": {
"id": 1,
"name": "Workspace 1"
},
"chat_count": 10
}
]
}
}
}
}
}
#swagger.responses[403] = {
schema: {
"$ref": "#/definitions/InvalidAPIKey"

View file

@ -3150,10 +3150,57 @@
"parameters": [],
"responses": {
"200": {
"description": "OK"
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"example": {
"embeds": [
{
"id": 1,
"uuid": "embed-uuid-1",
"enabled": true,
"chat_mode": "query",
"createdAt": "2023-04-01T12:00:00Z",
"workspace": {
"id": 1,
"name": "Workspace 1"
},
"chat_count": 10
},
{
"id": 2,
"uuid": "embed-uuid-2",
"enabled": false,
"chat_mode": "chat",
"createdAt": "2023-04-02T14:30:00Z",
"workspace": {
"id": 1,
"name": "Workspace 1"
},
"chat_count": 10
}
]
}
}
}
}
},
"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"