feat(users): update api docs

This commit is contained in:
LinkinStars 2023-08-14 16:22:07 +08:00
parent 64c7271ab7
commit 1211907b64
3 changed files with 475 additions and 130 deletions

View File

@ -1741,6 +1741,45 @@ const docTemplate = `{
} }
} }
}, },
"/answer/admin/api/users": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "add users",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "add users",
"parameters": [
{
"description": "user",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.AddUserReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/users/activation": { "/answer/admin/api/users/activation": {
"post": { "post": {
"security": [ "security": [
@ -4515,7 +4554,39 @@ const docTemplate = `{
"type": "object", "type": "object",
"properties": { "properties": {
"data": { "data": {
"$ref": "#/definitions/schema.SearchListResp" "$ref": "#/definitions/schema.SearchResp"
}
}
}
]
}
}
}
}
},
"/answer/api/v1/search/desc": {
"get": {
"description": "get search description",
"produces": [
"application/json"
],
"tags": [
"Search"
],
"summary": "get search description",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.SearchResp"
} }
} }
} }
@ -5406,7 +5477,7 @@ const docTemplate = `{
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/schema.UserEmailLogin" "$ref": "#/definitions/schema.UserEmailLoginReq"
} }
} }
], ],
@ -6346,6 +6417,13 @@ const docTemplate = `{
"original_text" "original_text"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"mention_username_list": { "mention_username_list": {
"description": "@ user id list", "description": "@ user id list",
"type": "array", "type": "array",
@ -6376,6 +6454,13 @@ const docTemplate = `{
"report_type" "report_type"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"content": { "content": {
"description": "report content", "description": "report content",
"type": "string", "type": "string",
@ -6480,6 +6565,12 @@ const docTemplate = `{
"content" "content"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"type": "string"
},
"content": { "content": {
"type": "string", "type": "string",
"maxLength": 65535, "maxLength": 65535,
@ -6496,6 +6587,12 @@ const docTemplate = `{
"content" "content"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"type": "string"
},
"content": { "content": {
"type": "string", "type": "string",
"maxLength": 65535, "maxLength": 65535,
@ -6926,6 +7023,7 @@ const docTemplate = `{
"type": "integer" "type": "integer"
}, },
"have_password": { "have_password": {
"description": "user have password",
"type": "boolean" "type": "boolean"
}, },
"id": { "id": {
@ -7702,6 +7800,13 @@ const docTemplate = `{
"title" "title"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"content": { "content": {
"description": "content", "description": "content",
"type": "string", "type": "string",
@ -7737,6 +7842,13 @@ const docTemplate = `{
"maxLength": 65535, "maxLength": 65535,
"minLength": 6 "minLength": 6
}, },
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"content": { "content": {
"description": "content", "description": "content",
"type": "string", "type": "string",
@ -7898,6 +8010,13 @@ const docTemplate = `{
"title" "title"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"content": { "content": {
"description": "content", "description": "content",
"type": "string", "type": "string",
@ -7939,6 +8058,13 @@ const docTemplate = `{
"id" "id"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"id": { "id": {
"type": "string" "type": "string"
}, },
@ -7956,8 +8082,13 @@ const docTemplate = `{
"id" "id"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"type": "string"
},
"id": { "id": {
"description": "answer id",
"type": "string" "type": "string"
} }
} }
@ -7968,6 +8099,13 @@ const docTemplate = `{
"comment_id" "comment_id"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"comment_id": { "comment_id": {
"description": "comment id", "description": "comment id",
"type": "string" "type": "string"
@ -7980,6 +8118,13 @@ const docTemplate = `{
"id" "id"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"id": { "id": {
"description": "question id", "description": "question id",
"type": "string" "type": "string"
@ -8041,24 +8186,6 @@ const docTemplate = `{
} }
} }
}, },
"schema.SearchListResp": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"extra": {
"description": "extra fields"
},
"list": {
"description": "search response",
"type": "array",
"items": {
"$ref": "#/definitions/schema.SearchResults"
}
}
}
},
"schema.SearchObject": { "schema.SearchObject": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -8107,7 +8234,22 @@ const docTemplate = `{
} }
} }
}, },
"schema.SearchResults": { "schema.SearchResp": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"list": {
"description": "search response",
"type": "array",
"items": {
"$ref": "#/definitions/schema.SearchResult"
}
}
}
},
"schema.SearchResult": {
"type": "object", "type": "object",
"properties": { "properties": {
"object": { "object": {
@ -8729,6 +8871,13 @@ const docTemplate = `{
"original_text" "original_text"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"comment_id": { "comment_id": {
"description": "comment id", "description": "comment id",
"type": "string" "type": "string"
@ -9004,39 +9153,30 @@ const docTemplate = `{
"type": "object", "type": "object",
"properties": { "properties": {
"avatar": { "avatar": {
"description": "avatar",
"type": "string" "type": "string"
}, },
"display_name": { "display_name": {
"description": "display_name",
"type": "string" "type": "string"
}, },
"id": { "id": {
"description": "user_id",
"type": "string" "type": "string"
}, },
"ip_info": { "ip_info": {
"description": "ip info",
"type": "string" "type": "string"
}, },
"location": { "location": {
"description": "location",
"type": "string" "type": "string"
}, },
"rank": { "rank": {
"description": "rank",
"type": "integer" "type": "integer"
}, },
"status": { "status": {
"description": "status",
"type": "string" "type": "string"
}, },
"username": { "username": {
"description": "name",
"type": "string" "type": "string"
}, },
"website": { "website": {
"description": "website",
"type": "string" "type": "string"
} }
} }
@ -9078,7 +9218,7 @@ const docTemplate = `{
} }
} }
}, },
"schema.UserEmailLogin": { "schema.UserEmailLoginReq": {
"type": "object", "type": "object",
"required": [ "required": [
"e_mail", "e_mail",
@ -9086,20 +9226,16 @@ const docTemplate = `{
], ],
"properties": { "properties": {
"captcha_code": { "captcha_code": {
"description": "captcha_code",
"type": "string" "type": "string"
}, },
"captcha_id": { "captcha_id": {
"description": "captcha_id",
"type": "string" "type": "string"
}, },
"e_mail": { "e_mail": {
"description": "e_mail",
"type": "string", "type": "string",
"maxLength": 500 "maxLength": 500
}, },
"pass": { "pass": {
"description": "password",
"type": "string", "type": "string",
"maxLength": 32, "maxLength": 32,
"minLength": 8 "minLength": 8
@ -9309,12 +9445,10 @@ const docTemplate = `{
], ],
"properties": { "properties": {
"code": { "code": {
"description": "code",
"type": "string", "type": "string",
"maxLength": 100 "maxLength": 100
}, },
"pass": { "pass": {
"description": "Password",
"type": "string", "type": "string",
"maxLength": 32 "maxLength": 32
} }
@ -9329,25 +9463,20 @@ const docTemplate = `{
], ],
"properties": { "properties": {
"captcha_code": { "captcha_code": {
"description": "captcha_code",
"type": "string" "type": "string"
}, },
"captcha_id": { "captcha_id": {
"description": "captcha_id",
"type": "string" "type": "string"
}, },
"e_mail": { "e_mail": {
"description": "email",
"type": "string", "type": "string",
"maxLength": 500 "maxLength": 500
}, },
"name": { "name": {
"description": "name",
"type": "string", "type": "string",
"maxLength": 30 "maxLength": 30
}, },
"pass": { "pass": {
"description": "password",
"type": "string", "type": "string",
"maxLength": 32, "maxLength": 32,
"minLength": 8 "minLength": 8
@ -9361,15 +9490,12 @@ const docTemplate = `{
], ],
"properties": { "properties": {
"captcha_code": { "captcha_code": {
"description": "captcha_code",
"type": "string" "type": "string"
}, },
"captcha_id": { "captcha_id": {
"description": "captcha_id",
"type": "string" "type": "string"
}, },
"e_mail": { "e_mail": {
"description": "e_mail",
"type": "string", "type": "string",
"maxLength": 500 "maxLength": 500
} }
@ -9381,6 +9507,13 @@ const docTemplate = `{
"object_id" "object_id"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"is_cancel": { "is_cancel": {
"description": "is cancel", "description": "is cancel",
"type": "boolean" "type": "boolean"

View File

@ -1729,6 +1729,45 @@
} }
} }
}, },
"/answer/admin/api/users": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "add users",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "add users",
"parameters": [
{
"description": "user",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.AddUserReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/users/activation": { "/answer/admin/api/users/activation": {
"post": { "post": {
"security": [ "security": [
@ -4503,7 +4542,39 @@
"type": "object", "type": "object",
"properties": { "properties": {
"data": { "data": {
"$ref": "#/definitions/schema.SearchListResp" "$ref": "#/definitions/schema.SearchResp"
}
}
}
]
}
}
}
}
},
"/answer/api/v1/search/desc": {
"get": {
"description": "get search description",
"produces": [
"application/json"
],
"tags": [
"Search"
],
"summary": "get search description",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.SearchResp"
} }
} }
} }
@ -5394,7 +5465,7 @@
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/schema.UserEmailLogin" "$ref": "#/definitions/schema.UserEmailLoginReq"
} }
} }
], ],
@ -6334,6 +6405,13 @@
"original_text" "original_text"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"mention_username_list": { "mention_username_list": {
"description": "@ user id list", "description": "@ user id list",
"type": "array", "type": "array",
@ -6364,6 +6442,13 @@
"report_type" "report_type"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"content": { "content": {
"description": "report content", "description": "report content",
"type": "string", "type": "string",
@ -6468,6 +6553,12 @@
"content" "content"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"type": "string"
},
"content": { "content": {
"type": "string", "type": "string",
"maxLength": 65535, "maxLength": 65535,
@ -6484,6 +6575,12 @@
"content" "content"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"type": "string"
},
"content": { "content": {
"type": "string", "type": "string",
"maxLength": 65535, "maxLength": 65535,
@ -6914,6 +7011,7 @@
"type": "integer" "type": "integer"
}, },
"have_password": { "have_password": {
"description": "user have password",
"type": "boolean" "type": "boolean"
}, },
"id": { "id": {
@ -7690,6 +7788,13 @@
"title" "title"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"content": { "content": {
"description": "content", "description": "content",
"type": "string", "type": "string",
@ -7725,6 +7830,13 @@
"maxLength": 65535, "maxLength": 65535,
"minLength": 6 "minLength": 6
}, },
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"content": { "content": {
"description": "content", "description": "content",
"type": "string", "type": "string",
@ -7886,6 +7998,13 @@
"title" "title"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"content": { "content": {
"description": "content", "description": "content",
"type": "string", "type": "string",
@ -7927,6 +8046,13 @@
"id" "id"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"id": { "id": {
"type": "string" "type": "string"
}, },
@ -7944,8 +8070,13 @@
"id" "id"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"type": "string"
},
"id": { "id": {
"description": "answer id",
"type": "string" "type": "string"
} }
} }
@ -7956,6 +8087,13 @@
"comment_id" "comment_id"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"comment_id": { "comment_id": {
"description": "comment id", "description": "comment id",
"type": "string" "type": "string"
@ -7968,6 +8106,13 @@
"id" "id"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"id": { "id": {
"description": "question id", "description": "question id",
"type": "string" "type": "string"
@ -8029,24 +8174,6 @@
} }
} }
}, },
"schema.SearchListResp": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"extra": {
"description": "extra fields"
},
"list": {
"description": "search response",
"type": "array",
"items": {
"$ref": "#/definitions/schema.SearchResp"
}
}
}
},
"schema.SearchObject": { "schema.SearchObject": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -8096,6 +8223,21 @@
} }
}, },
"schema.SearchResp": { "schema.SearchResp": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"list": {
"description": "search response",
"type": "array",
"items": {
"$ref": "#/definitions/schema.SearchResult"
}
}
}
},
"schema.SearchResult": {
"type": "object", "type": "object",
"properties": { "properties": {
"object": { "object": {
@ -8717,6 +8859,13 @@
"original_text" "original_text"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"comment_id": { "comment_id": {
"description": "comment id", "description": "comment id",
"type": "string" "type": "string"
@ -8992,39 +9141,30 @@
"type": "object", "type": "object",
"properties": { "properties": {
"avatar": { "avatar": {
"description": "avatar",
"type": "string" "type": "string"
}, },
"display_name": { "display_name": {
"description": "display_name",
"type": "string" "type": "string"
}, },
"id": { "id": {
"description": "user_id",
"type": "string" "type": "string"
}, },
"ip_info": { "ip_info": {
"description": "ip info",
"type": "string" "type": "string"
}, },
"location": { "location": {
"description": "location",
"type": "string" "type": "string"
}, },
"rank": { "rank": {
"description": "rank",
"type": "integer" "type": "integer"
}, },
"status": { "status": {
"description": "status",
"type": "string" "type": "string"
}, },
"username": { "username": {
"description": "name",
"type": "string" "type": "string"
}, },
"website": { "website": {
"description": "website",
"type": "string" "type": "string"
} }
} }
@ -9066,7 +9206,7 @@
} }
} }
}, },
"schema.UserEmailLogin": { "schema.UserEmailLoginReq": {
"type": "object", "type": "object",
"required": [ "required": [
"e_mail", "e_mail",
@ -9074,20 +9214,16 @@
], ],
"properties": { "properties": {
"captcha_code": { "captcha_code": {
"description": "captcha_code",
"type": "string" "type": "string"
}, },
"captcha_id": { "captcha_id": {
"description": "captcha_id",
"type": "string" "type": "string"
}, },
"e_mail": { "e_mail": {
"description": "e_mail",
"type": "string", "type": "string",
"maxLength": 500 "maxLength": 500
}, },
"pass": { "pass": {
"description": "password",
"type": "string", "type": "string",
"maxLength": 32, "maxLength": 32,
"minLength": 8 "minLength": 8
@ -9297,12 +9433,10 @@
], ],
"properties": { "properties": {
"code": { "code": {
"description": "code",
"type": "string", "type": "string",
"maxLength": 100 "maxLength": 100
}, },
"pass": { "pass": {
"description": "Password",
"type": "string", "type": "string",
"maxLength": 32 "maxLength": 32
} }
@ -9317,25 +9451,20 @@
], ],
"properties": { "properties": {
"captcha_code": { "captcha_code": {
"description": "captcha_code",
"type": "string" "type": "string"
}, },
"captcha_id": { "captcha_id": {
"description": "captcha_id",
"type": "string" "type": "string"
}, },
"e_mail": { "e_mail": {
"description": "email",
"type": "string", "type": "string",
"maxLength": 500 "maxLength": 500
}, },
"name": { "name": {
"description": "name",
"type": "string", "type": "string",
"maxLength": 30 "maxLength": 30
}, },
"pass": { "pass": {
"description": "password",
"type": "string", "type": "string",
"maxLength": 32, "maxLength": 32,
"minLength": 8 "minLength": 8
@ -9349,15 +9478,12 @@
], ],
"properties": { "properties": {
"captcha_code": { "captcha_code": {
"description": "captcha_code",
"type": "string" "type": "string"
}, },
"captcha_id": { "captcha_id": {
"description": "captcha_id",
"type": "string" "type": "string"
}, },
"e_mail": { "e_mail": {
"description": "e_mail",
"type": "string", "type": "string",
"maxLength": 500 "maxLength": 500
} }
@ -9369,6 +9495,13 @@
"object_id" "object_id"
], ],
"properties": { "properties": {
"captcha_code": {
"type": "string"
},
"captcha_id": {
"description": "captcha_id",
"type": "string"
},
"is_cancel": { "is_cancel": {
"description": "is cancel", "description": "is cancel",
"type": "boolean" "type": "boolean"

View File

@ -146,6 +146,11 @@ definitions:
type: object type: object
schema.AddCommentReq: schema.AddCommentReq:
properties: properties:
captcha_code:
type: string
captcha_id:
description: captcha_id
type: string
mention_username_list: mention_username_list:
description: '@ user id list' description: '@ user id list'
items: items:
@ -168,6 +173,11 @@ definitions:
type: object type: object
schema.AddReportReq: schema.AddReportReq:
properties: properties:
captcha_code:
type: string
captcha_id:
description: captcha_id
type: string
content: content:
description: report content description: report content
maxLength: 500 maxLength: 500
@ -243,6 +253,10 @@ definitions:
type: object type: object
schema.AnswerAddReq: schema.AnswerAddReq:
properties: properties:
captcha_code:
type: string
captcha_id:
type: string
content: content:
maxLength: 65535 maxLength: 65535
minLength: 6 minLength: 6
@ -254,6 +268,10 @@ definitions:
type: object type: object
schema.AnswerUpdateReq: schema.AnswerUpdateReq:
properties: properties:
captcha_code:
type: string
captcha_id:
type: string
content: content:
maxLength: 65535 maxLength: 65535
minLength: 6 minLength: 6
@ -559,6 +577,7 @@ definitions:
description: follow count description: follow count
type: integer type: integer
have_password: have_password:
description: user have password
type: boolean type: boolean
id: id:
description: user id description: user id
@ -1104,6 +1123,11 @@ definitions:
type: object type: object
schema.QuestionAdd: schema.QuestionAdd:
properties: properties:
captcha_code:
type: string
captcha_id:
description: captcha_id
type: string
content: content:
description: content description: content
maxLength: 65535 maxLength: 65535
@ -1130,6 +1154,11 @@ definitions:
maxLength: 65535 maxLength: 65535
minLength: 6 minLength: 6
type: string type: string
captcha_code:
type: string
captcha_id:
description: captcha_id
type: string
content: content:
description: content description: content
maxLength: 65535 maxLength: 65535
@ -1244,6 +1273,11 @@ definitions:
type: object type: object
schema.QuestionUpdate: schema.QuestionUpdate:
properties: properties:
captcha_code:
type: string
captcha_id:
description: captcha_id
type: string
content: content:
description: content description: content
maxLength: 65535 maxLength: 65535
@ -1277,6 +1311,11 @@ definitions:
type: object type: object
schema.QuestionUpdateInviteUser: schema.QuestionUpdateInviteUser:
properties: properties:
captcha_code:
type: string
captcha_id:
description: captcha_id
type: string
id: id:
type: string type: string
invite_user: invite_user:
@ -1288,14 +1327,22 @@ definitions:
type: object type: object
schema.RemoveAnswerReq: schema.RemoveAnswerReq:
properties: properties:
captcha_code:
type: string
captcha_id:
type: string
id: id:
description: answer id
type: string type: string
required: required:
- id - id
type: object type: object
schema.RemoveCommentReq: schema.RemoveCommentReq:
properties: properties:
captcha_code:
type: string
captcha_id:
description: captcha_id
type: string
comment_id: comment_id:
description: comment id description: comment id
type: string type: string
@ -1304,6 +1351,11 @@ definitions:
type: object type: object
schema.RemoveQuestionReq: schema.RemoveQuestionReq:
properties: properties:
captcha_code:
type: string
captcha_id:
description: captcha_id
type: string
id: id:
description: question id description: question id
type: string type: string
@ -1347,18 +1399,6 @@ definitions:
- id - id
- operation - operation
type: object type: object
schema.SearchListResp:
properties:
count:
type: integer
extra:
description: extra fields
list:
description: search response
items:
$ref: '#/definitions/schema.SearchResp'
type: array
type: object
schema.SearchObject: schema.SearchObject:
properties: properties:
accepted: accepted:
@ -1391,6 +1431,16 @@ definitions:
type: integer type: integer
type: object type: object
schema.SearchResp: schema.SearchResp:
properties:
count:
type: integer
list:
description: search response
items:
$ref: '#/definitions/schema.SearchResult'
type: array
type: object
schema.SearchResult:
properties: properties:
object: object:
allOf: allOf:
@ -1813,6 +1863,11 @@ definitions:
type: object type: object
schema.UpdateCommentReq: schema.UpdateCommentReq:
properties: properties:
captcha_code:
type: string
captcha_id:
description: captcha_id
type: string
comment_id: comment_id:
description: comment id description: comment id
type: string type: string
@ -2009,31 +2064,22 @@ definitions:
schema.UserBasicInfo: schema.UserBasicInfo:
properties: properties:
avatar: avatar:
description: avatar
type: string type: string
display_name: display_name:
description: display_name
type: string type: string
id: id:
description: user_id
type: string type: string
ip_info: ip_info:
description: ip info
type: string type: string
location: location:
description: location
type: string type: string
rank: rank:
description: rank
type: integer type: integer
status: status:
description: status
type: string type: string
username: username:
description: name
type: string type: string
website: website:
description: website
type: string type: string
type: object type: object
schema.UserChangeEmailSendCodeReq: schema.UserChangeEmailSendCodeReq:
@ -2062,20 +2108,16 @@ definitions:
required: required:
- code - code
type: object type: object
schema.UserEmailLogin: schema.UserEmailLoginReq:
properties: properties:
captcha_code: captcha_code:
description: captcha_code
type: string type: string
captcha_id: captcha_id:
description: captcha_id
type: string type: string
e_mail: e_mail:
description: e_mail
maxLength: 500 maxLength: 500
type: string type: string
pass: pass:
description: password
maxLength: 32 maxLength: 32
minLength: 8 minLength: 8
type: string type: string
@ -2226,11 +2268,9 @@ definitions:
schema.UserRePassWordRequest: schema.UserRePassWordRequest:
properties: properties:
code: code:
description: code
maxLength: 100 maxLength: 100
type: string type: string
pass: pass:
description: Password
maxLength: 32 maxLength: 32
type: string type: string
required: required:
@ -2240,21 +2280,16 @@ definitions:
schema.UserRegisterReq: schema.UserRegisterReq:
properties: properties:
captcha_code: captcha_code:
description: captcha_code
type: string type: string
captcha_id: captcha_id:
description: captcha_id
type: string type: string
e_mail: e_mail:
description: email
maxLength: 500 maxLength: 500
type: string type: string
name: name:
description: name
maxLength: 30 maxLength: 30
type: string type: string
pass: pass:
description: password
maxLength: 32 maxLength: 32
minLength: 8 minLength: 8
type: string type: string
@ -2266,13 +2301,10 @@ definitions:
schema.UserRetrievePassWordRequest: schema.UserRetrievePassWordRequest:
properties: properties:
captcha_code: captcha_code:
description: captcha_code
type: string type: string
captcha_id: captcha_id:
description: captcha_id
type: string type: string
e_mail: e_mail:
description: e_mail
maxLength: 500 maxLength: 500
type: string type: string
required: required:
@ -2280,6 +2312,11 @@ definitions:
type: object type: object
schema.VoteReq: schema.VoteReq:
properties: properties:
captcha_code:
type: string
captcha_id:
description: captcha_id
type: string
is_cancel: is_cancel:
description: is cancel description: is cancel
type: boolean type: boolean
@ -3344,6 +3381,30 @@ paths:
summary: update user summary: update user
tags: tags:
- admin - admin
/answer/admin/api/users:
post:
consumes:
- application/json
description: add users
parameters:
- description: user
in: body
name: data
required: true
schema:
$ref: '#/definitions/schema.AddUserReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.RespBody'
security:
- ApiKeyAuth: []
summary: add users
tags:
- admin
/answer/admin/api/users/activation: /answer/admin/api/users/activation:
post: post:
description: send user activation description: send user activation
@ -5038,13 +5099,31 @@ paths:
- $ref: '#/definitions/handler.RespBody' - $ref: '#/definitions/handler.RespBody'
- properties: - properties:
data: data:
$ref: '#/definitions/schema.SearchListResp' $ref: '#/definitions/schema.SearchResp'
type: object type: object
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: search object summary: search object
tags: tags:
- Search - Search
/answer/api/v1/search/desc:
get:
description: get search description
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/handler.RespBody'
- properties:
data:
$ref: '#/definitions/schema.SearchResp'
type: object
summary: get search description
tags:
- Search
/answer/api/v1/siteinfo: /answer/api/v1/siteinfo:
get: get:
description: get site info description: get site info
@ -5582,7 +5661,7 @@ paths:
name: data name: data
required: true required: true
schema: schema:
$ref: '#/definitions/schema.UserEmailLogin' $ref: '#/definitions/schema.UserEmailLoginReq'
produces: produces:
- application/json - application/json
responses: responses: