From 815f641259f44e72369df2af3ce01af2a58a0b49 Mon Sep 17 00:00:00 2001 From: seokho-son Date: Mon, 18 Sep 2023 06:50:16 +0000 Subject: [PATCH] Update Swagger REST API doc --- src/api/rest/docs/docs.go | 35 ++++++++++++++++++++++++++++++++++ src/api/rest/docs/swagger.json | 35 ++++++++++++++++++++++++++++++++++ src/api/rest/docs/swagger.yaml | 24 +++++++++++++++++++++++ 3 files changed, 94 insertions(+) diff --git a/src/api/rest/docs/docs.go b/src/api/rest/docs/docs.go index 7ea90666..f37c5b96 100644 --- a/src/api/rest/docs/docs.go +++ b/src/api/rest/docs/docs.go @@ -329,6 +329,41 @@ const docTemplate = `{ } } }, + "/httpVersion": { + "get": { + "description": "Checks and logs the HTTP version of the incoming request to the server console.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Admin] System management" + ], + "summary": "Check HTTP version of incoming request", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/common.SimpleMsg" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/common.SimpleMsg" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/common.SimpleMsg" + } + } + } + } + }, "/inspectResources": { "post": { "description": "Inspect Resources (vNet, securityGroup, sshKey, vm) registered in CB-Tumblebug, CB-Spider, CSP", diff --git a/src/api/rest/docs/swagger.json b/src/api/rest/docs/swagger.json index 6cb783b6..4471af89 100644 --- a/src/api/rest/docs/swagger.json +++ b/src/api/rest/docs/swagger.json @@ -322,6 +322,41 @@ } } }, + "/httpVersion": { + "get": { + "description": "Checks and logs the HTTP version of the incoming request to the server console.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Admin] System management" + ], + "summary": "Check HTTP version of incoming request", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/common.SimpleMsg" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/common.SimpleMsg" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/common.SimpleMsg" + } + } + } + } + }, "/inspectResources": { "post": { "description": "Inspect Resources (vNet, securityGroup, sshKey, vm) registered in CB-Tumblebug, CB-Spider, CSP", diff --git a/src/api/rest/docs/swagger.yaml b/src/api/rest/docs/swagger.yaml index ff0e1af0..e74369d7 100644 --- a/src/api/rest/docs/swagger.yaml +++ b/src/api/rest/docs/swagger.yaml @@ -2649,6 +2649,30 @@ paths: summary: Check Tumblebug is alive tags: - '[Admin] System management' + /httpVersion: + get: + consumes: + - application/json + description: Checks and logs the HTTP version of the incoming request to the + server console. + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/common.SimpleMsg' + "404": + description: Not Found + schema: + $ref: '#/definitions/common.SimpleMsg' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/common.SimpleMsg' + summary: Check HTTP version of incoming request + tags: + - '[Admin] System management' /inspectResources: post: consumes: