update
This commit is contained in:
parent
ce9bd1ccfe
commit
1ce37a91ce
97
docs/docs.go
97
docs/docs.go
@ -58,14 +58,14 @@ const docTemplate = `{
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "文档块不存在",
|
"description": "文档块不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ const docTemplate = `{
|
|||||||
"404": {
|
"404": {
|
||||||
"description": "文档块不存在",
|
"description": "文档块不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -144,14 +144,14 @@ const docTemplate = `{
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "文档块不存在",
|
"description": "文档块不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -193,14 +193,14 @@ const docTemplate = `{
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "工作空间不存在",
|
"description": "工作空间不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -247,13 +247,13 @@ const docTemplate = `{
|
|||||||
"403": {
|
"403": {
|
||||||
"description": "无权访问",
|
"description": "无权访问",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "集合不存在或父文档不存在",
|
"description": "集合不存在或父文档不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -291,7 +291,7 @@ const docTemplate = `{
|
|||||||
"404": {
|
"404": {
|
||||||
"description": "集合不存在",
|
"description": "集合不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -338,14 +338,14 @@ const docTemplate = `{
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "集合不存在",
|
"description": "集合不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -375,13 +375,13 @@ const docTemplate = `{
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "集合不存在",
|
"description": "集合不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -423,20 +423,20 @@ const docTemplate = `{
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "无权访问",
|
"description": "无权访问",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "集合不存在或父文档不存在",
|
"description": "集合不存在或父文档不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -477,7 +477,7 @@ const docTemplate = `{
|
|||||||
"404": {
|
"404": {
|
||||||
"description": "文档不存在",
|
"description": "文档不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -524,14 +524,14 @@ const docTemplate = `{
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "文档不存在",
|
"description": "文档不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -569,13 +569,13 @@ const docTemplate = `{
|
|||||||
"403": {
|
"403": {
|
||||||
"description": "无权访问",
|
"description": "无权访问",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "文档不存在",
|
"description": "文档不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -622,14 +622,14 @@ const docTemplate = `{
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "文档不存在",
|
"description": "文档不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -662,7 +662,7 @@ const docTemplate = `{
|
|||||||
"404": {
|
"404": {
|
||||||
"description": "文档不存在",
|
"description": "文档不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -728,7 +728,7 @@ const docTemplate = `{
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -767,7 +767,7 @@ const docTemplate = `{
|
|||||||
"404": {
|
"404": {
|
||||||
"description": "工作空间不存在",
|
"description": "工作空间不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -800,7 +800,7 @@ const docTemplate = `{
|
|||||||
"404": {
|
"404": {
|
||||||
"description": "工作空间不存在",
|
"description": "工作空间不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -832,13 +832,16 @@ const docTemplate = `{
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/entity.Workspace"
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/entity.WorkspaceMember"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "工作空间不存在",
|
"description": "工作空间不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -885,20 +888,20 @@ const docTemplate = `{
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "工作空间不存在",
|
"description": "工作空间不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"409": {
|
"409": {
|
||||||
"description": "成员已存在",
|
"description": "成员已存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -937,13 +940,13 @@ const docTemplate = `{
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "工作空间不存在或成员不存在",
|
"description": "工作空间不存在或成员不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -984,7 +987,7 @@ const docTemplate = `{
|
|||||||
"404": {
|
"404": {
|
||||||
"description": "工作空间不存在",
|
"description": "工作空间不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1100,9 +1103,6 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.Response": {
|
|
||||||
"type": "object"
|
|
||||||
},
|
|
||||||
"dto.UpdateBlockRequest": {
|
"dto.UpdateBlockRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
@ -1130,14 +1130,6 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.ValidateError": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"message": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"entity.Document": {
|
"entity.Document": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -1292,6 +1284,17 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"response.Response": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"response.ValidateError": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"message": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"user.ID": {
|
"user.ID": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
|
@ -49,14 +49,14 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "文档块不存在",
|
"description": "文档块不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@
|
|||||||
"404": {
|
"404": {
|
||||||
"description": "文档块不存在",
|
"description": "文档块不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -135,14 +135,14 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "文档块不存在",
|
"description": "文档块不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -184,14 +184,14 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "工作空间不存在",
|
"description": "工作空间不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -238,13 +238,13 @@
|
|||||||
"403": {
|
"403": {
|
||||||
"description": "无权访问",
|
"description": "无权访问",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "集合不存在或父文档不存在",
|
"description": "集合不存在或父文档不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -282,7 +282,7 @@
|
|||||||
"404": {
|
"404": {
|
||||||
"description": "集合不存在",
|
"description": "集合不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -329,14 +329,14 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "集合不存在",
|
"description": "集合不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -366,13 +366,13 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "集合不存在",
|
"description": "集合不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -414,20 +414,20 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "无权访问",
|
"description": "无权访问",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "集合不存在或父文档不存在",
|
"description": "集合不存在或父文档不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -468,7 +468,7 @@
|
|||||||
"404": {
|
"404": {
|
||||||
"description": "文档不存在",
|
"description": "文档不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -515,14 +515,14 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "文档不存在",
|
"description": "文档不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -560,13 +560,13 @@
|
|||||||
"403": {
|
"403": {
|
||||||
"description": "无权访问",
|
"description": "无权访问",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "文档不存在",
|
"description": "文档不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -613,14 +613,14 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "文档不存在",
|
"description": "文档不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -653,7 +653,7 @@
|
|||||||
"404": {
|
"404": {
|
||||||
"description": "文档不存在",
|
"description": "文档不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -719,7 +719,7 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -758,7 +758,7 @@
|
|||||||
"404": {
|
"404": {
|
||||||
"description": "工作空间不存在",
|
"description": "工作空间不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -791,7 +791,7 @@
|
|||||||
"404": {
|
"404": {
|
||||||
"description": "工作空间不存在",
|
"description": "工作空间不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -823,13 +823,16 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/entity.Workspace"
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/entity.WorkspaceMember"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "工作空间不存在",
|
"description": "工作空间不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -876,20 +879,20 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/dto.ValidateError"
|
"$ref": "#/definitions/response.ValidateError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "工作空间不存在",
|
"description": "工作空间不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"409": {
|
"409": {
|
||||||
"description": "成员已存在",
|
"description": "成员已存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -928,13 +931,13 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "工作空间不存在或成员不存在",
|
"description": "工作空间不存在或成员不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -975,7 +978,7 @@
|
|||||||
"404": {
|
"404": {
|
||||||
"description": "工作空间不存在",
|
"description": "工作空间不存在",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.Response"
|
"$ref": "#/definitions/response.Response"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1091,9 +1094,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.Response": {
|
|
||||||
"type": "object"
|
|
||||||
},
|
|
||||||
"dto.UpdateBlockRequest": {
|
"dto.UpdateBlockRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
@ -1121,14 +1121,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.ValidateError": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"message": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"entity.Document": {
|
"entity.Document": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -1283,6 +1275,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"response.Response": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"response.ValidateError": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"message": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"user.ID": {
|
"user.ID": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
|
@ -69,8 +69,6 @@ definitions:
|
|||||||
after_block_id:
|
after_block_id:
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
dto.Response:
|
|
||||||
type: object
|
|
||||||
dto.UpdateBlockRequest:
|
dto.UpdateBlockRequest:
|
||||||
properties:
|
properties:
|
||||||
content:
|
content:
|
||||||
@ -88,11 +86,6 @@ definitions:
|
|||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
dto.ValidateError:
|
|
||||||
properties:
|
|
||||||
message:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
entity.Document:
|
entity.Document:
|
||||||
properties:
|
properties:
|
||||||
collection:
|
collection:
|
||||||
@ -194,6 +187,13 @@ definitions:
|
|||||||
workspace_id:
|
workspace_id:
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
|
response.Response:
|
||||||
|
type: object
|
||||||
|
response.ValidateError:
|
||||||
|
properties:
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
user.ID:
|
user.ID:
|
||||||
enum:
|
enum:
|
||||||
- anonymous
|
- anonymous
|
||||||
@ -224,7 +224,7 @@ paths:
|
|||||||
"404":
|
"404":
|
||||||
description: 文档块不存在
|
description: 文档块不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 删除文档块
|
summary: 删除文档块
|
||||||
tags:
|
tags:
|
||||||
- Document
|
- Document
|
||||||
@ -255,12 +255,12 @@ paths:
|
|||||||
description: 参数验证失败
|
description: 参数验证失败
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/dto.ValidateError'
|
$ref: '#/definitions/response.ValidateError'
|
||||||
type: array
|
type: array
|
||||||
"404":
|
"404":
|
||||||
description: 文档块不存在
|
description: 文档块不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 更新文档块
|
summary: 更新文档块
|
||||||
tags:
|
tags:
|
||||||
- Document
|
- Document
|
||||||
@ -290,12 +290,12 @@ paths:
|
|||||||
description: 参数验证失败
|
description: 参数验证失败
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/dto.ValidateError'
|
$ref: '#/definitions/response.ValidateError'
|
||||||
type: array
|
type: array
|
||||||
"404":
|
"404":
|
||||||
description: 文档块不存在
|
description: 文档块不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 移动文档块
|
summary: 移动文档块
|
||||||
tags:
|
tags:
|
||||||
- Document
|
- Document
|
||||||
@ -322,12 +322,12 @@ paths:
|
|||||||
description: 参数验证失败
|
description: 参数验证失败
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/dto.ValidateError'
|
$ref: '#/definitions/response.ValidateError'
|
||||||
type: array
|
type: array
|
||||||
"404":
|
"404":
|
||||||
description: 工作空间不存在
|
description: 工作空间不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 创建集合
|
summary: 创建集合
|
||||||
tags:
|
tags:
|
||||||
- Collection
|
- Collection
|
||||||
@ -358,11 +358,11 @@ paths:
|
|||||||
"403":
|
"403":
|
||||||
description: 无权访问
|
description: 无权访问
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
"404":
|
"404":
|
||||||
description: 集合不存在或父文档不存在
|
description: 集合不存在或父文档不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 列出文档树
|
summary: 列出文档树
|
||||||
tags:
|
tags:
|
||||||
- Document
|
- Document
|
||||||
@ -383,11 +383,11 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
"404":
|
"404":
|
||||||
description: 集合不存在
|
description: 集合不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 删除集合
|
summary: 删除集合
|
||||||
tags:
|
tags:
|
||||||
- Collection
|
- Collection
|
||||||
@ -411,7 +411,7 @@ paths:
|
|||||||
"404":
|
"404":
|
||||||
description: 集合不存在
|
description: 集合不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 获取集合
|
summary: 获取集合
|
||||||
tags:
|
tags:
|
||||||
- Collection
|
- Collection
|
||||||
@ -442,12 +442,12 @@ paths:
|
|||||||
description: 参数验证失败
|
description: 参数验证失败
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/dto.ValidateError'
|
$ref: '#/definitions/response.ValidateError'
|
||||||
type: array
|
type: array
|
||||||
"404":
|
"404":
|
||||||
description: 集合不存在
|
description: 集合不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 更新集合
|
summary: 更新集合
|
||||||
tags:
|
tags:
|
||||||
- Collection
|
- Collection
|
||||||
@ -474,16 +474,16 @@ paths:
|
|||||||
description: 参数验证失败
|
description: 参数验证失败
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/dto.ValidateError'
|
$ref: '#/definitions/response.ValidateError'
|
||||||
type: array
|
type: array
|
||||||
"403":
|
"403":
|
||||||
description: 无权访问
|
description: 无权访问
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
"404":
|
"404":
|
||||||
description: 集合不存在或父文档不存在
|
description: 集合不存在或父文档不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 创建文档
|
summary: 创建文档
|
||||||
tags:
|
tags:
|
||||||
- Document
|
- Document
|
||||||
@ -510,7 +510,7 @@ paths:
|
|||||||
"404":
|
"404":
|
||||||
description: 文档不存在
|
description: 文档不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 列出文档块列表
|
summary: 列出文档块列表
|
||||||
tags:
|
tags:
|
||||||
- Document
|
- Document
|
||||||
@ -541,12 +541,12 @@ paths:
|
|||||||
description: 参数验证失败
|
description: 参数验证失败
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/dto.ValidateError'
|
$ref: '#/definitions/response.ValidateError'
|
||||||
type: array
|
type: array
|
||||||
"404":
|
"404":
|
||||||
description: 文档不存在
|
description: 文档不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 创建文档块
|
summary: 创建文档块
|
||||||
tags:
|
tags:
|
||||||
- Document
|
- Document
|
||||||
@ -569,7 +569,7 @@ paths:
|
|||||||
"404":
|
"404":
|
||||||
description: 文档不存在
|
description: 文档不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 删除文档
|
summary: 删除文档
|
||||||
tags:
|
tags:
|
||||||
- Document
|
- Document
|
||||||
@ -593,11 +593,11 @@ paths:
|
|||||||
"403":
|
"403":
|
||||||
description: 无权访问
|
description: 无权访问
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
"404":
|
"404":
|
||||||
description: 文档不存在
|
description: 文档不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 获取文档
|
summary: 获取文档
|
||||||
tags:
|
tags:
|
||||||
- Document
|
- Document
|
||||||
@ -628,12 +628,12 @@ paths:
|
|||||||
description: 参数验证失败
|
description: 参数验证失败
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/dto.ValidateError'
|
$ref: '#/definitions/response.ValidateError'
|
||||||
type: array
|
type: array
|
||||||
"404":
|
"404":
|
||||||
description: 文档不存在
|
description: 文档不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 更新文档
|
summary: 更新文档
|
||||||
tags:
|
tags:
|
||||||
- Document
|
- Document
|
||||||
@ -676,7 +676,7 @@ paths:
|
|||||||
description: 参数验证失败
|
description: 参数验证失败
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/dto.ValidateError'
|
$ref: '#/definitions/response.ValidateError'
|
||||||
type: array
|
type: array
|
||||||
summary: 创建工作空间
|
summary: 创建工作空间
|
||||||
tags:
|
tags:
|
||||||
@ -700,7 +700,7 @@ paths:
|
|||||||
"404":
|
"404":
|
||||||
description: 工作空间不存在
|
description: 工作空间不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 删除工作空间
|
summary: 删除工作空间
|
||||||
tags:
|
tags:
|
||||||
- Workspace
|
- Workspace
|
||||||
@ -724,7 +724,7 @@ paths:
|
|||||||
"404":
|
"404":
|
||||||
description: 工作空间不存在
|
description: 工作空间不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 获取工作空间
|
summary: 获取工作空间
|
||||||
tags:
|
tags:
|
||||||
- Workspace
|
- Workspace
|
||||||
@ -745,11 +745,13 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/entity.Workspace'
|
items:
|
||||||
|
$ref: '#/definitions/entity.WorkspaceMember'
|
||||||
|
type: array
|
||||||
"404":
|
"404":
|
||||||
description: 工作空间不存在
|
description: 工作空间不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 获取工作空间的成员
|
summary: 获取工作空间的成员
|
||||||
tags:
|
tags:
|
||||||
- Workspace
|
- Workspace
|
||||||
@ -780,16 +782,16 @@ paths:
|
|||||||
description: 参数验证失败
|
description: 参数验证失败
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/dto.ValidateError'
|
$ref: '#/definitions/response.ValidateError'
|
||||||
type: array
|
type: array
|
||||||
"404":
|
"404":
|
||||||
description: 工作空间不存在
|
description: 工作空间不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
"409":
|
"409":
|
||||||
description: 成员已存在
|
description: 成员已存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 添加工作空间成员
|
summary: 添加工作空间成员
|
||||||
tags:
|
tags:
|
||||||
- Workspace
|
- Workspace
|
||||||
@ -815,11 +817,11 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
"404":
|
"404":
|
||||||
description: 工作空间不存在或成员不存在
|
description: 工作空间不存在或成员不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 移除工作空间成员
|
summary: 移除工作空间成员
|
||||||
tags:
|
tags:
|
||||||
- Workspace
|
- Workspace
|
||||||
@ -846,7 +848,7 @@ paths:
|
|||||||
"404":
|
"404":
|
||||||
description: 工作空间不存在
|
description: 工作空间不存在
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
summary: 列出集合列表
|
summary: 列出集合列表
|
||||||
tags:
|
tags:
|
||||||
- Collection
|
- Collection
|
||||||
|
@ -40,8 +40,8 @@ func NewCollectionController(
|
|||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param request body dto.CreateCollectionRequest true "创建集合请求"
|
// @Param request body dto.CreateCollectionRequest true "创建集合请求"
|
||||||
// @Success 200 {object} entity.Collection
|
// @Success 200 {object} entity.Collection
|
||||||
// @Failure 400 {object} []dto.ValidateError "参数验证失败"
|
// @Failure 400 {object} []response.ValidateError "参数验证失败"
|
||||||
// @Failure 404 {object} dto.Response "工作空间不存在"
|
// @Failure 404 {object} response.Response "工作空间不存在"
|
||||||
// @Router /collections [post]
|
// @Router /collections [post]
|
||||||
func (c *CollectionController) CreateCollection(ctx *fiber.Ctx) error {
|
func (c *CollectionController) CreateCollection(ctx *fiber.Ctx) error {
|
||||||
var req dto.CreateCollectionRequest
|
var req dto.CreateCollectionRequest
|
||||||
@ -81,7 +81,7 @@ func (c *CollectionController) CreateCollection(ctx *fiber.Ctx) error {
|
|||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path int true "集合ID"
|
// @Param id path int true "集合ID"
|
||||||
// @Success 200 {object} entity.Collection
|
// @Success 200 {object} entity.Collection
|
||||||
// @Failure 404 {object} dto.Response "集合不存在"
|
// @Failure 404 {object} response.Response "集合不存在"
|
||||||
// @Router /collections/{id} [get]
|
// @Router /collections/{id} [get]
|
||||||
func (c *CollectionController) GetCollection(ctx *fiber.Ctx) error {
|
func (c *CollectionController) GetCollection(ctx *fiber.Ctx) error {
|
||||||
var req dto.GetCollectionRequest
|
var req dto.GetCollectionRequest
|
||||||
@ -113,7 +113,7 @@ func (c *CollectionController) GetCollection(ctx *fiber.Ctx) error {
|
|||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param workspace_id path int true "工作空间ID"
|
// @Param workspace_id path int true "工作空间ID"
|
||||||
// @Success 200 {object} []entity.Collection
|
// @Success 200 {object} []entity.Collection
|
||||||
// @Failure 404 {object} dto.Response "工作空间不存在"
|
// @Failure 404 {object} response.Response "工作空间不存在"
|
||||||
// @Router /workspaces/{workspace_id}/collections [get]
|
// @Router /workspaces/{workspace_id}/collections [get]
|
||||||
func (c *CollectionController) ListCollections(ctx *fiber.Ctx) error {
|
func (c *CollectionController) ListCollections(ctx *fiber.Ctx) error {
|
||||||
var req dto.ListCollectionsRequest
|
var req dto.ListCollectionsRequest
|
||||||
@ -147,8 +147,8 @@ func (c *CollectionController) ListCollections(ctx *fiber.Ctx) error {
|
|||||||
// @Param id path int true "集合ID"
|
// @Param id path int true "集合ID"
|
||||||
// @Param request body dto.UpdateCollectionRequest true "更新集合请求"
|
// @Param request body dto.UpdateCollectionRequest true "更新集合请求"
|
||||||
// @Success 200 {object} entity.Collection
|
// @Success 200 {object} entity.Collection
|
||||||
// @Failure 400 {object} []dto.ValidateError "参数验证失败"
|
// @Failure 400 {object} []response.ValidateError "参数验证失败"
|
||||||
// @Failure 404 {object} dto.Response "集合不存在"
|
// @Failure 404 {object} response.Response "集合不存在"
|
||||||
// @Router /collections/{id} [put]
|
// @Router /collections/{id} [put]
|
||||||
func (c *CollectionController) UpdateCollection(ctx *fiber.Ctx) error {
|
func (c *CollectionController) UpdateCollection(ctx *fiber.Ctx) error {
|
||||||
var params dto.CollectionIDParam
|
var params dto.CollectionIDParam
|
||||||
@ -208,8 +208,8 @@ func (c *CollectionController) UpdateCollection(ctx *fiber.Ctx) error {
|
|||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path int true "集合ID"
|
// @Param id path int true "集合ID"
|
||||||
// @Success 200 {object} dto.Response
|
// @Success 200 {object} response.Response
|
||||||
// @Failure 404 {object} dto.Response "集合不存在"
|
// @Failure 404 {object} response.Response "集合不存在"
|
||||||
// @Router /collections/{id} [delete]
|
// @Router /collections/{id} [delete]
|
||||||
func (c *CollectionController) DeleteCollection(ctx *fiber.Ctx) error {
|
func (c *CollectionController) DeleteCollection(ctx *fiber.Ctx) error {
|
||||||
var params dto.CollectionIDParam
|
var params dto.CollectionIDParam
|
||||||
|
@ -42,9 +42,9 @@ func NewDocumentController(
|
|||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param request body dto.CreateDocumentRequest true "创建文档请求"
|
// @Param request body dto.CreateDocumentRequest true "创建文档请求"
|
||||||
// @Success 200 {object} dto.DocumentDTO
|
// @Success 200 {object} dto.DocumentDTO
|
||||||
// @Failure 400 {object} []dto.ValidateError "参数验证失败"
|
// @Failure 400 {object} []response.ValidateError "参数验证失败"
|
||||||
// @Failure 403 {object} dto.Response "无权访问"
|
// @Failure 403 {object} response.Response "无权访问"
|
||||||
// @Failure 404 {object} dto.Response "集合不存在或父文档不存在"
|
// @Failure 404 {object} response.Response "集合不存在或父文档不存在"
|
||||||
// @Router /documents [post]
|
// @Router /documents [post]
|
||||||
func (c *DocumentController) CreateDocument(ctx *fiber.Ctx) error {
|
func (c *DocumentController) CreateDocument(ctx *fiber.Ctx) error {
|
||||||
var req dto.CreateDocumentRequest
|
var req dto.CreateDocumentRequest
|
||||||
@ -121,8 +121,8 @@ func (c *DocumentController) CreateDocument(ctx *fiber.Ctx) error {
|
|||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path int true "文档ID"
|
// @Param id path int true "文档ID"
|
||||||
// @Success 200 {object} dto.DocumentDTO
|
// @Success 200 {object} dto.DocumentDTO
|
||||||
// @Failure 403 {object} dto.Response "无权访问"
|
// @Failure 403 {object} response.Response "无权访问"
|
||||||
// @Failure 404 {object} dto.Response "文档不存在"
|
// @Failure 404 {object} response.Response "文档不存在"
|
||||||
// @Router /documents/{id} [get]
|
// @Router /documents/{id} [get]
|
||||||
func (c *DocumentController) GetDocument(ctx *fiber.Ctx) error {
|
func (c *DocumentController) GetDocument(ctx *fiber.Ctx) error {
|
||||||
var params dto.DocumentIDParam
|
var params dto.DocumentIDParam
|
||||||
@ -174,8 +174,8 @@ func (c *DocumentController) GetDocument(ctx *fiber.Ctx) error {
|
|||||||
// @Param collection_id path int true "集合ID"
|
// @Param collection_id path int true "集合ID"
|
||||||
// @Param parent_id query int false "父文档ID,不传则获取根文档"
|
// @Param parent_id query int false "父文档ID,不传则获取根文档"
|
||||||
// @Success 200 {object} []dto.DocumentDTO
|
// @Success 200 {object} []dto.DocumentDTO
|
||||||
// @Failure 403 {object} dto.Response "无权访问"
|
// @Failure 403 {object} response.Response "无权访问"
|
||||||
// @Failure 404 {object} dto.Response "集合不存在或父文档不存在"
|
// @Failure 404 {object} response.Response "集合不存在或父文档不存在"
|
||||||
// @Router /collections/{collection_id}/documents [get]
|
// @Router /collections/{collection_id}/documents [get]
|
||||||
func (c *DocumentController) ListDocuments(ctx *fiber.Ctx) error {
|
func (c *DocumentController) ListDocuments(ctx *fiber.Ctx) error {
|
||||||
var pathParams dto.ListDocumentsPathParam
|
var pathParams dto.ListDocumentsPathParam
|
||||||
@ -254,8 +254,8 @@ func (c *DocumentController) ListDocuments(ctx *fiber.Ctx) error {
|
|||||||
// @Param id path int true "文档ID"
|
// @Param id path int true "文档ID"
|
||||||
// @Param request body dto.UpdateDocumentRequest true "更新文档请求"
|
// @Param request body dto.UpdateDocumentRequest true "更新文档请求"
|
||||||
// @Success 200 {object} entity.Document
|
// @Success 200 {object} entity.Document
|
||||||
// @Failure 400 {object} []dto.ValidateError "参数验证失败"
|
// @Failure 400 {object} []response.ValidateError "参数验证失败"
|
||||||
// @Failure 404 {object} dto.Response "文档不存在"
|
// @Failure 404 {object} response.Response "文档不存在"
|
||||||
// @Router /documents/{id} [put]
|
// @Router /documents/{id} [put]
|
||||||
func (c *DocumentController) UpdateDocument(ctx *fiber.Ctx) error {
|
func (c *DocumentController) UpdateDocument(ctx *fiber.Ctx) error {
|
||||||
var params dto.DocumentIDParam
|
var params dto.DocumentIDParam
|
||||||
@ -296,7 +296,7 @@ func (c *DocumentController) UpdateDocument(ctx *fiber.Ctx) error {
|
|||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path int true "文档ID"
|
// @Param id path int true "文档ID"
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 404 {object} dto.Response "文档不存在"
|
// @Failure 404 {object} response.Response "文档不存在"
|
||||||
// @Router /documents/{id} [delete]
|
// @Router /documents/{id} [delete]
|
||||||
func (c *DocumentController) DeleteDocument(ctx *fiber.Ctx) error {
|
func (c *DocumentController) DeleteDocument(ctx *fiber.Ctx) error {
|
||||||
var params dto.DocumentIDParam
|
var params dto.DocumentIDParam
|
||||||
@ -321,8 +321,8 @@ func (c *DocumentController) DeleteDocument(ctx *fiber.Ctx) error {
|
|||||||
// @Param document_id path int true "文档ID"
|
// @Param document_id path int true "文档ID"
|
||||||
// @Param request body dto.CreateBlockRequest true "创建文档块请求"
|
// @Param request body dto.CreateBlockRequest true "创建文档块请求"
|
||||||
// @Success 200 {object} entity.DocumentBlock
|
// @Success 200 {object} entity.DocumentBlock
|
||||||
// @Failure 400 {object} []dto.ValidateError "参数验证失败"
|
// @Failure 400 {object} []response.ValidateError "参数验证失败"
|
||||||
// @Failure 404 {object} dto.Response "文档不存在"
|
// @Failure 404 {object} response.Response "文档不存在"
|
||||||
// @Router /documents/{document_id}/blocks [post]
|
// @Router /documents/{document_id}/blocks [post]
|
||||||
func (c *DocumentController) CreateBlock(ctx *fiber.Ctx) error {
|
func (c *DocumentController) CreateBlock(ctx *fiber.Ctx) error {
|
||||||
var params dto.ListBlocksRequest
|
var params dto.ListBlocksRequest
|
||||||
@ -384,8 +384,8 @@ func (c *DocumentController) CreateBlock(ctx *fiber.Ctx) error {
|
|||||||
// @Param block_id path int true "文档块ID"
|
// @Param block_id path int true "文档块ID"
|
||||||
// @Param request body dto.UpdateBlockRequest true "更新文档块请求"
|
// @Param request body dto.UpdateBlockRequest true "更新文档块请求"
|
||||||
// @Success 200 {object} entity.DocumentBlock
|
// @Success 200 {object} entity.DocumentBlock
|
||||||
// @Failure 400 {object} []dto.ValidateError "参数验证失败"
|
// @Failure 400 {object} []response.ValidateError "参数验证失败"
|
||||||
// @Failure 404 {object} dto.Response "文档块不存在"
|
// @Failure 404 {object} response.Response "文档块不存在"
|
||||||
// @Router /blocks/{block_id} [put]
|
// @Router /blocks/{block_id} [put]
|
||||||
func (c *DocumentController) UpdateBlock(ctx *fiber.Ctx) error {
|
func (c *DocumentController) UpdateBlock(ctx *fiber.Ctx) error {
|
||||||
var params dto.BlockIDParam
|
var params dto.BlockIDParam
|
||||||
@ -458,7 +458,7 @@ func (c *DocumentController) UpdateBlock(ctx *fiber.Ctx) error {
|
|||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param block_id path int true "文档块ID"
|
// @Param block_id path int true "文档块ID"
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 404 {object} dto.Response "文档块不存在"
|
// @Failure 404 {object} response.Response "文档块不存在"
|
||||||
// @Router /blocks/{block_id} [delete]
|
// @Router /blocks/{block_id} [delete]
|
||||||
func (c *DocumentController) DeleteBlock(ctx *fiber.Ctx) error {
|
func (c *DocumentController) DeleteBlock(ctx *fiber.Ctx) error {
|
||||||
var params dto.BlockIDParam
|
var params dto.BlockIDParam
|
||||||
@ -519,7 +519,7 @@ func (c *DocumentController) DeleteBlock(ctx *fiber.Ctx) error {
|
|||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param document_id path int true "文档ID"
|
// @Param document_id path int true "文档ID"
|
||||||
// @Success 200 {object} []entity.DocumentBlock
|
// @Success 200 {object} []entity.DocumentBlock
|
||||||
// @Failure 404 {object} dto.Response "文档不存在"
|
// @Failure 404 {object} response.Response "文档不存在"
|
||||||
// @Router /documents/{document_id}/blocks [get]
|
// @Router /documents/{document_id}/blocks [get]
|
||||||
func (c *DocumentController) ListBlocks(ctx *fiber.Ctx) error {
|
func (c *DocumentController) ListBlocks(ctx *fiber.Ctx) error {
|
||||||
var params dto.ListBlocksRequest
|
var params dto.ListBlocksRequest
|
||||||
@ -572,8 +572,8 @@ func (c *DocumentController) ListBlocks(ctx *fiber.Ctx) error {
|
|||||||
// @Param block_id path int true "文档块ID"
|
// @Param block_id path int true "文档块ID"
|
||||||
// @Param request body dto.MoveBlockRequest true "移动文档块请求"
|
// @Param request body dto.MoveBlockRequest true "移动文档块请求"
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 400 {object} []dto.ValidateError "参数验证失败"
|
// @Failure 400 {object} []response.ValidateError "参数验证失败"
|
||||||
// @Failure 404 {object} dto.Response "文档块不存在"
|
// @Failure 404 {object} response.Response "文档块不存在"
|
||||||
// @Router /blocks/{block_id}/move [post]
|
// @Router /blocks/{block_id}/move [post]
|
||||||
func (c *DocumentController) MoveBlock(ctx *fiber.Ctx) error {
|
func (c *DocumentController) MoveBlock(ctx *fiber.Ctx) error {
|
||||||
var params dto.BlockIDParam
|
var params dto.BlockIDParam
|
||||||
|
@ -35,7 +35,7 @@ func NewWorkspaceController(workspaceService *workspace.Service, authService *au
|
|||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param request body dto.CreateWorkspaceRequest true "创建工作空间请求"
|
// @Param request body dto.CreateWorkspaceRequest true "创建工作空间请求"
|
||||||
// @Success 200 {object} entity.Workspace
|
// @Success 200 {object} entity.Workspace
|
||||||
// @Failure 400 {object} []dto.ValidateError "参数验证失败"
|
// @Failure 400 {object} []response.ValidateError "参数验证失败"
|
||||||
// @Router /workspaces [post]
|
// @Router /workspaces [post]
|
||||||
func (c *WorkspaceController) CreateWorkspace(ctx *fiber.Ctx) error {
|
func (c *WorkspaceController) CreateWorkspace(ctx *fiber.Ctx) error {
|
||||||
var req dto.CreateWorkspaceRequest
|
var req dto.CreateWorkspaceRequest
|
||||||
@ -70,7 +70,7 @@ func (c *WorkspaceController) CreateWorkspace(ctx *fiber.Ctx) error {
|
|||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path int true "工作空间ID"
|
// @Param id path int true "工作空间ID"
|
||||||
// @Success 200 {object} entity.Workspace
|
// @Success 200 {object} entity.Workspace
|
||||||
// @Failure 404 {object} dto.Response "工作空间不存在"
|
// @Failure 404 {object} response.Response "工作空间不存在"
|
||||||
// @Router /workspaces/{id} [get]
|
// @Router /workspaces/{id} [get]
|
||||||
func (c *WorkspaceController) GetWorkspace(ctx *fiber.Ctx) error {
|
func (c *WorkspaceController) GetWorkspace(ctx *fiber.Ctx) error {
|
||||||
var params dto.WorkspaceIDParam
|
var params dto.WorkspaceIDParam
|
||||||
@ -122,7 +122,7 @@ func (c *WorkspaceController) ListWorkspaces(ctx *fiber.Ctx) error {
|
|||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path int true "工作空间ID"
|
// @Param id path int true "工作空间ID"
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 404 {object} dto.Response "工作空间不存在"
|
// @Failure 404 {object} response.Response "工作空间不存在"
|
||||||
// @Router /workspaces/{id} [delete]
|
// @Router /workspaces/{id} [delete]
|
||||||
func (c *WorkspaceController) DeleteWorkspace(ctx *fiber.Ctx) error {
|
func (c *WorkspaceController) DeleteWorkspace(ctx *fiber.Ctx) error {
|
||||||
var params dto.WorkspaceIDParam
|
var params dto.WorkspaceIDParam
|
||||||
@ -153,8 +153,8 @@ func (c *WorkspaceController) DeleteWorkspace(ctx *fiber.Ctx) error {
|
|||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path int true "工作空间ID"
|
// @Param id path int true "工作空间ID"
|
||||||
// @Success 200 {object} entity.Workspace
|
// @Success 200 {object} []entity.WorkspaceMember
|
||||||
// @Failure 404 {object} dto.Response "工作空间不存在"
|
// @Failure 404 {object} response.Response "工作空间不存在"
|
||||||
// @Router /workspaces/{id}/members [get]
|
// @Router /workspaces/{id}/members [get]
|
||||||
func (c *WorkspaceController) GetWorkspaceMembers(ctx *fiber.Ctx) error {
|
func (c *WorkspaceController) GetWorkspaceMembers(ctx *fiber.Ctx) error {
|
||||||
var params dto.WorkspaceIDParam
|
var params dto.WorkspaceIDParam
|
||||||
@ -192,9 +192,9 @@ func (c *WorkspaceController) GetWorkspaceMembers(ctx *fiber.Ctx) error {
|
|||||||
// @Param id path int true "工作空间ID"
|
// @Param id path int true "工作空间ID"
|
||||||
// @Param request body dto.AddWorkspaceMemberRequest true "添加成员请求"
|
// @Param request body dto.AddWorkspaceMemberRequest true "添加成员请求"
|
||||||
// @Success 200 {object} entity.WorkspaceMember
|
// @Success 200 {object} entity.WorkspaceMember
|
||||||
// @Failure 400 {object} []dto.ValidateError "参数验证失败"
|
// @Failure 400 {object} []response.ValidateError "参数验证失败"
|
||||||
// @Failure 404 {object} dto.Response "工作空间不存在"
|
// @Failure 404 {object} response.Response "工作空间不存在"
|
||||||
// @Failure 409 {object} dto.Response "成员已存在"
|
// @Failure 409 {object} response.Response "成员已存在"
|
||||||
// @Router /workspaces/{id}/members [post]
|
// @Router /workspaces/{id}/members [post]
|
||||||
func (c *WorkspaceController) AddMember(ctx *fiber.Ctx) error {
|
func (c *WorkspaceController) AddMember(ctx *fiber.Ctx) error {
|
||||||
var params dto.WorkspaceIDParam
|
var params dto.WorkspaceIDParam
|
||||||
@ -246,8 +246,8 @@ func (c *WorkspaceController) AddMember(ctx *fiber.Ctx) error {
|
|||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param id path int true "工作空间ID"
|
// @Param id path int true "工作空间ID"
|
||||||
// @Param user_id path string true "用户ID"
|
// @Param user_id path string true "用户ID"
|
||||||
// @Success 200 {object} dto.Response
|
// @Success 200 {object} response.Response
|
||||||
// @Failure 404 {object} dto.Response "工作空间不存在或成员不存在"
|
// @Failure 404 {object} response.Response "工作空间不存在或成员不存在"
|
||||||
// @Router /workspaces/{id}/members/{user_id} [delete]
|
// @Router /workspaces/{id}/members/{user_id} [delete]
|
||||||
func (c *WorkspaceController) RemoveMember(ctx *fiber.Ctx) error {
|
func (c *WorkspaceController) RemoveMember(ctx *fiber.Ctx) error {
|
||||||
var params dto.WorkspaceMemberParam
|
var params dto.WorkspaceMemberParam
|
||||||
|
@ -35,6 +35,7 @@ func (a *Api) V1(r fiber.Router) {
|
|||||||
workspaces.Delete("/:id", a.HttpHandler.Workspace.DeleteWorkspace)
|
workspaces.Delete("/:id", a.HttpHandler.Workspace.DeleteWorkspace)
|
||||||
|
|
||||||
// 工作空间成员管理
|
// 工作空间成员管理
|
||||||
|
workspaces.Get("/:id/members", a.HttpHandler.Workspace.GetWorkspaceMembers)
|
||||||
workspaces.Post("/:id/members", a.HttpHandler.Workspace.AddMember)
|
workspaces.Post("/:id/members", a.HttpHandler.Workspace.AddMember)
|
||||||
workspaces.Delete("/:id/members/:user_id", a.HttpHandler.Workspace.RemoveMember)
|
workspaces.Delete("/:id/members/:user_id", a.HttpHandler.Workspace.RemoveMember)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user