Skip to content

Commit

Permalink
Merge pull request #1763 from actiontech/ee-901
Browse files Browse the repository at this point in the history
chore:swagger api def
  • Loading branch information
ColdWaterLW authored Aug 29, 2023
2 parents d569fe7 + ab7919a commit 8b1a6d2
Show file tree
Hide file tree
Showing 4 changed files with 310 additions and 0 deletions.
44 changes: 44 additions & 0 deletions sqle/api/controller/v1/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -1359,3 +1359,47 @@ func TestWorkflowWebHookConfig(c echo.Context) error {
Data: *data,
})
}

type GetFeishuAuditConfigurationResV1 struct {
controller.BaseRes
Data FeishuConfigurationV1 `json:"data"`
}

// GetFeishuAuditConfigurationV1
// @Summary 获取飞书审核配置
// @Description get feishu audit configuration
// @Id getFeishuAuditConfigurationV1
// @Tags configuration
// @Security ApiKeyAuth
// @Success 200 {object} v1.GetFeishuAuditConfigurationResV1
// @router /v1/configurations/feishu_audit [get]
func GetFeishuAuditConfigurationV1(c echo.Context) error {
return nil
}

// UpdateFeishuAuditConfigurationV1
// @Summary 添加或更新飞书配置
// @Description update feishu audit configuration
// @Accept json
// @Id updateFeishuAuditConfigurationV1
// @Tags configuration
// @Security ApiKeyAuth
// @Param param body v1.UpdateFeishuConfigurationReqV1 true "update feishu audit configuration req"
// @Success 200 {object} controller.BaseRes
// @router /v1/configurations/feishu_audit [patch]
func UpdateFeishuAuditConfigurationV1(c echo.Context) error {
return nil
}

// TestFeishuAuditConfigV1
// @Summary 测试飞书审批配置
// @Description test feishu audit configuration
// @Accept json
// @Id testFeishuAuditConfigV1
// @Tags configuration
// @Security ApiKeyAuth
// @Success 200 {object} v1.TestFeishuConfigResV1
// @router /v1/configurations/feishu_audit/test [post]
func TestFeishuAuditConfigV1(c echo.Context) error {
return nil
}
101 changes: 101 additions & 0 deletions sqle/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,90 @@ var doc = `{
}
}
},
"/v1/configurations/feishu_audit": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get feishu audit configuration",
"tags": [
"configuration"
],
"summary": "获取飞书审核配置",
"operationId": "getFeishuAuditConfigurationV1",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/v1.GetFeishuAuditConfigurationResV1"
}
}
}
},
"patch": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update feishu audit configuration",
"consumes": [
"application/json"
],
"tags": [
"configuration"
],
"summary": "添加或更新飞书配置",
"operationId": "updateFeishuAuditConfigurationV1",
"parameters": [
{
"description": "update feishu audit configuration req",
"name": "param",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.UpdateFeishuConfigurationReqV1"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.BaseRes"
}
}
}
}
},
"/v1/configurations/feishu_audit/test": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "test feishu audit configuration",
"consumes": [
"application/json"
],
"tags": [
"configuration"
],
"summary": "测试飞书审批配置",
"operationId": "testFeishuAuditConfigV1",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/v1.TestFeishuConfigResV1"
}
}
}
}
},
"/v1/configurations/ldap": {
"get": {
"security": [
Expand Down Expand Up @@ -10680,6 +10764,23 @@ var doc = `{
}
}
},
"v1.GetFeishuAuditConfigurationResV1": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 0
},
"data": {
"type": "object",
"$ref": "#/definitions/v1.FeishuConfigurationV1"
},
"message": {
"type": "string",
"example": "ok"
}
}
},
"v1.GetFeishuConfigurationResV1": {
"type": "object",
"properties": {
Expand Down
101 changes: 101 additions & 0 deletions sqle/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,90 @@
}
}
},
"/v1/configurations/feishu_audit": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get feishu audit configuration",
"tags": [
"configuration"
],
"summary": "获取飞书审核配置",
"operationId": "getFeishuAuditConfigurationV1",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/v1.GetFeishuAuditConfigurationResV1"
}
}
}
},
"patch": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update feishu audit configuration",
"consumes": [
"application/json"
],
"tags": [
"configuration"
],
"summary": "添加或更新飞书配置",
"operationId": "updateFeishuAuditConfigurationV1",
"parameters": [
{
"description": "update feishu audit configuration req",
"name": "param",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.UpdateFeishuConfigurationReqV1"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.BaseRes"
}
}
}
}
},
"/v1/configurations/feishu_audit/test": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "test feishu audit configuration",
"consumes": [
"application/json"
],
"tags": [
"configuration"
],
"summary": "测试飞书审批配置",
"operationId": "testFeishuAuditConfigV1",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/v1.TestFeishuConfigResV1"
}
}
}
}
},
"/v1/configurations/ldap": {
"get": {
"security": [
Expand Down Expand Up @@ -10664,6 +10748,23 @@
}
}
},
"v1.GetFeishuAuditConfigurationResV1": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 0
},
"data": {
"type": "object",
"$ref": "#/definitions/v1.FeishuConfigurationV1"
},
"message": {
"type": "string",
"example": "ok"
}
}
},
"v1.GetFeishuConfigurationResV1": {
"type": "object",
"properties": {
Expand Down
64 changes: 64 additions & 0 deletions sqle/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,18 @@ definitions:
example: ok
type: string
type: object
v1.GetFeishuAuditConfigurationResV1:
properties:
code:
example: 0
type: integer
data:
$ref: '#/definitions/v1.FeishuConfigurationV1'
type: object
message:
example: ok
type: string
type: object
v1.GetFeishuConfigurationResV1:
properties:
code:
Expand Down Expand Up @@ -4877,6 +4889,58 @@ paths:
summary: 测试飞书配置
tags:
- configuration
/v1/configurations/feishu_audit:
get:
description: get feishu audit configuration
operationId: getFeishuAuditConfigurationV1
responses:
"200":
description: OK
schema:
$ref: '#/definitions/v1.GetFeishuAuditConfigurationResV1'
security:
- ApiKeyAuth: []
summary: 获取飞书审核配置
tags:
- configuration
patch:
consumes:
- application/json
description: update feishu audit configuration
operationId: updateFeishuAuditConfigurationV1
parameters:
- description: update feishu audit configuration req
in: body
name: param
required: true
schema:
$ref: '#/definitions/v1.UpdateFeishuConfigurationReqV1'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.BaseRes'
security:
- ApiKeyAuth: []
summary: 添加或更新飞书配置
tags:
- configuration
/v1/configurations/feishu_audit/test:
post:
consumes:
- application/json
description: test feishu audit configuration
operationId: testFeishuAuditConfigV1
responses:
"200":
description: OK
schema:
$ref: '#/definitions/v1.TestFeishuConfigResV1'
security:
- ApiKeyAuth: []
summary: 测试飞书审批配置
tags:
- configuration
/v1/configurations/ldap:
get:
description: get LDAP configuration
Expand Down

0 comments on commit 8b1a6d2

Please sign in to comment.