mirror of https://gitee.com/answerdev/answer.git
6189 lines
203 KiB
Go
6189 lines
203 KiB
Go
// Package docs GENERATED BY SWAG; DO NOT EDIT
|
|
// This file was generated by swaggo/swag
|
|
package docs
|
|
|
|
import "github.com/swaggo/swag"
|
|
|
|
const docTemplate = `{
|
|
"schemes": {{ marshal .Schemes }},
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "{{escape .Description}}",
|
|
"title": "{{.Title}}",
|
|
"contact": {},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/answer/admin/api/answer/page": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Status:[available,deleted]",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "CmsSearchList",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"enum": [
|
|
"available",
|
|
"deleted"
|
|
],
|
|
"type": "string",
|
|
"description": "user status",
|
|
"name": "status",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "answer id or question title",
|
|
"name": "query",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "question id",
|
|
"name": "question_id",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/admin/api/answer/status": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Status:[available,deleted]",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "AdminSetAnswerStatus",
|
|
"parameters": [
|
|
{
|
|
"description": "AdminSetAnswerStatusRequest",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/entity.AdminSetAnswerStatusRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/admin/api/dashboard": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "DashboardInfo",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "DashboardInfo",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/admin/api/language/options": {
|
|
"get": {
|
|
"description": "Get language options",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Lang"
|
|
],
|
|
"summary": "Get language options",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/admin/api/question/page": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Status:[available,closed,deleted]",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "CmsSearchList",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"enum": [
|
|
"available",
|
|
"closed",
|
|
"deleted"
|
|
],
|
|
"type": "string",
|
|
"description": "user status",
|
|
"name": "status",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "question id or title",
|
|
"name": "query",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/admin/api/question/status": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Status:[available,closed,deleted]",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "AdminSetQuestionStatus",
|
|
"parameters": [
|
|
{
|
|
"description": "AdminSetQuestionStatusRequest",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.AdminSetQuestionStatusRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/admin/api/reasons": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "get reasons by object type and action",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"reason"
|
|
],
|
|
"summary": "get reasons by object type and action",
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
"question",
|
|
"answer",
|
|
"comment",
|
|
"user"
|
|
],
|
|
"type": "string",
|
|
"description": "object_type",
|
|
"name": "object_type",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"enum": [
|
|
"status",
|
|
"close",
|
|
"flag",
|
|
"review"
|
|
],
|
|
"type": "string",
|
|
"description": "action",
|
|
"name": "action",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/admin/api/report/": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
},
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "handle flag",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "handle flag",
|
|
"parameters": [
|
|
{
|
|
"description": "flag",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.ReportHandleReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/admin/api/reports/page": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
},
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "list report records",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "list report page",
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
"pending",
|
|
"completed"
|
|
],
|
|
"type": "string",
|
|
"description": "status",
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"enum": [
|
|
"all",
|
|
"question",
|
|
"answer",
|
|
"comment"
|
|
],
|
|
"type": "string",
|
|
"description": "object_type",
|
|
"name": "object_type",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/admin/api/setting/smtp": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "GetSMTPConfig get smtp config",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "GetSMTPConfig get smtp config",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.GetSMTPConfigResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "update smtp config",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "update smtp config",
|
|
"parameters": [
|
|
{
|
|
"description": "smtp config",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UpdateSMTPConfigReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/admin/api/siteinfo/general": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "get site general information",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "get site general information",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.SiteGeneralResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "update site general information",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "update site general information",
|
|
"parameters": [
|
|
{
|
|
"description": "general",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.SiteGeneralReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/admin/api/siteinfo/interface": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "get site interface",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "get site interface",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.SiteInterfaceResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "update site info interface",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "update site info interface",
|
|
"parameters": [
|
|
{
|
|
"description": "general",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.SiteInterfaceReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/admin/api/theme/options": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Get theme options",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "Get theme options",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/admin/api/user/status": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "update user",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "update user",
|
|
"parameters": [
|
|
{
|
|
"description": "user",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UpdateUserStatusReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/admin/api/users/page": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "get user page",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "get user page",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "search query: email, username or id:[id]",
|
|
"name": "query",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"enum": [
|
|
"suspended",
|
|
"deleted",
|
|
"inactive"
|
|
],
|
|
"type": "string",
|
|
"description": "user status",
|
|
"name": "status",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/pager.PageModel"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"records": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.GetUserPageResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/answer": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Update Answer",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-answer"
|
|
],
|
|
"summary": "Update Answer",
|
|
"parameters": [
|
|
{
|
|
"description": "AnswerUpdateReq",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.AnswerUpdateReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Insert Answer",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-answer"
|
|
],
|
|
"summary": "Insert Answer",
|
|
"parameters": [
|
|
{
|
|
"description": "AnswerAddReq",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.AnswerAddReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "delete answer",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-answer"
|
|
],
|
|
"summary": "delete answer",
|
|
"parameters": [
|
|
{
|
|
"description": "answer",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.RemoveAnswerReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/answer/acceptance": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Adopted",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-answer"
|
|
],
|
|
"summary": "Adopted",
|
|
"parameters": [
|
|
{
|
|
"description": "AnswerAdoptedReq",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.AnswerAdoptedReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/answer/info": {
|
|
"get": {
|
|
"description": "Get Answer",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-answer"
|
|
],
|
|
"summary": "Get Answer",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "1",
|
|
"description": "Answer TagID",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/answer/list": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "AnswerList \u003cbr\u003e \u003cb\u003eorder\u003c/b\u003e (default or updated)",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-answer"
|
|
],
|
|
"summary": "AnswerList",
|
|
"parameters": [
|
|
{
|
|
"description": "AnswerList",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.AnswerList"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/collection/switch": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "add collection",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Collection"
|
|
],
|
|
"summary": "add collection",
|
|
"parameters": [
|
|
{
|
|
"description": "collection",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.CollectionSwitchReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.CollectionSwitchResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/comment": {
|
|
"get": {
|
|
"description": "get comment by id",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Comment"
|
|
],
|
|
"summary": "get comment by id",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/pager.PageModel"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.GetCommentResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "update comment",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Comment"
|
|
],
|
|
"summary": "update comment",
|
|
"parameters": [
|
|
{
|
|
"description": "comment",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UpdateCommentReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "add comment",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Comment"
|
|
],
|
|
"summary": "add comment",
|
|
"parameters": [
|
|
{
|
|
"description": "comment",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.AddCommentReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.GetCommentResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "remove comment",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Comment"
|
|
],
|
|
"summary": "remove comment",
|
|
"parameters": [
|
|
{
|
|
"description": "comment",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.RemoveCommentReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/comment/page": {
|
|
"get": {
|
|
"description": "get comment page",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Comment"
|
|
],
|
|
"summary": "get comment page",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "object id",
|
|
"name": "object_id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"enum": [
|
|
"vote"
|
|
],
|
|
"type": "string",
|
|
"description": "query condition",
|
|
"name": "query_cond",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/pager.PageModel"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.GetCommentResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/follow": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "follow object or cancel follow operation",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Activity"
|
|
],
|
|
"summary": "follow object or cancel follow operation",
|
|
"parameters": [
|
|
{
|
|
"description": "follow",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.FollowReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.FollowResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/follow/tags": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "update user follow tags",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Activity"
|
|
],
|
|
"summary": "update user follow tags",
|
|
"parameters": [
|
|
{
|
|
"description": "follow",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UpdateFollowTagsReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/language/config": {
|
|
"get": {
|
|
"description": "get language config mapping",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Lang"
|
|
],
|
|
"summary": "get language config mapping",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Accept-Language",
|
|
"name": "Accept-Language",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/language/options": {
|
|
"get": {
|
|
"description": "Get language options",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Lang"
|
|
],
|
|
"summary": "Get language options",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/notification/page": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "get notification list",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Notification"
|
|
],
|
|
"summary": "get notification list",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"enum": [
|
|
"inbox",
|
|
"achievement"
|
|
],
|
|
"type": "string",
|
|
"description": "type",
|
|
"name": "type",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/notification/read/state": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "ClearUnRead",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Notification"
|
|
],
|
|
"summary": "ClearUnRead",
|
|
"parameters": [
|
|
{
|
|
"description": "NotificationClearIDRequest",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.NotificationClearIDRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/notification/read/state/all": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "ClearUnRead",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Notification"
|
|
],
|
|
"summary": "ClearUnRead",
|
|
"parameters": [
|
|
{
|
|
"description": "NotificationClearRequest",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.NotificationClearRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/notification/status": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "GetRedDot",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Notification"
|
|
],
|
|
"summary": "GetRedDot",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "DelRedDot",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Notification"
|
|
],
|
|
"summary": "DelRedDot",
|
|
"parameters": [
|
|
{
|
|
"description": "NotificationClearRequest",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.NotificationClearRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/personal/answer/page": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "UserAnswerList",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-answer"
|
|
],
|
|
"summary": "UserAnswerList",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "string",
|
|
"description": "username",
|
|
"name": "username",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"enum": [
|
|
"newest",
|
|
"score"
|
|
],
|
|
"type": "string",
|
|
"description": "order",
|
|
"name": "order",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "0",
|
|
"description": "page",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "20",
|
|
"description": "pagesize",
|
|
"name": "pagesize",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/personal/collection/page": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "UserCollectionList",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Collection"
|
|
],
|
|
"summary": "UserCollectionList",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "0",
|
|
"description": "page",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "20",
|
|
"description": "pagesize",
|
|
"name": "pagesize",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/personal/comment/page": {
|
|
"get": {
|
|
"description": "user personal comment list",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Comment"
|
|
],
|
|
"summary": "user personal comment list",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "username",
|
|
"name": "username",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/pager.PageModel"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.GetCommentPersonalWithPageResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/personal/qa/top": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "UserTop",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-question"
|
|
],
|
|
"summary": "UserTop",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "string",
|
|
"description": "username",
|
|
"name": "username",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/personal/rank/page": {
|
|
"get": {
|
|
"description": "user personal rank list",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Rank"
|
|
],
|
|
"summary": "user personal rank list",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "username",
|
|
"name": "username",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/pager.PageModel"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.GetRankPersonalWithPageResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/personal/user/info": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "GetOtherUserInfoByUsername",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "GetOtherUserInfoByUsername",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "username",
|
|
"name": "username",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.GetOtherUserInfoResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/personal/vote/page": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "user's vote",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Activity"
|
|
],
|
|
"summary": "user's votes",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/pager.PageModel"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.GetVoteWithPageResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/question": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "update question",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-question"
|
|
],
|
|
"summary": "update question",
|
|
"parameters": [
|
|
{
|
|
"description": "question",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.QuestionUpdate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "add question",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-question"
|
|
],
|
|
"summary": "add question",
|
|
"parameters": [
|
|
{
|
|
"description": "question",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.QuestionAdd"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "delete question",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-question"
|
|
],
|
|
"summary": "delete question",
|
|
"parameters": [
|
|
{
|
|
"description": "question",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.RemoveQuestionReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/question/closemsglist": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "close question msg list",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-question"
|
|
],
|
|
"summary": "close question msg list",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/question/info": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "GetQuestion Question",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-question"
|
|
],
|
|
"summary": "GetQuestion Question",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "1",
|
|
"description": "Question TagID",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/question/page": {
|
|
"get": {
|
|
"description": "SearchQuestionList \u003cbr\u003e \"order\" Enums(newest, active,frequent,score,unanswered)",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-question"
|
|
],
|
|
"summary": "SearchQuestionList",
|
|
"parameters": [
|
|
{
|
|
"description": "QuestionSearch",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.QuestionSearch"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/question/search": {
|
|
"post": {
|
|
"description": "SearchQuestionList",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-question"
|
|
],
|
|
"summary": "SearchQuestionList",
|
|
"parameters": [
|
|
{
|
|
"description": "QuestionSearch",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.QuestionSearch"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/question/similar": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "add question title like",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-question"
|
|
],
|
|
"summary": "add question title like",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "string",
|
|
"description": "title",
|
|
"name": "title",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/question/similar/tag": {
|
|
"get": {
|
|
"description": "Search Similar Question",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-question"
|
|
],
|
|
"summary": "Search Similar Question",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "question_id",
|
|
"name": "question_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/question/status": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Close question",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-question"
|
|
],
|
|
"summary": "Close question",
|
|
"parameters": [
|
|
{
|
|
"description": "question",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.CloseQuestionReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/question/tags": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "get tag list",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Tag"
|
|
],
|
|
"summary": "get tag list",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "tag",
|
|
"name": "tag",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.GetTagResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/reasons": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "get reasons by object type and action",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"reason"
|
|
],
|
|
"summary": "get reasons by object type and action",
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
"question",
|
|
"answer",
|
|
"comment",
|
|
"user"
|
|
],
|
|
"type": "string",
|
|
"description": "object_type",
|
|
"name": "object_type",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"enum": [
|
|
"status",
|
|
"close",
|
|
"flag",
|
|
"review"
|
|
],
|
|
"type": "string",
|
|
"description": "action",
|
|
"name": "action",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/report": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
},
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "add report \u003cbr\u003e source (question, answer, comment, user)",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Report"
|
|
],
|
|
"summary": "add report",
|
|
"parameters": [
|
|
{
|
|
"description": "report",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.AddReportReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/report/type/list": {
|
|
"get": {
|
|
"description": "get report type list",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Report"
|
|
],
|
|
"summary": "get report type list",
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
"question",
|
|
"answer",
|
|
"comment",
|
|
"user"
|
|
],
|
|
"type": "string",
|
|
"description": "report source",
|
|
"name": "source",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.GetReportTypeResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/revisions": {
|
|
"get": {
|
|
"description": "get revision list",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Revision"
|
|
],
|
|
"summary": "get revision list",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "object id",
|
|
"name": "object_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.GetRevisionResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/search": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "search object",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Search"
|
|
],
|
|
"summary": "search object",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "query string",
|
|
"name": "q",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"enum": [
|
|
"newest",
|
|
"active",
|
|
"score",
|
|
"relevance"
|
|
],
|
|
"type": "string",
|
|
"description": "order",
|
|
"name": "order",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.SearchListResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/siteinfo": {
|
|
"get": {
|
|
"description": "get site info",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"site"
|
|
],
|
|
"summary": "get site info",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.SiteGeneralResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/tag": {
|
|
"get": {
|
|
"description": "get tag one",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Tag"
|
|
],
|
|
"summary": "get tag one",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "tag id",
|
|
"name": "tag_id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "tag name",
|
|
"name": "tag_name",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.GetTagResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"description": "update tag",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Tag"
|
|
],
|
|
"summary": "update tag",
|
|
"parameters": [
|
|
{
|
|
"description": "tag",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UpdateTagReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "delete tag",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Tag"
|
|
],
|
|
"summary": "delete tag",
|
|
"parameters": [
|
|
{
|
|
"description": "tag",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.RemoveTagReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/tag/synonym": {
|
|
"put": {
|
|
"description": "update tag",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Tag"
|
|
],
|
|
"summary": "update tag",
|
|
"parameters": [
|
|
{
|
|
"description": "tag",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UpdateTagSynonymReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/tag/synonyms": {
|
|
"get": {
|
|
"description": "get tag synonyms",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Tag"
|
|
],
|
|
"summary": "get tag synonyms",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "tag id",
|
|
"name": "tag_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.GetTagSynonymsResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/tags/following": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "get following tag list",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Tag"
|
|
],
|
|
"summary": "get following tag list",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.GetFollowingTagsResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/tags/page": {
|
|
"get": {
|
|
"description": "get tag page",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Tag"
|
|
],
|
|
"summary": "get tag page",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "slug_name",
|
|
"name": "slug_name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"enum": [
|
|
"popular",
|
|
"name",
|
|
"newest"
|
|
],
|
|
"type": "string",
|
|
"description": "query condition",
|
|
"name": "query_cond",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/pager.PageModel"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.GetTagPageResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/action/record": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "ActionRecord",
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "ActionRecord",
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
"login",
|
|
"e_mail",
|
|
"find_pass"
|
|
],
|
|
"type": "string",
|
|
"description": "action",
|
|
"name": "action",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.ActionRecordResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/avatar/upload": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "UserUpdateInfo",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "UserUpdateInfo",
|
|
"parameters": [
|
|
{
|
|
"type": "file",
|
|
"description": "file",
|
|
"name": "file",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/email": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "user change email verification",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "user change email verification",
|
|
"parameters": [
|
|
{
|
|
"description": "UserChangeEmailVerifyReq",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UserChangeEmailVerifyReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/email/change/code": {
|
|
"post": {
|
|
"description": "send email to the user email then change their email",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "send email to the user email then change their email",
|
|
"parameters": [
|
|
{
|
|
"description": "UserChangeEmailSendCodeReq",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UserChangeEmailSendCodeReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/email/verification": {
|
|
"post": {
|
|
"description": "UserVerifyEmail",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "UserVerifyEmail",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "code",
|
|
"name": "code",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.GetUserResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/email/verification/send": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "UserVerifyEmailSend",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "UserVerifyEmailSend",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "captcha_id",
|
|
"name": "captcha_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "captcha_code",
|
|
"name": "captcha_code",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/info": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "get user info, if user no login response http code is 200, but user info is null",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "GetUserInfoByUserID",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.GetUserToSetShowResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "UserUpdateInfo update user info",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "UserUpdateInfo update user info",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "access-token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "UpdateInfoRequest",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UpdateInfoRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/interface": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "UserUpdateInterface update user interface config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "UserUpdateInterface update user interface config",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "access-token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "UpdateInfoRequest",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UpdateUserInterfaceRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/login/email": {
|
|
"post": {
|
|
"description": "UserEmailLogin",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "UserEmailLogin",
|
|
"parameters": [
|
|
{
|
|
"description": "UserEmailLogin",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UserEmailLogin"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.GetUserResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/logout": {
|
|
"get": {
|
|
"description": "user logout",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "user logout",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/notice/set": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "UserNoticeSet",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "UserNoticeSet",
|
|
"parameters": [
|
|
{
|
|
"description": "UserNoticeSetRequest",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UserNoticeSetRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.UserNoticeSetResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/password": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "UserModifyPassWord",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "UserModifyPassWord",
|
|
"parameters": [
|
|
{
|
|
"description": "UserModifyPassWordRequest",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UserModifyPassWordRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/password/replacement": {
|
|
"post": {
|
|
"description": "UseRePassWord",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "UseRePassWord",
|
|
"parameters": [
|
|
{
|
|
"description": "UserRePassWordRequest",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UserRePassWordRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/password/reset": {
|
|
"post": {
|
|
"description": "RetrievePassWord",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "RetrievePassWord",
|
|
"parameters": [
|
|
{
|
|
"description": "UserRetrievePassWordRequest",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UserRetrievePassWordRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/post/file": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "upload user post file",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "upload user post file",
|
|
"parameters": [
|
|
{
|
|
"type": "file",
|
|
"description": "file",
|
|
"name": "file",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/user/register/email": {
|
|
"post": {
|
|
"description": "UserRegisterByEmail",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "UserRegisterByEmail",
|
|
"parameters": [
|
|
{
|
|
"description": "UserRegisterReq",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.UserRegisterReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.GetUserResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/vote/down": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "add vote",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Activity"
|
|
],
|
|
"summary": "vote down",
|
|
"parameters": [
|
|
{
|
|
"description": "vote",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.VoteReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.VoteResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/answer/api/v1/vote/up": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "add vote",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Activity"
|
|
],
|
|
"summary": "vote up",
|
|
"parameters": [
|
|
{
|
|
"description": "vote",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/schema.VoteReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/schema.VoteResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/installation/base-info": {
|
|
"post": {
|
|
"description": "init base info",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"installation"
|
|
],
|
|
"summary": "init base info",
|
|
"parameters": [
|
|
{
|
|
"description": "InitBaseInfoReq",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/install.InitBaseInfoReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/installation/config-file/check": {
|
|
"post": {
|
|
"description": "check config file if exist when installation",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"installation"
|
|
],
|
|
"summary": "check config file if exist when installation",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/install.CheckConfigFileResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/installation/db/check": {
|
|
"post": {
|
|
"description": "check database if exist when installation",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"installation"
|
|
],
|
|
"summary": "check database if exist when installation",
|
|
"parameters": [
|
|
{
|
|
"description": "CheckDatabaseReq",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/install.CheckDatabaseReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/install.CheckConfigFileResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/installation/init": {
|
|
"post": {
|
|
"description": "init environment",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"installation"
|
|
],
|
|
"summary": "init environment",
|
|
"parameters": [
|
|
{
|
|
"description": "CheckDatabaseReq",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/install.CheckDatabaseReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/installation/language/options": {
|
|
"get": {
|
|
"description": "get installation language options",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Lang"
|
|
],
|
|
"summary": "get installation language options",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/translator.LangOption"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/personal/question/page": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "UserList",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"api-question"
|
|
],
|
|
"summary": "UserList",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "string",
|
|
"description": "username",
|
|
"name": "username",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"enum": [
|
|
"newest",
|
|
"score"
|
|
],
|
|
"type": "string",
|
|
"description": "order",
|
|
"name": "order",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "0",
|
|
"description": "page",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "20",
|
|
"description": "pagesize",
|
|
"name": "pagesize",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handler.RespBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"entity.AdminSetAnswerStatusRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"answer_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"handler.RespBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"description": "http code",
|
|
"type": "integer"
|
|
},
|
|
"data": {
|
|
"description": "response data"
|
|
},
|
|
"msg": {
|
|
"description": "response message",
|
|
"type": "string"
|
|
},
|
|
"reason": {
|
|
"description": "reason key",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"install.CheckConfigFileResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"config_file_exist": {
|
|
"type": "boolean"
|
|
},
|
|
"db_connection_success": {
|
|
"type": "boolean"
|
|
},
|
|
"db_table_exist": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"install.CheckDatabaseReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"db_type"
|
|
],
|
|
"properties": {
|
|
"db_file": {
|
|
"type": "string"
|
|
},
|
|
"db_host": {
|
|
"type": "string"
|
|
},
|
|
"db_name": {
|
|
"type": "string"
|
|
},
|
|
"db_password": {
|
|
"type": "string"
|
|
},
|
|
"db_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"postgres",
|
|
"sqlite3",
|
|
"mysql"
|
|
]
|
|
},
|
|
"db_username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"install.InitBaseInfoReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"contact_email",
|
|
"email",
|
|
"lang",
|
|
"name",
|
|
"password",
|
|
"site_name",
|
|
"site_url"
|
|
],
|
|
"properties": {
|
|
"contact_email": {
|
|
"type": "string",
|
|
"maxLength": 500
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"maxLength": 500
|
|
},
|
|
"lang": {
|
|
"type": "string",
|
|
"maxLength": 30
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 30
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 8
|
|
},
|
|
"site_name": {
|
|
"type": "string",
|
|
"maxLength": 30
|
|
},
|
|
"site_url": {
|
|
"type": "string",
|
|
"maxLength": 512
|
|
}
|
|
}
|
|
},
|
|
"pager.PageModel": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"list": {}
|
|
}
|
|
},
|
|
"schema.ActionRecordResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"captcha_id": {
|
|
"type": "string"
|
|
},
|
|
"captcha_img": {
|
|
"type": "string"
|
|
},
|
|
"verify": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"schema.AddCommentReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"object_id",
|
|
"original_text",
|
|
"parsed_text"
|
|
],
|
|
"properties": {
|
|
"mention_username_list": {
|
|
"description": "@ user id list",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"object_id": {
|
|
"description": "object id",
|
|
"type": "string"
|
|
},
|
|
"original_text": {
|
|
"description": "original comment content",
|
|
"type": "string"
|
|
},
|
|
"parsed_text": {
|
|
"description": "parsed comment content",
|
|
"type": "string"
|
|
},
|
|
"reply_comment_id": {
|
|
"description": "reply comment id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.AddReportReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"object_id",
|
|
"report_type"
|
|
],
|
|
"properties": {
|
|
"content": {
|
|
"description": "report content",
|
|
"type": "string",
|
|
"maxLength": 500
|
|
},
|
|
"object_id": {
|
|
"description": "object id",
|
|
"type": "string",
|
|
"maxLength": 20
|
|
},
|
|
"report_type": {
|
|
"description": "report type",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"schema.AdminSetQuestionStatusRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"question_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.AnswerAddReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"description": "content",
|
|
"type": "string"
|
|
},
|
|
"html": {
|
|
"description": "html",
|
|
"type": "string"
|
|
},
|
|
"question_id": {
|
|
"description": "question_id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.AnswerAdoptedReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"answer_id": {
|
|
"type": "string"
|
|
},
|
|
"question_id": {
|
|
"description": "question_id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.AnswerList": {
|
|
"type": "object",
|
|
"properties": {
|
|
"order": {
|
|
"description": "1 Default 2 time",
|
|
"type": "string"
|
|
},
|
|
"page": {
|
|
"description": "Query number of pages",
|
|
"type": "integer"
|
|
},
|
|
"page_size": {
|
|
"description": "Search page size",
|
|
"type": "integer"
|
|
},
|
|
"question_id": {
|
|
"description": "question_id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.AnswerUpdateReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"description": "content",
|
|
"type": "string"
|
|
},
|
|
"edit_summary": {
|
|
"description": "edit_summary",
|
|
"type": "string"
|
|
},
|
|
"html": {
|
|
"description": "html",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"description": "id",
|
|
"type": "string"
|
|
},
|
|
"question_id": {
|
|
"description": "question_id",
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"description": "title",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.AvatarInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"custom": {
|
|
"type": "string",
|
|
"maxLength": 200
|
|
},
|
|
"gravatar": {
|
|
"type": "string",
|
|
"maxLength": 200
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"maxLength": 100
|
|
}
|
|
}
|
|
},
|
|
"schema.CloseQuestionReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"id"
|
|
],
|
|
"properties": {
|
|
"close_msg": {
|
|
"description": "close_type",
|
|
"type": "string"
|
|
},
|
|
"close_type": {
|
|
"description": "close_type",
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.CollectionSwitchReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"group_id",
|
|
"object_id"
|
|
],
|
|
"properties": {
|
|
"group_id": {
|
|
"description": "user collection group TagID",
|
|
"type": "string"
|
|
},
|
|
"object_id": {
|
|
"description": "object TagID",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.CollectionSwitchResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"object_collection_count": {
|
|
"type": "string"
|
|
},
|
|
"object_id": {
|
|
"type": "string"
|
|
},
|
|
"switch": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"schema.FollowReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"object_id"
|
|
],
|
|
"properties": {
|
|
"is_cancel": {
|
|
"description": "is cancel",
|
|
"type": "boolean"
|
|
},
|
|
"object_id": {
|
|
"description": "object id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.FollowResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"follows": {
|
|
"description": "the followers of object",
|
|
"type": "integer"
|
|
},
|
|
"is_followed": {
|
|
"description": "if user is followed object will be true,otherwise false",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetCommentPersonalWithPageResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"answer_id": {
|
|
"description": "answer id",
|
|
"type": "string"
|
|
},
|
|
"comment_id": {
|
|
"description": "comment id",
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"description": "content",
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"description": "create time",
|
|
"type": "integer"
|
|
},
|
|
"object_id": {
|
|
"description": "object id",
|
|
"type": "string"
|
|
},
|
|
"object_type": {
|
|
"description": "object type",
|
|
"type": "string",
|
|
"enum": [
|
|
"question",
|
|
"answer",
|
|
"tag",
|
|
"comment"
|
|
]
|
|
},
|
|
"question_id": {
|
|
"description": "question id",
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"description": "title",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetCommentResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"comment_id": {
|
|
"description": "comment id",
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"description": "create time",
|
|
"type": "integer"
|
|
},
|
|
"is_vote": {
|
|
"description": "current user if already vote this comment",
|
|
"type": "boolean"
|
|
},
|
|
"member_actions": {
|
|
"description": "MemberActions",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.PermissionMemberAction"
|
|
}
|
|
},
|
|
"object_id": {
|
|
"description": "object id",
|
|
"type": "string"
|
|
},
|
|
"original_text": {
|
|
"description": "original comment content",
|
|
"type": "string"
|
|
},
|
|
"parsed_text": {
|
|
"description": "parsed comment content",
|
|
"type": "string"
|
|
},
|
|
"reply_comment_id": {
|
|
"description": "reply comment id",
|
|
"type": "string"
|
|
},
|
|
"reply_user_display_name": {
|
|
"description": "reply user display name",
|
|
"type": "string"
|
|
},
|
|
"reply_user_id": {
|
|
"description": "reply user id",
|
|
"type": "string"
|
|
},
|
|
"reply_user_status": {
|
|
"description": "reply user status",
|
|
"type": "string"
|
|
},
|
|
"reply_username": {
|
|
"description": "reply user username",
|
|
"type": "string"
|
|
},
|
|
"user_avatar": {
|
|
"description": "user avatar",
|
|
"type": "string"
|
|
},
|
|
"user_display_name": {
|
|
"description": "user display name",
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"description": "user id",
|
|
"type": "string"
|
|
},
|
|
"user_status": {
|
|
"description": "user status",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"description": "username",
|
|
"type": "string"
|
|
},
|
|
"vote_count": {
|
|
"description": "user vote amount",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetFollowingTagsResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"display_name": {
|
|
"description": "display name",
|
|
"type": "string"
|
|
},
|
|
"main_tag_slug_name": {
|
|
"description": "if main tag slug name is not empty, this tag is synonymous with the main tag",
|
|
"type": "string"
|
|
},
|
|
"slug_name": {
|
|
"description": "slug name",
|
|
"type": "string"
|
|
},
|
|
"tag_id": {
|
|
"description": "tag id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetOtherUserInfoByUsernameResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"answer_count": {
|
|
"description": "answer count",
|
|
"type": "integer"
|
|
},
|
|
"avatar": {
|
|
"description": "avatar",
|
|
"type": "string"
|
|
},
|
|
"bio": {
|
|
"description": "bio markdown",
|
|
"type": "string"
|
|
},
|
|
"bio_html": {
|
|
"description": "bio html",
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"description": "create time",
|
|
"type": "integer"
|
|
},
|
|
"display_name": {
|
|
"description": "display name",
|
|
"type": "string"
|
|
},
|
|
"follow_count": {
|
|
"description": "email\nfollow count",
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"description": "user id",
|
|
"type": "string"
|
|
},
|
|
"ip_info": {
|
|
"description": "ip info",
|
|
"type": "string"
|
|
},
|
|
"is_admin": {
|
|
"description": "is admin",
|
|
"type": "boolean"
|
|
},
|
|
"last_login_date": {
|
|
"description": "last login date",
|
|
"type": "integer"
|
|
},
|
|
"location": {
|
|
"description": "location",
|
|
"type": "string"
|
|
},
|
|
"mobile": {
|
|
"description": "mobile",
|
|
"type": "string"
|
|
},
|
|
"question_count": {
|
|
"description": "question count",
|
|
"type": "integer"
|
|
},
|
|
"rank": {
|
|
"description": "rank",
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"status_msg": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"description": "username",
|
|
"type": "string"
|
|
},
|
|
"website": {
|
|
"description": "website",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetOtherUserInfoResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"has": {
|
|
"type": "boolean"
|
|
},
|
|
"info": {
|
|
"$ref": "#/definitions/schema.GetOtherUserInfoByUsernameResp"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetRankPersonalWithPageResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"answer_id": {
|
|
"description": "answer id",
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"description": "content",
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"description": "create time",
|
|
"type": "integer"
|
|
},
|
|
"object_id": {
|
|
"description": "object id",
|
|
"type": "string"
|
|
},
|
|
"object_type": {
|
|
"description": "object type",
|
|
"type": "string",
|
|
"enum": [
|
|
"question",
|
|
"answer",
|
|
"tag",
|
|
"comment"
|
|
]
|
|
},
|
|
"question_id": {
|
|
"description": "question id",
|
|
"type": "string"
|
|
},
|
|
"rank_type": {
|
|
"description": "rank type",
|
|
"type": "string"
|
|
},
|
|
"reputation": {
|
|
"description": "reputation",
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"description": "title",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetReportTypeResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content_type": {
|
|
"description": "content type",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"description": "report description",
|
|
"type": "string"
|
|
},
|
|
"have_content": {
|
|
"description": "is have content",
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"description": "report name",
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"description": "report source",
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"description": "report type",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetRevisionResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"description": "content parsed"
|
|
},
|
|
"create_at": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"description": "id",
|
|
"type": "string"
|
|
},
|
|
"object_id": {
|
|
"description": "object id",
|
|
"type": "string"
|
|
},
|
|
"reason": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"description": "revision status(normal: 1; delete 2)",
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"description": "title",
|
|
"type": "string"
|
|
},
|
|
"use_id": {
|
|
"description": "user id",
|
|
"type": "string"
|
|
},
|
|
"user_info": {
|
|
"$ref": "#/definitions/schema.UserBasicInfo"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetSMTPConfigResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"encryption": {
|
|
"description": "\"\" SSL",
|
|
"type": "string"
|
|
},
|
|
"from_email": {
|
|
"type": "string"
|
|
},
|
|
"from_name": {
|
|
"type": "string"
|
|
},
|
|
"smtp_authentication": {
|
|
"type": "boolean"
|
|
},
|
|
"smtp_host": {
|
|
"type": "string"
|
|
},
|
|
"smtp_password": {
|
|
"type": "string"
|
|
},
|
|
"smtp_port": {
|
|
"type": "integer"
|
|
},
|
|
"smtp_username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetTagPageResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"description": "created time",
|
|
"type": "integer"
|
|
},
|
|
"display_name": {
|
|
"description": "display_name",
|
|
"type": "string"
|
|
},
|
|
"excerpt": {
|
|
"description": "excerpt",
|
|
"type": "string"
|
|
},
|
|
"follow_count": {
|
|
"description": "follower amount",
|
|
"type": "integer"
|
|
},
|
|
"is_follower": {
|
|
"description": "is follower",
|
|
"type": "boolean"
|
|
},
|
|
"original_text": {
|
|
"description": "original text",
|
|
"type": "string"
|
|
},
|
|
"parsed_text": {
|
|
"description": "parsed_text",
|
|
"type": "string"
|
|
},
|
|
"question_count": {
|
|
"description": "question amount",
|
|
"type": "integer"
|
|
},
|
|
"slug_name": {
|
|
"description": "slug_name",
|
|
"type": "string"
|
|
},
|
|
"tag_id": {
|
|
"description": "tag_id",
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"description": "updated time",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetTagResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"description": "created time",
|
|
"type": "integer"
|
|
},
|
|
"display_name": {
|
|
"description": "display name",
|
|
"type": "string"
|
|
},
|
|
"excerpt": {
|
|
"description": "excerpt",
|
|
"type": "string"
|
|
},
|
|
"follow_count": {
|
|
"description": "follower amount",
|
|
"type": "integer"
|
|
},
|
|
"is_follower": {
|
|
"description": "is follower",
|
|
"type": "boolean"
|
|
},
|
|
"main_tag_slug_name": {
|
|
"description": "if main tag slug name is not empty, this tag is synonymous with the main tag",
|
|
"type": "string"
|
|
},
|
|
"member_actions": {
|
|
"description": "MemberActions",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.PermissionMemberAction"
|
|
}
|
|
},
|
|
"original_text": {
|
|
"description": "original text",
|
|
"type": "string"
|
|
},
|
|
"parsed_text": {
|
|
"description": "parsed text",
|
|
"type": "string"
|
|
},
|
|
"question_count": {
|
|
"description": "question amount",
|
|
"type": "integer"
|
|
},
|
|
"slug_name": {
|
|
"description": "slug name",
|
|
"type": "string"
|
|
},
|
|
"tag_id": {
|
|
"description": "tag id",
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"description": "updated time",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetTagSynonymsResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"display_name": {
|
|
"description": "display name",
|
|
"type": "string"
|
|
},
|
|
"main_tag_slug_name": {
|
|
"description": "if main tag slug name is not empty, this tag is synonymous with the main tag",
|
|
"type": "string"
|
|
},
|
|
"slug_name": {
|
|
"description": "slug name",
|
|
"type": "string"
|
|
},
|
|
"tag_id": {
|
|
"description": "tag id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetUserPageResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"avatar": {
|
|
"description": "avatar",
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"description": "create time",
|
|
"type": "integer"
|
|
},
|
|
"deleted_at": {
|
|
"description": "delete time",
|
|
"type": "integer"
|
|
},
|
|
"display_name": {
|
|
"description": "display name",
|
|
"type": "string"
|
|
},
|
|
"e_mail": {
|
|
"description": "email",
|
|
"type": "string"
|
|
},
|
|
"rank": {
|
|
"description": "rank",
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"description": "user status(normal,suspended,deleted,inactive)",
|
|
"type": "string"
|
|
},
|
|
"suspended_at": {
|
|
"description": "suspended time",
|
|
"type": "integer"
|
|
},
|
|
"user_id": {
|
|
"description": "user id",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"description": "username",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetUserResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_token": {
|
|
"description": "access token",
|
|
"type": "string"
|
|
},
|
|
"answer_count": {
|
|
"description": "answer count",
|
|
"type": "integer"
|
|
},
|
|
"authority_group": {
|
|
"description": "authority group",
|
|
"type": "integer"
|
|
},
|
|
"avatar": {
|
|
"description": "avatar",
|
|
"type": "string"
|
|
},
|
|
"bio": {
|
|
"description": "bio markdown",
|
|
"type": "string"
|
|
},
|
|
"bio_html": {
|
|
"description": "bio html",
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"description": "create time",
|
|
"type": "integer"
|
|
},
|
|
"display_name": {
|
|
"description": "display name",
|
|
"type": "string"
|
|
},
|
|
"e_mail": {
|
|
"description": "email",
|
|
"type": "string"
|
|
},
|
|
"follow_count": {
|
|
"description": "follow count",
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"description": "user id",
|
|
"type": "string"
|
|
},
|
|
"ip_info": {
|
|
"description": "ip info",
|
|
"type": "string"
|
|
},
|
|
"is_admin": {
|
|
"description": "is admin",
|
|
"type": "boolean"
|
|
},
|
|
"language": {
|
|
"description": "language",
|
|
"type": "string"
|
|
},
|
|
"last_login_date": {
|
|
"description": "last login date",
|
|
"type": "integer"
|
|
},
|
|
"location": {
|
|
"description": "location",
|
|
"type": "string"
|
|
},
|
|
"mail_status": {
|
|
"description": "mail status(1 pass 2 to be verified)",
|
|
"type": "integer"
|
|
},
|
|
"mobile": {
|
|
"description": "mobile",
|
|
"type": "string"
|
|
},
|
|
"notice_status": {
|
|
"description": "notice status(1 on 2off)",
|
|
"type": "integer"
|
|
},
|
|
"question_count": {
|
|
"description": "question count",
|
|
"type": "integer"
|
|
},
|
|
"rank": {
|
|
"description": "rank",
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"description": "user status",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"description": "username",
|
|
"type": "string"
|
|
},
|
|
"website": {
|
|
"description": "website",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetUserToSetShowResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_token": {
|
|
"description": "access token",
|
|
"type": "string"
|
|
},
|
|
"answer_count": {
|
|
"description": "answer count",
|
|
"type": "integer"
|
|
},
|
|
"authority_group": {
|
|
"description": "authority group",
|
|
"type": "integer"
|
|
},
|
|
"avatar": {
|
|
"$ref": "#/definitions/schema.AvatarInfo"
|
|
},
|
|
"bio": {
|
|
"description": "bio markdown",
|
|
"type": "string"
|
|
},
|
|
"bio_html": {
|
|
"description": "bio html",
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"description": "create time",
|
|
"type": "integer"
|
|
},
|
|
"display_name": {
|
|
"description": "display name",
|
|
"type": "string"
|
|
},
|
|
"e_mail": {
|
|
"description": "email",
|
|
"type": "string"
|
|
},
|
|
"follow_count": {
|
|
"description": "follow count",
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"description": "user id",
|
|
"type": "string"
|
|
},
|
|
"ip_info": {
|
|
"description": "ip info",
|
|
"type": "string"
|
|
},
|
|
"is_admin": {
|
|
"description": "is admin",
|
|
"type": "boolean"
|
|
},
|
|
"language": {
|
|
"description": "language",
|
|
"type": "string"
|
|
},
|
|
"last_login_date": {
|
|
"description": "last login date",
|
|
"type": "integer"
|
|
},
|
|
"location": {
|
|
"description": "location",
|
|
"type": "string"
|
|
},
|
|
"mail_status": {
|
|
"description": "mail status(1 pass 2 to be verified)",
|
|
"type": "integer"
|
|
},
|
|
"mobile": {
|
|
"description": "mobile",
|
|
"type": "string"
|
|
},
|
|
"notice_status": {
|
|
"description": "notice status(1 on 2off)",
|
|
"type": "integer"
|
|
},
|
|
"question_count": {
|
|
"description": "question count",
|
|
"type": "integer"
|
|
},
|
|
"rank": {
|
|
"description": "rank",
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"description": "user status",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"description": "username",
|
|
"type": "string"
|
|
},
|
|
"website": {
|
|
"description": "website",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.GetVoteWithPageResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"answer_id": {
|
|
"description": "answer id",
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"description": "content",
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"description": "create time",
|
|
"type": "integer"
|
|
},
|
|
"object_id": {
|
|
"description": "object id",
|
|
"type": "string"
|
|
},
|
|
"object_type": {
|
|
"description": "object type",
|
|
"type": "string",
|
|
"enum": [
|
|
"question",
|
|
"answer",
|
|
"tag",
|
|
"comment"
|
|
]
|
|
},
|
|
"question_id": {
|
|
"description": "question id",
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"description": "title",
|
|
"type": "string"
|
|
},
|
|
"vote_type": {
|
|
"description": "vote type",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.NotificationClearIDRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.NotificationClearRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"description": "inbox achievement",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.PermissionMemberAction": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.QuestionAdd": {
|
|
"type": "object",
|
|
"required": [
|
|
"content",
|
|
"html",
|
|
"tags",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"content": {
|
|
"description": "content",
|
|
"type": "string",
|
|
"maxLength": 65535,
|
|
"minLength": 6
|
|
},
|
|
"html": {
|
|
"description": "html",
|
|
"type": "string",
|
|
"maxLength": 65535,
|
|
"minLength": 6
|
|
},
|
|
"tags": {
|
|
"description": "tags",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.TagItem"
|
|
}
|
|
},
|
|
"title": {
|
|
"description": "question title",
|
|
"type": "string",
|
|
"maxLength": 150,
|
|
"minLength": 6
|
|
}
|
|
}
|
|
},
|
|
"schema.QuestionSearch": {
|
|
"type": "object",
|
|
"properties": {
|
|
"order": {
|
|
"description": "Search order by",
|
|
"type": "string"
|
|
},
|
|
"page": {
|
|
"description": "Query number of pages",
|
|
"type": "integer"
|
|
},
|
|
"page_size": {
|
|
"description": "Search page size",
|
|
"type": "integer"
|
|
},
|
|
"tag": {
|
|
"description": "Tags []string ` + "`" + `json:\"tags\" form:\"tags\"` + "`" + ` // Search tag",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"description": "Search username",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.QuestionUpdate": {
|
|
"type": "object",
|
|
"required": [
|
|
"content",
|
|
"html",
|
|
"id",
|
|
"tags",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"content": {
|
|
"description": "content",
|
|
"type": "string",
|
|
"maxLength": 65535,
|
|
"minLength": 6
|
|
},
|
|
"edit_summary": {
|
|
"description": "edit summary",
|
|
"type": "string"
|
|
},
|
|
"html": {
|
|
"description": "html",
|
|
"type": "string",
|
|
"maxLength": 65535,
|
|
"minLength": 6
|
|
},
|
|
"id": {
|
|
"description": "question id",
|
|
"type": "string"
|
|
},
|
|
"tags": {
|
|
"description": "tags",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.TagItem"
|
|
}
|
|
},
|
|
"title": {
|
|
"description": "question title",
|
|
"type": "string",
|
|
"maxLength": 150,
|
|
"minLength": 6
|
|
}
|
|
}
|
|
},
|
|
"schema.RemoveAnswerReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"id"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "answer id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.RemoveCommentReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"comment_id"
|
|
],
|
|
"properties": {
|
|
"comment_id": {
|
|
"description": "comment id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.RemoveQuestionReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"id"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "question id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.RemoveTagReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"tag_id"
|
|
],
|
|
"properties": {
|
|
"tag_id": {
|
|
"description": "tag_id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.ReportHandleReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"flagged_type",
|
|
"id"
|
|
],
|
|
"properties": {
|
|
"flagged_content": {
|
|
"type": "string"
|
|
},
|
|
"flagged_type": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"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": {
|
|
"type": "object",
|
|
"properties": {
|
|
"accepted": {
|
|
"type": "boolean"
|
|
},
|
|
"answer_count": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "integer"
|
|
},
|
|
"excerpt": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"description": "Status",
|
|
"type": "string"
|
|
},
|
|
"tags": {
|
|
"description": "tags",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.TagResp"
|
|
}
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"user_info": {
|
|
"description": "user info",
|
|
"$ref": "#/definitions/schema.UserBasicInfo"
|
|
},
|
|
"vote_count": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"schema.SearchResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"object": {
|
|
"description": "this object",
|
|
"$ref": "#/definitions/schema.SearchObject"
|
|
},
|
|
"object_type": {
|
|
"description": "object_type",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.SiteGeneralReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"contact_email",
|
|
"description",
|
|
"name",
|
|
"short_description",
|
|
"site_url"
|
|
],
|
|
"properties": {
|
|
"contact_email": {
|
|
"type": "string",
|
|
"maxLength": 512
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"maxLength": 2000
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 128
|
|
},
|
|
"short_description": {
|
|
"type": "string",
|
|
"maxLength": 255
|
|
},
|
|
"site_url": {
|
|
"type": "string",
|
|
"maxLength": 512
|
|
}
|
|
}
|
|
},
|
|
"schema.SiteGeneralResp": {
|
|
"type": "object",
|
|
"required": [
|
|
"contact_email",
|
|
"description",
|
|
"name",
|
|
"short_description",
|
|
"site_url"
|
|
],
|
|
"properties": {
|
|
"contact_email": {
|
|
"type": "string",
|
|
"maxLength": 512
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"maxLength": 2000
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 128
|
|
},
|
|
"short_description": {
|
|
"type": "string",
|
|
"maxLength": 255
|
|
},
|
|
"site_url": {
|
|
"type": "string",
|
|
"maxLength": 512
|
|
}
|
|
}
|
|
},
|
|
"schema.SiteInterfaceReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"language",
|
|
"theme",
|
|
"time_zone"
|
|
],
|
|
"properties": {
|
|
"language": {
|
|
"type": "string",
|
|
"maxLength": 128
|
|
},
|
|
"logo": {
|
|
"type": "string",
|
|
"maxLength": 256
|
|
},
|
|
"theme": {
|
|
"type": "string",
|
|
"maxLength": 128
|
|
},
|
|
"time_zone": {
|
|
"type": "string",
|
|
"maxLength": 128
|
|
}
|
|
}
|
|
},
|
|
"schema.SiteInterfaceResp": {
|
|
"type": "object",
|
|
"required": [
|
|
"language",
|
|
"theme",
|
|
"time_zone"
|
|
],
|
|
"properties": {
|
|
"language": {
|
|
"type": "string",
|
|
"maxLength": 128
|
|
},
|
|
"logo": {
|
|
"type": "string",
|
|
"maxLength": 256
|
|
},
|
|
"theme": {
|
|
"type": "string",
|
|
"maxLength": 128
|
|
},
|
|
"time_zone": {
|
|
"type": "string",
|
|
"maxLength": 128
|
|
}
|
|
}
|
|
},
|
|
"schema.TagItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"display_name": {
|
|
"description": "display_name",
|
|
"type": "string",
|
|
"maxLength": 35
|
|
},
|
|
"original_text": {
|
|
"description": "original text",
|
|
"type": "string"
|
|
},
|
|
"parsed_text": {
|
|
"description": "parsed text",
|
|
"type": "string"
|
|
},
|
|
"slug_name": {
|
|
"description": "slug_name",
|
|
"type": "string",
|
|
"maxLength": 35
|
|
}
|
|
}
|
|
},
|
|
"schema.TagResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"display_name": {
|
|
"type": "string"
|
|
},
|
|
"main_tag_slug_name": {
|
|
"description": "if main tag slug name is not empty, this tag is synonymous with the main tag",
|
|
"type": "string"
|
|
},
|
|
"slug_name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.UpdateCommentReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"comment_id"
|
|
],
|
|
"properties": {
|
|
"comment_id": {
|
|
"description": "comment id",
|
|
"type": "string"
|
|
},
|
|
"original_text": {
|
|
"description": "original comment content",
|
|
"type": "string"
|
|
},
|
|
"parsed_text": {
|
|
"description": "parsed comment content",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.UpdateFollowTagsReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"slug_name_list": {
|
|
"description": "tag slug name list",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"schema.UpdateInfoRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"display_name"
|
|
],
|
|
"properties": {
|
|
"avatar": {
|
|
"description": "avatar",
|
|
"$ref": "#/definitions/schema.AvatarInfo"
|
|
},
|
|
"bio": {
|
|
"description": "bio",
|
|
"type": "string",
|
|
"maxLength": 4096
|
|
},
|
|
"bio_html": {
|
|
"description": "bio",
|
|
"type": "string",
|
|
"maxLength": 4096
|
|
},
|
|
"display_name": {
|
|
"description": "display_name",
|
|
"type": "string",
|
|
"maxLength": 30
|
|
},
|
|
"location": {
|
|
"description": "location",
|
|
"type": "string",
|
|
"maxLength": 100
|
|
},
|
|
"username": {
|
|
"description": "username",
|
|
"type": "string",
|
|
"maxLength": 30
|
|
},
|
|
"website": {
|
|
"description": "website",
|
|
"type": "string",
|
|
"maxLength": 500
|
|
}
|
|
}
|
|
},
|
|
"schema.UpdateSMTPConfigReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"encryption": {
|
|
"description": "\"\" SSL",
|
|
"type": "string",
|
|
"enum": [
|
|
"SSL"
|
|
]
|
|
},
|
|
"from_email": {
|
|
"type": "string",
|
|
"maxLength": 256
|
|
},
|
|
"from_name": {
|
|
"type": "string",
|
|
"maxLength": 256
|
|
},
|
|
"smtp_authentication": {
|
|
"type": "boolean"
|
|
},
|
|
"smtp_host": {
|
|
"type": "string",
|
|
"maxLength": 256
|
|
},
|
|
"smtp_password": {
|
|
"type": "string",
|
|
"maxLength": 256
|
|
},
|
|
"smtp_port": {
|
|
"type": "integer",
|
|
"maximum": 65535,
|
|
"minimum": 1
|
|
},
|
|
"smtp_username": {
|
|
"type": "string",
|
|
"maxLength": 256
|
|
},
|
|
"test_email_recipient": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.UpdateTagReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"tag_id"
|
|
],
|
|
"properties": {
|
|
"display_name": {
|
|
"description": "display_name",
|
|
"type": "string",
|
|
"maxLength": 35
|
|
},
|
|
"edit_summary": {
|
|
"description": "edit summary",
|
|
"type": "string"
|
|
},
|
|
"original_text": {
|
|
"description": "original text",
|
|
"type": "string"
|
|
},
|
|
"parsed_text": {
|
|
"description": "parsed text",
|
|
"type": "string"
|
|
},
|
|
"slug_name": {
|
|
"description": "slug_name",
|
|
"type": "string",
|
|
"maxLength": 35
|
|
},
|
|
"tag_id": {
|
|
"description": "tag_id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.UpdateTagSynonymReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"synonym_tag_list",
|
|
"tag_id"
|
|
],
|
|
"properties": {
|
|
"synonym_tag_list": {
|
|
"description": "synonym tag list",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/schema.TagItem"
|
|
}
|
|
},
|
|
"tag_id": {
|
|
"description": "tag_id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.UpdateUserInterfaceRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"language"
|
|
],
|
|
"properties": {
|
|
"language": {
|
|
"description": "language",
|
|
"type": "string",
|
|
"maxLength": 100
|
|
}
|
|
}
|
|
},
|
|
"schema.UpdateUserStatusReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"status",
|
|
"user_id"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"description": "user status",
|
|
"type": "string",
|
|
"enum": [
|
|
"normal",
|
|
"suspended",
|
|
"deleted",
|
|
"inactive"
|
|
]
|
|
},
|
|
"user_id": {
|
|
"description": "user id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.UserBasicInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"avatar": {
|
|
"description": "avatar",
|
|
"type": "string"
|
|
},
|
|
"display_name": {
|
|
"description": "display_name",
|
|
"type": "string"
|
|
},
|
|
"ip_info": {
|
|
"description": "ip info",
|
|
"type": "string"
|
|
},
|
|
"location": {
|
|
"description": "location",
|
|
"type": "string"
|
|
},
|
|
"rank": {
|
|
"description": "rank",
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"description": "status",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"description": "name",
|
|
"type": "string"
|
|
},
|
|
"website": {
|
|
"description": "website",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.UserChangeEmailSendCodeReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"e_mail"
|
|
],
|
|
"properties": {
|
|
"captcha_code": {
|
|
"type": "string",
|
|
"maxLength": 500
|
|
},
|
|
"captcha_id": {
|
|
"type": "string",
|
|
"maxLength": 500
|
|
},
|
|
"e_mail": {
|
|
"type": "string",
|
|
"maxLength": 500
|
|
}
|
|
}
|
|
},
|
|
"schema.UserChangeEmailVerifyReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"code"
|
|
],
|
|
"properties": {
|
|
"code": {
|
|
"type": "string",
|
|
"maxLength": 500
|
|
}
|
|
}
|
|
},
|
|
"schema.UserEmailLogin": {
|
|
"type": "object",
|
|
"properties": {
|
|
"captcha_code": {
|
|
"description": "captcha_code",
|
|
"type": "string"
|
|
},
|
|
"captcha_id": {
|
|
"description": "captcha_id",
|
|
"type": "string"
|
|
},
|
|
"e_mail": {
|
|
"description": "e_mail",
|
|
"type": "string"
|
|
},
|
|
"pass": {
|
|
"description": "password",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.UserModifyPassWordRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"old_pass": {
|
|
"description": "old password",
|
|
"type": "string"
|
|
},
|
|
"pass": {
|
|
"description": "password",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.UserNoticeSetRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notice_switch": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"schema.UserNoticeSetResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notice_switch": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"schema.UserRePassWordRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"code",
|
|
"pass"
|
|
],
|
|
"properties": {
|
|
"code": {
|
|
"description": "code",
|
|
"type": "string",
|
|
"maxLength": 100
|
|
},
|
|
"pass": {
|
|
"description": "Password",
|
|
"type": "string",
|
|
"maxLength": 32
|
|
}
|
|
}
|
|
},
|
|
"schema.UserRegisterReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"e_mail",
|
|
"name",
|
|
"pass"
|
|
],
|
|
"properties": {
|
|
"e_mail": {
|
|
"description": "email",
|
|
"type": "string",
|
|
"maxLength": 500
|
|
},
|
|
"name": {
|
|
"description": "name",
|
|
"type": "string",
|
|
"maxLength": 30
|
|
},
|
|
"pass": {
|
|
"description": "password",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 8
|
|
}
|
|
}
|
|
},
|
|
"schema.UserRetrievePassWordRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"e_mail"
|
|
],
|
|
"properties": {
|
|
"captcha_code": {
|
|
"description": "captcha_code",
|
|
"type": "string"
|
|
},
|
|
"captcha_id": {
|
|
"description": "captcha_id",
|
|
"type": "string"
|
|
},
|
|
"e_mail": {
|
|
"description": "e_mail",
|
|
"type": "string",
|
|
"maxLength": 500
|
|
}
|
|
}
|
|
},
|
|
"schema.VoteReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"object_id"
|
|
],
|
|
"properties": {
|
|
"is_cancel": {
|
|
"description": "is cancel",
|
|
"type": "boolean"
|
|
},
|
|
"object_id": {
|
|
"description": "id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.VoteResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"down_votes": {
|
|
"type": "integer"
|
|
},
|
|
"up_votes": {
|
|
"type": "integer"
|
|
},
|
|
"vote_status": {
|
|
"type": "string"
|
|
},
|
|
"votes": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"translator.LangOption": {
|
|
"type": "object",
|
|
"properties": {
|
|
"label": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"ApiKeyAuth": {
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = &swag.Spec{
|
|
Version: "",
|
|
Host: "",
|
|
BasePath: "",
|
|
Schemes: []string{},
|
|
Title: "",
|
|
Description: "",
|
|
InfoInstanceName: "swagger",
|
|
SwaggerTemplate: docTemplate,
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|