Skip to content

Commit

Permalink
feat: Add websocket tags and real-time log endpoint, update Swagger U…
Browse files Browse the repository at this point in the history
…I tags sorter
  • Loading branch information
lifegpc committed Jan 9, 2025
1 parent bbfa06c commit ad3e836
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
27 changes: 25 additions & 2 deletions api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ paths:
{ "ok": false, "status": 403, "error": "Permission denied." }
/config:
get:
tags: [config, admin]
tags: [config, admin, websocket]
operationId: getConfig
summary: Get server's configuration
parameters:
Expand Down Expand Up @@ -2842,6 +2842,29 @@ paths:
$ref: "#/components/schemas/ApiResponseError"
example:
{ "ok": false, "status": 404, "error": "log not found." }
/log/realtime:
get:
tags: [logs, websocket]
summary: Create a websocket connection to receive real-time log
operationId: getRealtimeLogs
responses:
"101":
description: Switching Protocols to websocket
"401":
description: Authorization information is missing or invalid
content:
application/json:
schema:
$ref: "#/components/schemas/ApiResponseError"
example: { "ok": false, "status": 401, "error": "Unauthorized" }
"403":
description: Permission denied
content:
application/json:
schema:
$ref: "#/components/schemas/ApiResponseError"
example:
{ "ok": false, "status": 403, "error": "Permission denied." }
/shared_token:
delete:
tags: [token]
Expand Down Expand Up @@ -3202,7 +3225,7 @@ paths:
{ "ok": false, "status": 403, "error": "Permission denied." }
/task:
get:
tags: [task]
tags: [task, websocket]
operationId: createTaskConnection
summary: Create a websocket connection to receive task event
responses:
Expand Down
1 change: 1 addition & 0 deletions static/swagger-initializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ window.onload = function() {
],
layout: "StandaloneLayout",
validatorUrl: null,
tagsSorter: 'alpha',
});

//</editor-fold>
Expand Down

0 comments on commit ad3e836

Please sign in to comment.