Skip to content

Commit

Permalink
chore(docs): generate swagger docs
Browse files Browse the repository at this point in the history
  • Loading branch information
powerfooI committed Mar 25, 2024
1 parent d630ce6 commit 3e5373a
Show file tree
Hide file tree
Showing 4 changed files with 383 additions and 5 deletions.
147 changes: 147 additions & 0 deletions internal/dashboard/generated/swagger/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,65 @@ const docTemplate = `{
}
}
},
"/api/v1/obclusters/conn/{sessionId}": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Connect to oceanbase database in websocket",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Terminal"
],
"summary": "Connect to oceanbase database",
"operationId": "ConnectDatabase",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.APIResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/response.OBConnection"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/api/v1/obclusters/namespace/{namespace}/name/{name}": {
"get": {
"security": [
Expand Down Expand Up @@ -1258,6 +1317,65 @@ const docTemplate = `{
}
}
},
"/api/v1/obclusters/namespace/{namespace}/name/{name}/session": {
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Create oceanbase cluster connection terminal",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Terminal"
],
"summary": "Create oceanbase cluster connection",
"operationId": "CreateOBClusterConnection",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.APIResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/response.OBConnection"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/api/v1/obclusters/statistic": {
"get": {
"description": "get obcluster statistic info",
Expand Down Expand Up @@ -4325,6 +4443,35 @@ const docTemplate = `{
}
}
},
"response.OBConnection": {
"type": "object",
"properties": {
"clientIp": {
"type": "string"
},
"cluster": {
"type": "string"
},
"namespace": {
"type": "string"
},
"password": {
"type": "string"
},
"pod": {
"type": "string"
},
"sessionId": {
"type": "string"
},
"tenant": {
"type": "string"
},
"user": {
"type": "string"
}
}
},
"response.OBMetrics": {
"type": "object",
"properties": {
Expand Down
147 changes: 147 additions & 0 deletions internal/dashboard/generated/swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,65 @@
}
}
},
"/api/v1/obclusters/conn/{sessionId}": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Connect to oceanbase database in websocket",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Terminal"
],
"summary": "Connect to oceanbase database",
"operationId": "ConnectDatabase",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.APIResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/response.OBConnection"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/api/v1/obclusters/namespace/{namespace}/name/{name}": {
"get": {
"security": [
Expand Down Expand Up @@ -1251,6 +1310,65 @@
}
}
},
"/api/v1/obclusters/namespace/{namespace}/name/{name}/session": {
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Create oceanbase cluster connection terminal",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Terminal"
],
"summary": "Create oceanbase cluster connection",
"operationId": "CreateOBClusterConnection",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.APIResponse"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/response.OBConnection"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.APIResponse"
}
}
}
}
},
"/api/v1/obclusters/statistic": {
"get": {
"description": "get obcluster statistic info",
Expand Down Expand Up @@ -4318,6 +4436,35 @@
}
}
},
"response.OBConnection": {
"type": "object",
"properties": {
"clientIp": {
"type": "string"
},
"cluster": {
"type": "string"
},
"namespace": {
"type": "string"
},
"password": {
"type": "string"
},
"pod": {
"type": "string"
},
"sessionId": {
"type": "string"
},
"tenant": {
"type": "string"
},
"user": {
"type": "string"
}
}
},
"response.OBMetrics": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit 3e5373a

Please sign in to comment.