Skip to content

Commit ad3e836

Browse files
committed
feat: Add websocket tags and real-time log endpoint, update Swagger UI tags sorter
1 parent bbfa06c commit ad3e836

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

api.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ paths:
14221422
{ "ok": false, "status": 403, "error": "Permission denied." }
14231423
/config:
14241424
get:
1425-
tags: [config, admin]
1425+
tags: [config, admin, websocket]
14261426
operationId: getConfig
14271427
summary: Get server's configuration
14281428
parameters:
@@ -2842,6 +2842,29 @@ paths:
28422842
$ref: "#/components/schemas/ApiResponseError"
28432843
example:
28442844
{ "ok": false, "status": 404, "error": "log not found." }
2845+
/log/realtime:
2846+
get:
2847+
tags: [logs, websocket]
2848+
summary: Create a websocket connection to receive real-time log
2849+
operationId: getRealtimeLogs
2850+
responses:
2851+
"101":
2852+
description: Switching Protocols to websocket
2853+
"401":
2854+
description: Authorization information is missing or invalid
2855+
content:
2856+
application/json:
2857+
schema:
2858+
$ref: "#/components/schemas/ApiResponseError"
2859+
example: { "ok": false, "status": 401, "error": "Unauthorized" }
2860+
"403":
2861+
description: Permission denied
2862+
content:
2863+
application/json:
2864+
schema:
2865+
$ref: "#/components/schemas/ApiResponseError"
2866+
example:
2867+
{ "ok": false, "status": 403, "error": "Permission denied." }
28452868
/shared_token:
28462869
delete:
28472870
tags: [token]
@@ -3202,7 +3225,7 @@ paths:
32023225
{ "ok": false, "status": 403, "error": "Permission denied." }
32033226
/task:
32043227
get:
3205-
tags: [task]
3228+
tags: [task, websocket]
32063229
operationId: createTaskConnection
32073230
summary: Create a websocket connection to receive task event
32083231
responses:

static/swagger-initializer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ window.onload = function() {
1515
],
1616
layout: "StandaloneLayout",
1717
validatorUrl: null,
18+
tagsSorter: 'alpha',
1819
});
1920

2021
//</editor-fold>

0 commit comments

Comments
 (0)