2022-09-27 17:59:05 +08:00
{
"swagger" : "2.0" ,
"info" : {
"contact" : { }
} ,
"paths" : {
2023-01-04 10:56:32 +08:00
"/" : {
"get" : {
"description" : "if config file not exist try to redirect to install page" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"installation"
] ,
"summary" : "if config file not exist try to redirect to install page" ,
"responses" : { }
}
} ,
2022-09-27 17:59:05 +08:00
"/answer/admin/api/answer/page" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "Status:[available,deleted]" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
2022-12-21 16:55:16 +08:00
"summary" : "AdminSearchAnswerList" ,
2022-09-27 17:59:05 +08:00
"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"
2022-11-01 09:12:12 +08:00
} ,
{
"type" : "string" ,
"description" : "answer id or question title" ,
"name" : "query" ,
"in" : "query"
2022-11-11 15:13:23 +08:00
} ,
{
"type" : "string" ,
"description" : "question id" ,
"name" : "question_id" ,
"in" : "query"
2022-09-27 17:59:05 +08:00
}
] ,
"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" : {
2022-12-07 16:51:08 +08:00
"$ref" : "#/definitions/schema.AdminSetAnswerStatusRequest"
2022-09-27 17:59:05 +08:00
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-11-02 16:01:17 +08:00
"/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"
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/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"
}
}
}
}
} ,
2023-01-13 12:50:20 +08:00
"/answer/admin/api/plugin/config" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "get plugin config" ,
"produces" : [
"application/json"
] ,
"tags" : [
"AdminPlugin"
] ,
"summary" : "get plugin config" ,
"parameters" : [
{
"type" : "string" ,
"description" : "plugin_slug_name" ,
"name" : "plugin_slug_name" ,
"in" : "query" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.GetPluginConfigResp"
}
}
}
]
}
}
}
} ,
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update plugin config" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"AdminPlugin"
] ,
"summary" : "update plugin config" ,
"parameters" : [
{
"description" : "UpdatePluginConfigReq" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.UpdatePluginConfigReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
"/answer/admin/api/plugin/status" : {
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update plugin status" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"AdminPlugin"
] ,
"summary" : "update plugin status" ,
"parameters" : [
{
"description" : "UpdatePluginStatusReq" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.UpdatePluginStatusReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
"/answer/admin/api/plugins" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "get plugin list" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"AdminPlugin"
] ,
"summary" : "get plugin list" ,
"parameters" : [
{
"type" : "string" ,
"description" : "status: active/inactive" ,
"name" : "status" ,
"in" : "query"
} ,
{
"type" : "boolean" ,
"description" : "have config" ,
"name" : "have_config" ,
"in" : "query"
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.GetPluginListResp"
}
}
}
}
]
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/answer/admin/api/question/page" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "Status:[available,closed,deleted]" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
2022-12-21 16:55:16 +08:00
"summary" : "AdminSearchList" ,
2022-09-27 17:59:05 +08:00
"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"
2022-11-01 09:12:12 +08:00
} ,
{
"type" : "string" ,
"description" : "question id or title" ,
"name" : "query" ,
"in" : "query"
2022-09-27 17:59:05 +08:00
}
] ,
"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"
}
}
}
}
} ,
2022-11-29 15:10:57 +08:00
"/answer/admin/api/roles" : {
"get" : {
"description" : "get role list" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "get role list" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.GetRoleResp"
}
}
}
}
]
}
}
}
}
} ,
2023-05-09 10:54:42 +08:00
"/answer/admin/api/setting/privileges" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "GetPrivilegesConfig get privileges config" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "GetPrivilegesConfig get privileges config" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.GetPrivilegesConfigResp"
}
}
}
]
}
}
}
} ,
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update privileges config" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "update privileges config" ,
"parameters" : [
{
"description" : "config" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.UpdatePrivilegesConfigReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-10-20 16:40:43 +08:00
"/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" : {
2022-10-21 10:26:32 +08:00
"$ref" : "#/definitions/schema.GetSMTPConfigResp"
2022-10-20 16:40:43 +08:00
}
}
}
]
}
}
}
} ,
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update smtp config" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "update smtp config" ,
"parameters" : [
{
2022-10-21 10:26:32 +08:00
"description" : "smtp config" ,
2022-10-20 16:40:43 +08:00
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2022-10-21 10:26:32 +08:00
"$ref" : "#/definitions/schema.UpdateSMTPConfigReq"
2022-10-20 16:40:43 +08:00
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-11-14 17:04:25 +08:00
"/answer/admin/api/siteinfo/branding" : {
"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.SiteBrandingResp"
}
}
}
]
}
}
}
} ,
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update site info branding" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "update site info branding" ,
"parameters" : [
{
"description" : "branding info" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.SiteBrandingReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-12-09 16:46:33 +08:00
"/answer/admin/api/siteinfo/custom-css-html" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "get site info custom html css config" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "get site info custom html css config" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.SiteCustomCssHTMLResp"
}
}
}
]
}
}
}
} ,
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update site custom css html config" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "update site custom css html config" ,
"parameters" : [
{
"description" : "login info" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.SiteCustomCssHTMLReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/answer/admin/api/siteinfo/general" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
2022-11-02 16:01:17 +08:00
"description" : "get site general information" ,
2022-09-27 17:59:05 +08:00
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
2022-11-02 16:01:17 +08:00
"summary" : "get site general information" ,
2022-09-27 17:59:05 +08:00
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.SiteGeneralResp"
}
}
}
]
}
}
}
} ,
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
2022-11-02 16:01:17 +08:00
"description" : "update site general information" ,
2022-09-27 17:59:05 +08:00
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
2022-11-02 16:01:17 +08:00
"summary" : "update site general information" ,
2022-09-27 17:59:05 +08:00
"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" : [ ]
}
] ,
2022-11-02 16:01:17 +08:00
"description" : "get site interface" ,
2022-09-27 17:59:05 +08:00
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
2022-11-02 16:01:17 +08:00
"summary" : "get site interface" ,
2022-09-27 17:59:05 +08:00
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.SiteInterfaceResp"
}
}
}
]
}
}
}
} ,
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
2022-11-02 16:01:17 +08:00
"description" : "update site info interface" ,
2022-09-27 17:59:05 +08:00
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
2022-11-02 16:01:17 +08:00
"summary" : "update site info interface" ,
2022-09-27 17:59:05 +08:00
"parameters" : [
{
"description" : "general" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.SiteInterfaceReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-11-14 17:04:25 +08:00
"/answer/admin/api/siteinfo/legal" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "Set the legal information for the site" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "Set the legal information for the site" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.SiteLegalResp"
}
}
}
]
}
}
}
} ,
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update site legal info" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "update site legal info" ,
"parameters" : [
{
"description" : "write info" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.SiteLegalReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-12-09 16:46:33 +08:00
"/answer/admin/api/siteinfo/login" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "get site info login config" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "get site info login config" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.SiteLoginResp"
}
}
}
]
}
}
}
} ,
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update site login" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "update site login" ,
"parameters" : [
{
"description" : "login info" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.SiteLoginReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-12-07 16:51:08 +08:00
"/answer/admin/api/siteinfo/seo" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "get site seo information" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "get site seo information" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.SiteSeoResp"
}
}
}
]
}
}
}
} ,
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update site seo information" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "update site seo information" ,
"parameters" : [
{
"description" : "seo" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.SiteSeoReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-12-09 16:46:33 +08:00
"/answer/admin/api/siteinfo/theme" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "get site info theme config" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "get site info theme config" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.SiteThemeResp"
}
}
}
]
}
}
}
} ,
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update site custom css html config" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "update site custom css html config" ,
"parameters" : [
{
"description" : "login info" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.SiteThemeReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2023-05-09 10:54:42 +08:00
"/answer/admin/api/siteinfo/users" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "get site user config" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "get site user config" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.SiteUsersResp"
}
}
}
]
}
}
}
} ,
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update site info config about users" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "update site info config about users" ,
"parameters" : [
{
"description" : "users info" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.SiteUsersReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-11-14 17:04:25 +08:00
"/answer/admin/api/siteinfo/write" : {
"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.SiteWriteResp"
}
}
}
]
}
}
}
} ,
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update site write info" ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "update site write info" ,
"parameters" : [
{
"description" : "write info" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.SiteWriteReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/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"
}
}
}
}
} ,
2022-12-09 16:46:33 +08:00
"/answer/admin/api/user" : {
"post" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "add user" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "add user" ,
"parameters" : [
{
"description" : "user" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.AddUserReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
"/answer/admin/api/user/password" : {
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update user password" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "update user password" ,
"parameters" : [
{
"description" : "user" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.UpdateUserPasswordReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-11-29 15:10:57 +08:00
"/answer/admin/api/user/role" : {
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update user role" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"admin"
] ,
"summary" : "update user role" ,
"parameters" : [
{
"description" : "user" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.UpdateUserRoleReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/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" ,
2022-11-01 09:12:12 +08:00
"description" : "search query: email, username or id:[id]" ,
"name" : "query" ,
2022-09-27 17:59:05 +08:00
"in" : "query"
} ,
2022-11-29 15:10:57 +08:00
{
"type" : "boolean" ,
"description" : "staff user" ,
"name" : "staff" ,
"in" : "query"
} ,
2022-09-27 17:59:05 +08:00
{
"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"
}
}
}
}
]
}
}
}
]
}
}
}
}
} ,
2022-11-23 11:10:15 +08:00
"/answer/api/v1/activity/timeline" : {
"get" : {
"description" : "get object timeline" ,
"produces" : [
"application/json"
] ,
"tags" : [
"Comment"
] ,
"summary" : "get object timeline" ,
"parameters" : [
{
"type" : "string" ,
"description" : "object id" ,
"name" : "object_id" ,
"in" : "query"
} ,
{
"type" : "string" ,
"description" : "tag slug name" ,
"name" : "tag_slug_name" ,
"in" : "query"
} ,
{
"enum" : [
"question" ,
"answer" ,
"tag"
] ,
"type" : "string" ,
"description" : "object type" ,
"name" : "object_type" ,
"in" : "query"
} ,
{
"type" : "boolean" ,
"description" : "is show vote" ,
"name" : "show_vote" ,
"in" : "query"
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
2022-11-23 12:07:06 +08:00
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.GetObjectTimelineResp"
}
}
}
]
}
}
}
}
} ,
"/answer/api/v1/activity/timeline/detail" : {
"get" : {
"description" : "get object timeline detail" ,
"produces" : [
"application/json"
] ,
"tags" : [
"Comment"
] ,
"summary" : "get object timeline detail" ,
"parameters" : [
{
"type" : "string" ,
"description" : "revision id" ,
"name" : "revision_id" ,
"in" : "query" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
2022-11-23 11:10:15 +08:00
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.GetObjectTimelineResp"
}
}
}
]
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/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" : [ ]
}
] ,
2022-12-22 11:04:19 +08:00
"description" : "Accepted" ,
2022-09-27 17:59:05 +08:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"api-answer"
] ,
2022-12-22 11:04:19 +08:00
"summary" : "Accepted" ,
2022-09-27 17:59:05 +08:00
"parameters" : [
{
2022-12-22 11:04:19 +08:00
"description" : "AnswerAcceptedReq" ,
2022-09-27 17:59:05 +08:00
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2022-12-22 11:04:19 +08:00
"$ref" : "#/definitions/schema.AnswerAcceptedReq"
2022-09-27 17:59:05 +08:00
}
}
] ,
"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"
}
}
}
}
} ,
2022-12-01 18:36:20 +08:00
"/answer/api/v1/answer/page" : {
2022-09-28 14:54:54 +08:00
"get" : {
2022-09-27 17:59:05 +08:00
"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" : [
{
2022-12-01 18:36:20 +08:00
"type" : "string" ,
"description" : "question_id" ,
"name" : "question_id" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "order" ,
"name" : "order" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "page" ,
"name" : "page" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "page_size" ,
"name" : "page_size" ,
"in" : "query" ,
"required" : true
2022-09-27 17:59:05 +08:00
}
] ,
"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"
}
}
}
}
]
}
}
}
]
}
}
}
}
} ,
2023-01-10 12:20:14 +08:00
"/answer/api/v1/connector/binding/email" : {
"post" : {
"description" : "external login binding user send email" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2023-01-13 12:50:20 +08:00
"PluginConnector"
2023-01-10 12:20:14 +08:00
] ,
"summary" : "external login binding user send email" ,
"parameters" : [
{
"description" : "external login binding user send email" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.ExternalLoginBindingUserSendEmailReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.ExternalLoginBindingUserSendEmailResp"
}
}
}
]
}
}
}
}
} ,
2023-01-13 12:50:20 +08:00
"/answer/api/v1/connector/info" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "get all enabled connectors" ,
"produces" : [
"application/json"
] ,
"tags" : [
"PluginConnector"
] ,
"summary" : "get all enabled connectors" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.ConnectorInfoResp"
}
}
}
}
]
}
}
}
}
} ,
"/answer/api/v1/connector/user/info" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "get all connectors info about user" ,
"produces" : [
"application/json"
] ,
"tags" : [
"PluginConnector"
] ,
"summary" : "get all connectors info about user" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.ConnectorUserInfoResp"
}
}
}
}
]
}
}
}
}
} ,
"/answer/api/v1/connector/user/unbinding" : {
"delete" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "unbind external user login" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"PluginConnector"
] ,
"summary" : "unbind external user login" ,
"parameters" : [
{
"description" : "ExternalLoginUnbindingReq" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.ExternalLoginUnbindingReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-11-14 17:04:25 +08:00
"/answer/api/v1/file" : {
"post" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "upload file" ,
"consumes" : [
"multipart/form-data"
] ,
"tags" : [
"Upload"
] ,
"summary" : "upload file" ,
"parameters" : [
{
"enum" : [
"post" ,
"avatar" ,
"branding"
] ,
"type" : "string" ,
"description" : "identify the source of the file upload" ,
"name" : "source" ,
"in" : "formData" ,
"required" : true
} ,
{
"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"
}
}
}
]
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/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" : [ ]
}
] ,
2022-09-30 10:22:41 +08:00
"description" : "get notification list" ,
2022-09-27 17:59:05 +08:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Notification"
] ,
2022-09-30 10:22:41 +08:00
"summary" : "get notification list" ,
2022-09-27 17:59:05 +08:00
"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" ,
2022-09-30 10:22:41 +08:00
"in" : "query" ,
"required" : true
2023-05-24 11:04:03 +08:00
} ,
{
"enum" : [
"all" ,
"posts" ,
"invites" ,
"votes"
] ,
"type" : "string" ,
"description" : "inbox_type" ,
"name" : "inbox_type" ,
"in" : "query" ,
"required" : true
2022-09-27 17:59:05 +08:00
}
] ,
"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" : [ ]
}
] ,
2023-05-06 11:57:47 +08:00
"description" : "list personal answers" ,
2022-09-27 17:59:05 +08:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2023-05-06 11:57:47 +08:00
"Personal"
2022-09-27 17:59:05 +08:00
] ,
2023-05-06 11:57:47 +08:00
"summary" : "list personal answers" ,
2022-09-27 17:59:05 +08:00
"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" ,
2023-05-06 11:57:47 +08:00
"description" : "page_size" ,
"name" : "page_size" ,
2022-09-27 17:59:05 +08:00
"in" : "query" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
"/answer/api/v1/personal/collection/page" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
2023-05-06 11:57:47 +08:00
"description" : "list personal collections" ,
2022-09-27 17:59:05 +08:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Collection"
] ,
2023-05-06 11:57:47 +08:00
"summary" : "list personal collections" ,
2022-09-27 17:59:05 +08:00
"parameters" : [
{
"type" : "string" ,
"default" : "0" ,
"description" : "page" ,
"name" : "page" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"default" : "20" ,
2023-05-06 11:57:47 +08:00
"description" : "page_size" ,
"name" : "page_size" ,
2022-09-27 17:59:05 +08:00
"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" : [
2023-01-04 10:56:32 +08:00
"Question"
2022-09-27 17:59:05 +08:00
] ,
"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"
}
}
}
}
]
}
}
}
]
}
}
}
}
} ,
2023-01-30 15:49:53 +08:00
"/answer/api/v1/post/render" : {
"post" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "render post content" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Upload"
] ,
"summary" : "render post content" ,
"parameters" : [
{
"description" : "PostRenderReq" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.PostRenderReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/answer/api/v1/question" : {
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update question" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2023-01-04 10:56:32 +08:00
"Question"
2022-09-27 17:59:05 +08:00
] ,
"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" : [
2023-01-04 10:56:32 +08:00
"Question"
2022-09-27 17:59:05 +08:00
] ,
"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" : [
2023-01-04 10:56:32 +08:00
"Question"
2022-09-27 17:59:05 +08:00
] ,
"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"
}
}
}
}
} ,
2023-04-04 16:54:28 +08:00
"/answer/api/v1/question/answer" : {
"post" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "add question and answer" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Question"
] ,
"summary" : "add question and answer" ,
"parameters" : [
{
"description" : "question" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.QuestionAddByAnswer"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/answer/api/v1/question/info" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
2023-01-04 10:56:32 +08:00
"description" : "get question details" ,
2022-09-27 17:59:05 +08:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2023-01-04 10:56:32 +08:00
"Question"
2022-09-27 17:59:05 +08:00
] ,
2023-01-04 10:56:32 +08:00
"summary" : "get question details" ,
2022-09-27 17:59:05 +08:00
"parameters" : [
{
"type" : "string" ,
"default" : "1" ,
"description" : "Question TagID" ,
"name" : "id" ,
"in" : "query" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"type" : "string"
}
}
}
}
} ,
2023-05-23 16:07:43 +08:00
"/answer/api/v1/question/invite" : {
2023-05-23 16:00:19 +08:00
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "get question invite user info" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Question"
] ,
"summary" : "get question invite user info" ,
"parameters" : [
{
"type" : "string" ,
"default" : "1" ,
"description" : "Question ID" ,
"name" : "id" ,
"in" : "query" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"type" : "string"
}
}
}
2023-05-23 16:07:43 +08:00
} ,
2023-05-23 16:00:19 +08:00
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "update question invite user" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Question"
] ,
"summary" : "update question invite user" ,
"parameters" : [
{
"description" : "question" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.QuestionUpdateInviteUser"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2023-04-13 11:17:17 +08:00
"/answer/api/v1/question/operation" : {
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "Operation question \\n operation [pin unpin hide show]" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Question"
] ,
"summary" : "Operation question" ,
"parameters" : [
{
"description" : "question" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.OperationQuestionReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/answer/api/v1/question/page" : {
2022-10-14 12:28:11 +08:00
"get" : {
2023-01-04 10:56:32 +08:00
"description" : "get questions by page" ,
2022-09-27 17:59:05 +08:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2023-01-04 10:56:32 +08:00
"Question"
2022-09-27 17:59:05 +08:00
] ,
2023-01-04 10:56:32 +08:00
"summary" : "get questions by page" ,
2022-09-27 17:59:05 +08:00
"parameters" : [
{
2023-01-04 10:56:32 +08:00
"description" : "QuestionPageReq" ,
2022-09-27 17:59:05 +08:00
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2023-01-04 10:56:32 +08:00
"$ref" : "#/definitions/schema.QuestionPageReq"
2022-09-27 17:59:05 +08:00
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-01-04 10:56:32 +08:00
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"allOf" : [
{
"$ref" : "#/definitions/pager.PageModel"
} ,
{
"type" : "object" ,
"properties" : {
"list" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.QuestionPageResp"
}
}
}
}
]
}
}
}
]
2022-09-27 17:59:05 +08:00
}
}
}
}
} ,
2022-12-07 16:51:08 +08:00
"/answer/api/v1/question/reopen" : {
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "reopen question" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2023-01-04 10:56:32 +08:00
"Question"
2022-12-07 16:51:08 +08:00
] ,
"summary" : "reopen question" ,
"parameters" : [
{
"description" : "question" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.ReopenQuestionReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/answer/api/v1/question/similar" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "add question title like" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2023-01-04 10:56:32 +08:00
"Question"
2022-09-27 17:59:05 +08:00
] ,
"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" : [
2023-01-04 10:56:32 +08:00
"Question"
2022-09-27 17:59:05 +08:00
] ,
"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" : [
2023-01-04 10:56:32 +08:00
"Question"
2022-09-27 17:59:05 +08:00
] ,
"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/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" ,
2022-11-23 16:27:35 +08:00
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.GetRevisionResp"
}
}
}
}
]
}
}
}
}
} ,
2022-11-24 11:14:15 +08:00
"/answer/api/v1/revisions/audit" : {
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "revision audit operation:approve or reject" ,
"produces" : [
"application/json"
] ,
"tags" : [
"Revision"
] ,
"summary" : "revision audit" ,
"parameters" : [
{
"description" : "audit" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.RevisionAuditReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-11-24 16:16:39 +08:00
"/answer/api/v1/revisions/edit/check" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
2022-12-01 15:26:20 +08:00
"description" : "check can update revision" ,
2022-11-24 16:16:39 +08:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Revision"
] ,
2022-12-01 15:26:20 +08:00
"summary" : "check can update revision" ,
2022-11-24 16:16:39 +08:00
"parameters" : [
{
"type" : "string" ,
"default" : "string" ,
"description" : "id" ,
"name" : "id" ,
"in" : "query" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-11-23 16:27:35 +08:00
"/answer/api/v1/revisions/unreviewed" : {
"get" : {
2022-11-24 11:14:15 +08:00
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
2022-11-23 16:27:35 +08:00
"description" : "get unreviewed revision list" ,
"produces" : [
"application/json"
] ,
"tags" : [
"Revision"
] ,
"summary" : "get unreviewed revision list" ,
"parameters" : [
{
"type" : "string" ,
"description" : "page id" ,
"name" : "page" ,
"in" : "query" ,
2022-09-27 17:59:05 +08:00
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
2022-12-01 15:26:20 +08:00
"allOf" : [
{
"$ref" : "#/definitions/pager.PageModel"
} ,
{
"type" : "object" ,
"properties" : {
"list" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.GetUnreviewedRevisionResp"
}
}
}
}
]
2022-09-27 17:59:05 +08:00
}
}
}
]
}
}
}
}
} ,
"/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
2022-10-09 18:44:56 +08:00
} ,
{
"enum" : [
"newest" ,
"active" ,
2022-10-17 11:11:23 +08:00
"score" ,
"relevance"
2022-10-09 18:44:56 +08:00
] ,
"type" : "string" ,
"description" : "order" ,
"name" : "order" ,
"in" : "query" ,
"required" : true
2022-09-27 17:59:05 +08:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.SearchListResp"
}
}
}
]
}
}
}
}
} ,
"/answer/api/v1/siteinfo" : {
"get" : {
2022-11-07 12:45:01 +08:00
"description" : "get site info" ,
2022-09-27 17:59:05 +08:00
"produces" : [
"application/json"
] ,
"tags" : [
"site"
] ,
2022-11-07 12:45:01 +08:00
"summary" : "get site info" ,
2022-09-27 17:59:05 +08:00
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
2022-12-09 16:46:33 +08:00
"$ref" : "#/definitions/schema.SiteInfoResp"
2022-09-27 17:59:05 +08:00
}
}
}
]
}
}
}
}
} ,
2022-11-15 17:12:33 +08:00
"/answer/api/v1/siteinfo/legal" : {
"get" : {
"description" : "get site legal info" ,
"produces" : [
"application/json"
] ,
"tags" : [
"site"
] ,
"summary" : "get site legal info" ,
2022-11-16 15:31:24 +08:00
"parameters" : [
{
"enum" : [
"tos" ,
"privacy"
] ,
"type" : "string" ,
"description" : "legal information type" ,
"name" : "info_type" ,
"in" : "query" ,
"required" : true
}
] ,
2022-11-15 17:12:33 +08:00
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
2022-11-16 15:31:24 +08:00
"$ref" : "#/definitions/schema.GetSiteLegalInfoResp"
2022-11-15 17:12:33 +08:00
}
}
}
]
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/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"
}
}
}
} ,
2023-03-03 14:40:30 +08:00
"post" : {
"description" : "add tag" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Tag"
] ,
"summary" : "add tag" ,
"parameters" : [
{
"description" : "tag" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.AddTagReq"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"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" : {
2022-12-01 15:26:20 +08:00
"$ref" : "#/definitions/schema.GetTagSynonymsResp"
2022-09-27 17:59:05 +08:00
}
}
}
]
}
}
}
}
} ,
2023-02-15 12:21:59 +08:00
"/answer/api/v1/tags" : {
"get" : {
"description" : "get tags list" ,
"produces" : [
"application/json"
] ,
"tags" : [
"Tag"
] ,
"summary" : "get tags list" ,
"parameters" : [
{
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"collectionFormat" : "csv" ,
"description" : "string collection" ,
"name" : "tags" ,
"in" : "query"
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-02-15 15:01:58 +08:00
"$ref" : "#/definitions/handler.RespBody"
2023-02-15 12:21:59 +08:00
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/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/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"
}
}
}
}
} ,
2023-01-04 10:56:32 +08:00
"/answer/api/v1/user/email/notification" : {
"put" : {
"description" : "unsubscribe email notification" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"User"
] ,
"summary" : "unsubscribe email notification" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/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" : [ ]
}
] ,
2022-10-28 17:13:49 +08:00
"description" : "get user info, if user no login response http code is 200, but user info is null" ,
2022-09-27 17:59:05 +08:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"User"
] ,
"summary" : "GetUserInfoByUserID" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
2022-10-28 15:46:05 +08:00
"$ref" : "#/definitions/schema.GetUserToSetShowResp"
2022-09-27 17:59:05 +08:00
}
}
}
]
}
}
}
} ,
"put" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
2022-09-30 10:22:41 +08:00
"description" : "UserUpdateInfo update user info" ,
2022-09-27 17:59:05 +08:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"User"
] ,
2022-09-30 10:22:41 +08:00
"summary" : "UserUpdateInfo update user info" ,
2022-09-27 17:59:05 +08:00
"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"
}
}
}
}
2023-05-23 14:54:59 +08:00
} ,
"/answer/api/v1/user/info/search" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "SearchUserListByName" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"User"
] ,
"summary" : "SearchUserListByName" ,
"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"
}
}
}
]
}
}
}
}
2022-09-27 17:59:05 +08:00
} ,
2022-11-11 15:13:23 +08:00
"/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"
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/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" : [
{
2023-05-09 10:54:42 +08:00
"description" : "UserModifyPasswordReq" ,
2022-09-27 17:59:05 +08:00
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2023-05-09 10:54:42 +08:00
"$ref" : "#/definitions/schema.UserModifyPasswordReq"
2022-09-27 17:59:05 +08:00
}
}
] ,
"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"
}
}
}
}
} ,
2022-12-12 16:54:04 +08:00
"/answer/api/v1/user/ranking" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "get user ranking" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"User"
] ,
"summary" : "get user ranking" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.UserRankingResp"
}
}
}
]
}
}
}
}
} ,
2022-12-18 00:14:50 +08:00
"/answer/api/v1/user/register/captcha" : {
"get" : {
"description" : "UserRegisterCaptcha" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"User"
] ,
"summary" : "UserRegisterCaptcha" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.GetUserResp"
}
}
}
]
}
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"/answer/api/v1/user/register/email" : {
"post" : {
"description" : "UserRegisterByEmail" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"User"
] ,
"summary" : "UserRegisterByEmail" ,
"parameters" : [
{
2022-10-14 17:11:40 +08:00
"description" : "UserRegisterReq" ,
2022-09-27 17:59:05 +08:00
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2022-10-14 17:11:40 +08:00
"$ref" : "#/definitions/schema.UserRegisterReq"
2022-09-27 17:59:05 +08:00
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
2022-09-28 14:54:54 +08:00
{
"type" : "object" ,
"properties" : {
"data" : {
"$ref" : "#/definitions/schema.GetUserResp"
}
}
}
]
}
}
}
}
} ,
2022-11-11 15:13:23 +08:00
"/answer/api/v1/vote/down" : {
"post" : {
2022-09-28 14:54:54 +08:00
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
2022-11-11 15:13:23 +08:00
"description" : "add vote" ,
2022-09-28 14:54:54 +08:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2022-11-11 15:13:23 +08:00
"Activity"
] ,
"summary" : "vote down" ,
"parameters" : [
{
"description" : "vote" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/schema.VoteReq"
}
}
2022-09-28 14:54:54 +08:00
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
2022-09-27 17:59:05 +08:00
{
"type" : "object" ,
"properties" : {
"data" : {
2022-11-11 15:13:23 +08:00
"$ref" : "#/definitions/schema.VoteResp"
2022-09-27 17:59:05 +08:00
}
}
}
]
}
}
}
}
} ,
2022-11-11 15:13:23 +08:00
"/answer/api/v1/vote/up" : {
2022-09-27 17:59:05 +08:00
"post" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "add vote" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Activity"
] ,
2022-11-11 15:13:23 +08:00
"summary" : "vote up" ,
2022-09-27 17:59:05 +08:00
"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"
}
}
}
]
}
}
}
}
} ,
2022-12-14 17:09:33 +08:00
"/custom.css" : {
"get" : {
"description" : "get site robots information" ,
"produces" : [
"application/json"
] ,
"tags" : [
"site"
] ,
"summary" : "get site robots information" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"type" : "string"
}
}
}
}
} ,
2022-11-11 15:13:23 +08:00
"/installation/base-info" : {
2022-09-27 17:59:05 +08:00
"post" : {
2022-11-11 15:13:23 +08:00
"description" : "init base info" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"installation"
] ,
"summary" : "init base info" ,
"parameters" : [
2022-09-27 17:59:05 +08:00
{
2022-11-11 15:13:23 +08:00
"description" : "InitBaseInfoReq" ,
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/install.InitBaseInfoReq"
}
2022-09-27 17:59:05 +08:00
}
] ,
2022-11-11 15:13:23 +08:00
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
} ,
"/installation/config-file/check" : {
"post" : {
"description" : "check config file if exist when installation" ,
2022-09-27 17:59:05 +08:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2022-11-11 15:13:23 +08:00
"installation"
2022-09-27 17:59:05 +08:00
] ,
2022-11-11 15:13:23 +08:00
"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" ,
2022-09-27 17:59:05 +08:00
"parameters" : [
{
2022-11-11 15:13:23 +08:00
"description" : "CheckDatabaseReq" ,
2022-09-27 17:59:05 +08:00
"name" : "data" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2022-11-11 15:13:23 +08:00
"$ref" : "#/definitions/install.CheckDatabaseReq"
2022-09-27 17:59:05 +08:00
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"allOf" : [
{
"$ref" : "#/definitions/handler.RespBody"
} ,
{
"type" : "object" ,
"properties" : {
"data" : {
2022-11-11 15:13:23 +08:00
"$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"
}
2022-09-27 17:59:05 +08:00
}
}
}
]
}
}
}
}
} ,
"/personal/question/page" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
2023-05-06 11:57:47 +08:00
"description" : "list personal questions" ,
2022-09-27 17:59:05 +08:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2023-05-06 11:57:47 +08:00
"Personal"
2022-09-27 17:59:05 +08:00
] ,
2023-05-06 11:57:47 +08:00
"summary" : "list personal questions" ,
2022-09-27 17:59:05 +08:00
"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" ,
2023-05-06 11:57:47 +08:00
"description" : "page_size" ,
"name" : "page_size" ,
2022-09-27 17:59:05 +08:00
"in" : "query" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.RespBody"
}
}
}
}
2022-12-07 16:51:08 +08:00
} ,
"/robots.txt" : {
"get" : {
"description" : "get site robots information" ,
"produces" : [
"application/json"
] ,
"tags" : [
"site"
] ,
"summary" : "get site robots information" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"type" : "string"
}
}
}
}
2022-09-27 17:59:05 +08:00
}
} ,
"definitions" : {
2023-05-09 10:54:42 +08:00
"constant.Privilege" : {
"type" : "object" ,
"properties" : {
"key" : {
"type" : "string"
} ,
"label" : {
"type" : "string"
} ,
"value" : {
"type" : "integer"
}
}
} ,
2022-09-27 17:59:05 +08:00
"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"
}
}
} ,
2022-11-11 15:13:23 +08:00
"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
}
}
} ,
2022-09-27 17:59:05 +08:00
"pager.PageModel" : {
"type" : "object" ,
"properties" : {
"count" : {
"type" : "integer"
} ,
"list" : { }
}
} ,
2022-11-23 11:10:15 +08:00
"schema.ActObjectInfo" : {
"type" : "object" ,
"properties" : {
"answer_id" : {
"type" : "string"
} ,
2022-12-01 15:26:20 +08:00
"display_name" : {
"type" : "string"
} ,
2022-12-07 16:51:08 +08:00
"main_tag_slug_name" : {
"type" : "string"
} ,
2022-11-23 11:10:15 +08:00
"object_type" : {
"type" : "string"
} ,
"question_id" : {
"type" : "string"
} ,
"title" : {
"type" : "string"
2022-11-29 14:56:22 +08:00
} ,
"username" : {
"type" : "string"
2022-11-23 11:10:15 +08:00
}
}
} ,
"schema.ActObjectTimeline" : {
"type" : "object" ,
"properties" : {
"activity_id" : {
"type" : "string"
} ,
"activity_type" : {
"type" : "string"
} ,
"cancelled" : {
"type" : "boolean"
} ,
"cancelled_at" : {
"type" : "integer"
} ,
"comment" : {
"type" : "string"
} ,
"created_at" : {
"type" : "integer"
} ,
2022-12-07 16:51:08 +08:00
"id" : {
"type" : "string"
} ,
2022-11-23 11:10:15 +08:00
"object_id" : {
"type" : "string"
} ,
"object_type" : {
"type" : "string"
} ,
"revision_id" : {
"type" : "string"
} ,
"user_display_name" : {
"type" : "string"
} ,
"username" : {
"type" : "string"
}
}
} ,
2022-09-27 17:59:05 +08:00
"schema.ActionRecordResp" : {
"type" : "object" ,
"properties" : {
"captcha_id" : {
"type" : "string"
} ,
"captcha_img" : {
"type" : "string"
} ,
"verify" : {
"type" : "boolean"
}
}
} ,
"schema.AddCommentReq" : {
"type" : "object" ,
"required" : [
"object_id" ,
2023-02-02 16:39:51 +08:00
"original_text"
2022-09-27 17:59:05 +08:00
] ,
"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" ,
2023-02-02 16:39:51 +08:00
"type" : "string" ,
"maxLength" : 600 ,
"minLength" : 2
2022-09-27 17:59:05 +08:00
} ,
"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"
}
}
} ,
2023-03-03 14:40:30 +08:00
"schema.AddTagReq" : {
"type" : "object" ,
"required" : [
"display_name" ,
"original_text" ,
"slug_name"
] ,
"properties" : {
"display_name" : {
"description" : "display_name" ,
"type" : "string" ,
"maxLength" : 35
} ,
"original_text" : {
"description" : "original text" ,
2023-03-03 16:59:34 +08:00
"type" : "string" ,
"maxLength" : 65536
2023-03-03 14:40:30 +08:00
} ,
"slug_name" : {
"description" : "slug_name" ,
"type" : "string" ,
"maxLength" : 35
}
}
} ,
2022-12-09 16:46:33 +08:00
"schema.AddUserReq" : {
"type" : "object" ,
"required" : [
"display_name" ,
"email" ,
"password"
] ,
"properties" : {
"display_name" : {
"type" : "string" ,
"maxLength" : 30
} ,
"email" : {
"type" : "string" ,
"maxLength" : 500
} ,
"password" : {
"type" : "string" ,
"maxLength" : 32 ,
"minLength" : 8
}
}
} ,
2022-12-07 16:51:08 +08:00
"schema.AdminSetAnswerStatusRequest" : {
"type" : "object" ,
"properties" : {
"answer_id" : {
"type" : "string"
} ,
"status" : {
"type" : "string"
}
}
} ,
2022-09-27 17:59:05 +08:00
"schema.AdminSetQuestionStatusRequest" : {
"type" : "object" ,
"properties" : {
"question_id" : {
"type" : "string"
} ,
"status" : {
"type" : "string"
}
}
} ,
2022-12-22 11:04:19 +08:00
"schema.AnswerAcceptedReq" : {
2022-09-27 17:59:05 +08:00
"type" : "object" ,
"properties" : {
2022-12-22 11:04:19 +08:00
"answer_id" : {
2022-09-27 17:59:05 +08:00
"type" : "string"
} ,
"question_id" : {
"type" : "string"
}
}
} ,
2022-12-22 11:04:19 +08:00
"schema.AnswerAddReq" : {
2022-09-27 17:59:05 +08:00
"type" : "object" ,
2023-01-31 15:13:50 +08:00
"required" : [
"content"
] ,
2022-09-27 17:59:05 +08:00
"properties" : {
2022-12-22 11:04:19 +08:00
"content" : {
2023-01-31 15:13:50 +08:00
"type" : "string" ,
"maxLength" : 65535 ,
"minLength" : 6
2022-12-22 11:04:19 +08:00
} ,
2022-09-27 17:59:05 +08:00
"question_id" : {
"type" : "string"
}
}
} ,
"schema.AnswerUpdateReq" : {
"type" : "object" ,
2023-01-31 15:13:50 +08:00
"required" : [
"content"
] ,
2022-09-27 17:59:05 +08:00
"properties" : {
"content" : {
2023-01-31 15:13:50 +08:00
"type" : "string" ,
"maxLength" : 65535 ,
"minLength" : 6
2022-09-27 17:59:05 +08:00
} ,
"edit_summary" : {
"type" : "string"
} ,
"id" : {
"type" : "string"
} ,
"question_id" : {
"type" : "string"
} ,
"title" : {
"type" : "string"
}
}
} ,
2022-10-28 14:53:44 +08:00
"schema.AvatarInfo" : {
"type" : "object" ,
"properties" : {
"custom" : {
"type" : "string" ,
"maxLength" : 200
} ,
"gravatar" : {
"type" : "string" ,
"maxLength" : 200
} ,
"type" : {
"type" : "string" ,
"maxLength" : 100
}
}
} ,
2022-09-27 17:59:05 +08:00
"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"
}
}
} ,
2023-04-11 14:21:34 +08:00
"schema.ConfigField" : {
2023-01-13 12:50:20 +08:00
"type" : "object" ,
"properties" : {
"description" : {
"type" : "string"
} ,
2023-04-11 14:21:34 +08:00
"name" : {
"type" : "string"
} ,
"options" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.ConfigFieldOption"
}
} ,
2023-01-13 12:50:20 +08:00
"required" : {
"type" : "boolean"
} ,
"title" : {
"type" : "string"
} ,
"type" : {
"type" : "string"
} ,
2023-04-11 14:21:34 +08:00
"ui_options" : {
"$ref" : "#/definitions/schema.ConfigFieldUIOptions"
} ,
"value" : { }
}
} ,
"schema.ConfigFieldOption" : {
"type" : "object" ,
"properties" : {
"label" : {
"type" : "string"
2023-01-13 12:50:20 +08:00
} ,
"value" : {
"type" : "string"
}
}
} ,
2023-04-11 14:21:34 +08:00
"schema.ConfigFieldUIOptions" : {
"type" : "object" ,
"properties" : {
2023-05-09 10:54:42 +08:00
"action" : {
"$ref" : "#/definitions/schema.UIOptionAction"
} ,
2023-04-11 14:21:34 +08:00
"input_type" : {
"type" : "string"
} ,
"label" : {
"type" : "string"
} ,
"placeholder" : {
"type" : "string"
} ,
"rows" : {
"type" : "string"
2023-05-09 10:54:42 +08:00
} ,
"text" : {
"type" : "string"
} ,
"variant" : {
"type" : "string"
2023-04-11 14:21:34 +08:00
}
}
} ,
2023-01-13 12:50:20 +08:00
"schema.ConnectorInfoResp" : {
"type" : "object" ,
"properties" : {
"icon" : {
"type" : "string"
} ,
"link" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
}
}
} ,
"schema.ConnectorUserInfoResp" : {
"type" : "object" ,
"properties" : {
"binding" : {
"type" : "boolean"
} ,
"external_id" : {
"type" : "string"
} ,
"icon" : {
"type" : "string"
} ,
"link" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
}
}
} ,
2023-01-10 12:20:14 +08:00
"schema.ExternalLoginBindingUserSendEmailReq" : {
"type" : "object" ,
"required" : [
"binding_key" ,
"email"
] ,
"properties" : {
"binding_key" : {
"type" : "string" ,
"maxLength" : 100
} ,
"email" : {
"type" : "string" ,
"maxLength" : 512
} ,
"must" : {
"description" : "If must is true, whatever email if exists, try to bind user.\nIf must is false, when email exist, will only be prompted with a warning." ,
"type" : "boolean"
}
}
} ,
"schema.ExternalLoginBindingUserSendEmailResp" : {
"type" : "object" ,
"properties" : {
2023-01-10 14:24:32 +08:00
"access_token" : {
"type" : "string"
} ,
2023-01-10 12:20:14 +08:00
"email_exist_and_must_be_confirmed" : {
"type" : "boolean"
}
}
} ,
2023-01-13 12:50:20 +08:00
"schema.ExternalLoginUnbindingReq" : {
"type" : "object" ,
"required" : [
"external_id"
] ,
"properties" : {
"external_id" : {
"type" : "string" ,
"maxLength" : 128
}
}
} ,
2022-09-27 17:59:05 +08:00
"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"
2023-03-13 11:28:35 +08:00
} ,
"url_title" : {
"description" : "url title" ,
"type" : "string"
2022-09-27 17:59:05 +08:00
}
}
} ,
"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"
} ,
2022-09-29 15:27:56 +08:00
"reply_user_status" : {
"description" : "reply user status" ,
"type" : "string"
} ,
2022-09-27 17:59:05 +08:00
"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"
} ,
2022-09-29 15:27:56 +08:00
"user_status" : {
"description" : "user status" ,
"type" : "string"
} ,
2022-09-27 17:59:05 +08:00
"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"
} ,
2022-11-16 15:28:23 +08:00
"recommend" : {
"type" : "boolean"
} ,
"reserved" : {
"type" : "boolean"
} ,
2022-09-27 17:59:05 +08:00
"slug_name" : {
"description" : "slug name" ,
"type" : "string"
} ,
"tag_id" : {
"description" : "tag id" ,
"type" : "string"
}
}
} ,
2022-11-23 11:10:15 +08:00
"schema.GetObjectTimelineResp" : {
"type" : "object" ,
"properties" : {
"object_info" : {
"$ref" : "#/definitions/schema.ActObjectInfo"
} ,
"timeline" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.ActObjectTimeline"
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"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"
} ,
"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" : {
"info" : {
"$ref" : "#/definitions/schema.GetOtherUserInfoByUsernameResp"
}
}
} ,
2023-01-13 12:50:20 +08:00
"schema.GetPluginConfigResp" : {
"type" : "object" ,
"properties" : {
"config_fields" : {
"type" : "array" ,
"items" : {
2023-04-11 14:21:34 +08:00
"$ref" : "#/definitions/schema.ConfigField"
2023-01-13 12:50:20 +08:00
}
} ,
"description" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
"slug_name" : {
"type" : "string"
} ,
"version" : {
"type" : "string"
}
}
} ,
"schema.GetPluginListResp" : {
"type" : "object" ,
"properties" : {
"description" : {
"type" : "string"
} ,
"enabled" : {
"type" : "boolean"
} ,
"have_config" : {
"type" : "boolean"
} ,
2023-04-11 14:21:34 +08:00
"link" : {
"type" : "string"
} ,
2023-01-13 12:50:20 +08:00
"name" : {
"type" : "string"
} ,
"slug_name" : {
"type" : "string"
} ,
"version" : {
"type" : "string"
}
}
} ,
2023-05-09 10:54:42 +08:00
"schema.GetPrivilegesConfigResp" : {
"type" : "object" ,
"properties" : {
"options" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.PrivilegeOption"
}
} ,
"selected_level" : {
"type" : "integer"
}
}
} ,
2022-09-27 17:59:05 +08:00
"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"
2023-03-13 11:28:35 +08:00
} ,
"url_title" : {
"description" : "url title" ,
"type" : "string"
2022-09-27 17:59:05 +08:00
}
}
} ,
"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"
}
}
} ,
2022-11-29 15:10:57 +08:00
"schema.GetRoleResp" : {
"type" : "object" ,
"properties" : {
"description" : {
"type" : "string"
} ,
"id" : {
"type" : "integer"
} ,
"name" : {
"type" : "string"
}
}
} ,
2022-10-21 10:26:32 +08:00
"schema.GetSMTPConfigResp" : {
"type" : "object" ,
"properties" : {
"encryption" : {
2022-10-21 17:04:41 +08:00
"description" : "\"\" SSL" ,
2022-10-21 10:26:32 +08:00
"type" : "string"
} ,
2022-10-21 17:04:41 +08:00
"from_email" : {
2022-10-21 10:26:32 +08:00
"type" : "string"
} ,
"from_name" : {
"type" : "string"
} ,
2022-10-21 17:04:41 +08:00
"smtp_authentication" : {
"type" : "boolean"
} ,
2022-10-21 10:26:32 +08:00
"smtp_host" : {
"type" : "string"
} ,
"smtp_password" : {
"type" : "string"
} ,
"smtp_port" : {
"type" : "integer"
} ,
"smtp_username" : {
"type" : "string"
}
}
} ,
2022-11-16 15:31:24 +08:00
"schema.GetSiteLegalInfoResp" : {
"type" : "object" ,
"properties" : {
"privacy_policy_original_text" : {
"type" : "string"
} ,
"privacy_policy_parsed_text" : {
"type" : "string"
} ,
"terms_of_service_original_text" : {
"type" : "string"
} ,
"terms_of_service_parsed_text" : {
"type" : "string"
}
}
} ,
2022-09-27 17:59:05 +08:00
"schema.GetTagPageResp" : {
"type" : "object" ,
"properties" : {
"created_at" : {
"description" : "created time" ,
"type" : "integer"
} ,
2023-03-16 10:40:35 +08:00
"description" : {
"description" : "description" ,
"type" : "string"
} ,
2022-09-27 17:59:05 +08:00
"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"
} ,
2022-11-16 15:28:23 +08:00
"recommend" : {
"type" : "boolean"
} ,
"reserved" : {
"type" : "boolean"
} ,
2022-09-27 17:59:05 +08:00
"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"
} ,
2022-12-07 17:29:22 +08:00
"description" : {
"description" : "description text" ,
"type" : "string"
} ,
2022-09-27 17:59:05 +08:00
"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"
} ,
2022-11-16 15:28:23 +08:00
"recommend" : {
"type" : "boolean"
} ,
"reserved" : {
"type" : "boolean"
} ,
2022-09-27 17:59:05 +08:00
"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" : {
2022-12-01 15:26:20 +08:00
"member_actions" : {
"description" : "MemberActions" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.PermissionMemberAction"
}
2022-09-27 17:59:05 +08:00
} ,
2022-12-01 15:26:20 +08:00
"synonyms" : {
"description" : "synonyms" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.TagSynonym"
}
}
}
} ,
"schema.GetUnreviewedRevisionResp" : {
"type" : "object" ,
"properties" : {
"info" : {
"$ref" : "#/definitions/schema.UnreviewedRevisionInfoInfo"
2022-09-27 17:59:05 +08:00
} ,
2022-12-01 15:26:20 +08:00
"type" : {
2022-09-27 17:59:05 +08:00
"type" : "string"
} ,
2022-12-01 15:26:20 +08:00
"unreviewed_info" : {
"$ref" : "#/definitions/schema.GetRevisionResp"
2022-09-27 17:59:05 +08:00
}
}
} ,
"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"
} ,
2022-11-29 15:10:57 +08:00
"role_id" : {
"description" : "role id" ,
"type" : "integer"
} ,
"role_name" : {
"description" : "role name" ,
"type" : "string"
} ,
2022-09-27 17:59:05 +08:00
"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" : {
2022-10-28 15:46:05 +08:00
"description" : "email" ,
"type" : "string"
} ,
"follow_count" : {
"description" : "follow count" ,
"type" : "integer"
} ,
2023-04-11 14:21:34 +08:00
"have_password" : {
"description" : "user have password" ,
"type" : "boolean"
} ,
2022-10-28 15:46:05 +08:00
"id" : {
"description" : "user id" ,
"type" : "string"
} ,
"ip_info" : {
"description" : "ip info" ,
"type" : "string"
} ,
2022-11-11 15:13:23 +08:00
"language" : {
"description" : "language" ,
"type" : "string"
} ,
2022-10-28 15:46:05 +08:00
"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"
} ,
2023-03-03 16:59:34 +08:00
"role_id" : {
"description" : "role id" ,
"type" : "integer"
} ,
2022-10-28 15:46:05 +08:00
"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" : {
2022-09-27 17:59:05 +08:00
"description" : "email" ,
"type" : "string"
} ,
"follow_count" : {
"description" : "follow count" ,
"type" : "integer"
} ,
2023-04-11 14:21:34 +08:00
"have_password" : {
"type" : "boolean"
} ,
2022-09-27 17:59:05 +08:00
"id" : {
"description" : "user id" ,
"type" : "string"
} ,
"ip_info" : {
"description" : "ip info" ,
"type" : "string"
} ,
2022-11-11 15:13:23 +08:00
"language" : {
"description" : "language" ,
"type" : "string"
} ,
2022-09-27 17:59:05 +08:00
"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"
} ,
2023-03-03 16:59:34 +08:00
"role_id" : {
"description" : "role id" ,
"type" : "integer"
} ,
2022-09-27 17:59:05 +08:00
"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"
} ,
2023-03-13 11:28:35 +08:00
"url_title" : {
"description" : "url title" ,
"type" : "string"
} ,
2022-09-27 17:59:05 +08:00
"vote_type" : {
"description" : "vote type" ,
"type" : "string"
}
}
} ,
2023-05-09 10:54:42 +08:00
"schema.LoadingAction" : {
"type" : "object" ,
"properties" : {
"state" : {
"type" : "string"
} ,
"text" : {
"type" : "string"
}
}
} ,
2022-09-27 17:59:05 +08:00
"schema.NotificationClearIDRequest" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string"
}
}
} ,
"schema.NotificationClearRequest" : {
"type" : "object" ,
"properties" : {
"type" : {
"description" : "inbox achievement" ,
"type" : "string"
}
}
} ,
2023-05-09 10:54:42 +08:00
"schema.OnCompleteAction" : {
"type" : "object" ,
"properties" : {
"refresh_form_config" : {
"type" : "boolean"
} ,
"toast_return_message" : {
"type" : "boolean"
}
}
} ,
2023-04-13 11:17:17 +08:00
"schema.OperationQuestionReq" : {
"type" : "object" ,
"required" : [
"id"
] ,
"properties" : {
"id" : {
"type" : "string"
} ,
"operation" : {
"description" : "operation [pin unpin hide show]" ,
"type" : "string"
}
}
} ,
2022-09-27 17:59:05 +08:00
"schema.PermissionMemberAction" : {
"type" : "object" ,
"properties" : {
"action" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
"type" : {
"type" : "string"
}
}
} ,
2023-01-30 15:49:53 +08:00
"schema.PostRenderReq" : {
"type" : "object" ,
"properties" : {
"content" : {
"type" : "string"
}
}
} ,
2023-05-09 10:54:42 +08:00
"schema.PrivilegeOption" : {
"type" : "object" ,
"properties" : {
"level" : {
"type" : "integer"
} ,
"level_desc" : {
"type" : "string"
} ,
"privileges" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/constant.Privilege"
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"schema.QuestionAdd" : {
"type" : "object" ,
"required" : [
"content" ,
"tags" ,
"title"
] ,
"properties" : {
"content" : {
"description" : "content" ,
"type" : "string" ,
"maxLength" : 65535 ,
"minLength" : 6
} ,
"tags" : {
"description" : "tags" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.TagItem"
}
} ,
"title" : {
"description" : "question title" ,
"type" : "string" ,
2022-09-30 10:22:41 +08:00
"maxLength" : 150 ,
2022-09-27 17:59:05 +08:00
"minLength" : 6
}
}
} ,
2023-04-04 16:54:28 +08:00
"schema.QuestionAddByAnswer" : {
"type" : "object" ,
"required" : [
"answer_content" ,
"content" ,
"tags" ,
"title"
] ,
"properties" : {
"answer_content" : {
"type" : "string" ,
"maxLength" : 65535 ,
"minLength" : 6
} ,
"content" : {
"description" : "content" ,
"type" : "string" ,
"maxLength" : 65535 ,
"minLength" : 6
} ,
2023-05-23 12:15:52 +08:00
"mention_username_list" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2023-04-04 16:54:28 +08:00
"tags" : {
"description" : "tags" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.TagItem"
}
} ,
"title" : {
"description" : "question title" ,
"type" : "string" ,
"maxLength" : 150 ,
"minLength" : 6
}
}
} ,
2023-01-04 10:56:32 +08:00
"schema.QuestionPageReq" : {
2022-09-27 17:59:05 +08:00
"type" : "object" ,
"properties" : {
2023-05-09 10:54:42 +08:00
"inDays" : {
"type" : "integer" ,
"minimum" : 1
} ,
2023-01-04 10:56:32 +08:00
"orderCond" : {
"type" : "string" ,
"enum" : [
"newest" ,
"active" ,
"frequent" ,
"score" ,
"unanswered"
]
2022-09-27 17:59:05 +08:00
} ,
"page" : {
2023-01-04 10:56:32 +08:00
"type" : "integer" ,
"minimum" : 1
} ,
"pageSize" : {
"type" : "integer" ,
"minimum" : 1
} ,
"tag" : {
"type" : "string" ,
"maxLength" : 100
} ,
"username" : {
"type" : "string" ,
"maxLength" : 100
}
}
} ,
"schema.QuestionPageResp" : {
"type" : "object" ,
"properties" : {
"accepted_answer_id" : {
"description" : "answer information" ,
"type" : "string"
} ,
"answer_count" : {
2022-09-27 17:59:05 +08:00
"type" : "integer"
} ,
2023-01-04 10:56:32 +08:00
"collection_count" : {
2022-09-27 17:59:05 +08:00
"type" : "integer"
} ,
2023-01-30 15:49:53 +08:00
"created_at" : {
"type" : "integer"
} ,
2023-01-04 10:56:32 +08:00
"description" : {
"type" : "string"
} ,
"follow_count" : {
"type" : "integer"
} ,
"id" : {
"type" : "string"
} ,
"last_answer_id" : {
"type" : "string"
} ,
"operated_at" : {
"description" : "operator information" ,
"type" : "integer"
} ,
"operation_type" : {
"type" : "string"
} ,
"operator" : {
"$ref" : "#/definitions/schema.QuestionPageRespOperator"
} ,
2023-04-13 15:46:36 +08:00
"pin" : {
"description" : "1: unpin, 2: pin" ,
"type" : "integer"
} ,
"show" : {
"description" : "0: show, 1: hide" ,
"type" : "integer"
} ,
2023-01-04 10:56:32 +08:00
"status" : {
"type" : "integer"
} ,
"tags" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.TagResp"
}
} ,
"title" : {
2022-10-27 10:41:57 +08:00
"type" : "string"
2022-09-27 17:59:05 +08:00
} ,
2023-01-04 10:56:32 +08:00
"unique_view_count" : {
"type" : "integer"
} ,
"url_title" : {
"type" : "string"
} ,
"view_count" : {
"description" : "question statistical information" ,
"type" : "integer"
} ,
"vote_count" : {
"type" : "integer"
}
}
} ,
"schema.QuestionPageRespOperator" : {
"type" : "object" ,
"properties" : {
"display_name" : {
"type" : "string"
} ,
"id" : {
"type" : "string"
} ,
"rank" : {
"type" : "integer"
} ,
2022-09-27 17:59:05 +08:00
"username" : {
"type" : "string"
}
}
} ,
"schema.QuestionUpdate" : {
"type" : "object" ,
"required" : [
"content" ,
"id" ,
"tags" ,
"title"
] ,
"properties" : {
"content" : {
"description" : "content" ,
"type" : "string" ,
"maxLength" : 65535 ,
"minLength" : 6
} ,
"edit_summary" : {
"description" : "edit summary" ,
"type" : "string"
} ,
"id" : {
"description" : "question id" ,
"type" : "string"
} ,
2023-05-23 12:15:52 +08:00
"invite_user" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2022-09-27 17:59:05 +08:00
"tags" : {
"description" : "tags" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.TagItem"
}
} ,
"title" : {
"description" : "question title" ,
"type" : "string" ,
2022-09-30 10:22:41 +08:00
"maxLength" : 150 ,
2022-09-27 17:59:05 +08:00
"minLength" : 6
}
}
} ,
2023-05-23 16:00:19 +08:00
"schema.QuestionUpdateInviteUser" : {
"type" : "object" ,
"required" : [
"id"
] ,
"properties" : {
"id" : {
"type" : "string"
} ,
"invite_user" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
}
} ,
2022-09-27 17:59:05 +08:00
"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"
}
}
} ,
2022-12-07 16:51:08 +08:00
"schema.ReopenQuestionReq" : {
"type" : "object" ,
"properties" : {
"question_id" : {
"type" : "string"
}
}
} ,
2022-09-27 17:59:05 +08:00
"schema.ReportHandleReq" : {
"type" : "object" ,
"required" : [
2022-10-14 17:11:40 +08:00
"flagged_type" ,
2022-09-27 17:59:05 +08:00
"id"
] ,
"properties" : {
2022-10-14 17:11:40 +08:00
"flagged_content" : {
2022-09-27 17:59:05 +08:00
"type" : "string"
} ,
2022-10-14 17:11:40 +08:00
"flagged_type" : {
2022-09-27 17:59:05 +08:00
"type" : "integer"
} ,
"id" : {
"type" : "string"
}
}
} ,
2022-11-24 11:14:15 +08:00
"schema.RevisionAuditReq" : {
"type" : "object" ,
"required" : [
"id" ,
"operation"
] ,
"properties" : {
"id" : {
"description" : "object id" ,
"type" : "string"
} ,
"operation" : {
"description" : "approve or reject" ,
"type" : "string"
}
}
} ,
2022-09-27 17:59:05 +08:00
"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"
} ,
2022-11-17 14:14:02 +08:00
"question_id" : {
"type" : "string"
} ,
2022-10-09 18:44:56 +08:00
"status" : {
"description" : "Status" ,
"type" : "string"
} ,
2022-09-27 17:59:05 +08:00
"tags" : {
"description" : "tags" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.TagResp"
}
} ,
"title" : {
"type" : "string"
} ,
"user_info" : {
"description" : "user info" ,
2022-12-08 11:15:45 +08:00
"$ref" : "#/definitions/schema.UserBasicInfo"
2022-09-27 17:59:05 +08:00
} ,
"vote_count" : {
"type" : "integer"
}
}
} ,
"schema.SearchResp" : {
"type" : "object" ,
"properties" : {
"object" : {
"description" : "this object" ,
2022-12-08 11:15:45 +08:00
"$ref" : "#/definitions/schema.SearchObject"
2022-09-27 17:59:05 +08:00
} ,
"object_type" : {
"description" : "object_type" ,
"type" : "string"
}
}
} ,
2022-11-14 17:04:25 +08:00
"schema.SiteBrandingReq" : {
"type" : "object" ,
"properties" : {
"favicon" : {
"type" : "string" ,
"maxLength" : 512
} ,
"logo" : {
"type" : "string" ,
"maxLength" : 512
} ,
"mobile_logo" : {
"type" : "string" ,
"maxLength" : 512
} ,
"square_icon" : {
"type" : "string" ,
"maxLength" : 512
}
}
} ,
"schema.SiteBrandingResp" : {
"type" : "object" ,
"properties" : {
"favicon" : {
"type" : "string" ,
"maxLength" : 512
} ,
"logo" : {
"type" : "string" ,
"maxLength" : 512
} ,
"mobile_logo" : {
"type" : "string" ,
"maxLength" : 512
} ,
"square_icon" : {
"type" : "string" ,
"maxLength" : 512
}
}
} ,
2022-12-09 16:46:33 +08:00
"schema.SiteCustomCssHTMLReq" : {
"type" : "object" ,
"properties" : {
"custom_css" : {
"type" : "string" ,
"maxLength" : 65536
} ,
"custom_footer" : {
"type" : "string" ,
"maxLength" : 65536
} ,
"custom_head" : {
"type" : "string" ,
"maxLength" : 65536
} ,
"custom_header" : {
"type" : "string" ,
"maxLength" : 65536
2023-05-09 10:54:42 +08:00
} ,
"custom_sidebar" : {
"type" : "string" ,
"maxLength" : 65536
2022-12-09 16:46:33 +08:00
}
}
} ,
"schema.SiteCustomCssHTMLResp" : {
"type" : "object" ,
"properties" : {
"custom_css" : {
"type" : "string" ,
"maxLength" : 65536
} ,
"custom_footer" : {
"type" : "string" ,
"maxLength" : 65536
} ,
"custom_head" : {
"type" : "string" ,
"maxLength" : 65536
} ,
"custom_header" : {
"type" : "string" ,
"maxLength" : 65536
2023-05-09 10:54:42 +08:00
} ,
"custom_sidebar" : {
"type" : "string" ,
"maxLength" : 65536
2022-12-09 16:46:33 +08:00
}
}
} ,
2022-09-27 17:59:05 +08:00
"schema.SiteGeneralReq" : {
"type" : "object" ,
"required" : [
2022-11-11 11:53:44 +08:00
"contact_email" ,
2022-09-27 17:59:05 +08:00
"name" ,
2022-11-11 11:53:44 +08:00
"site_url"
2022-09-27 17:59:05 +08:00
] ,
"properties" : {
2022-11-11 11:53:44 +08:00
"contact_email" : {
"type" : "string" ,
"maxLength" : 512
} ,
2022-09-27 17:59:05 +08:00
"description" : {
"type" : "string" ,
"maxLength" : 2000
} ,
"name" : {
"type" : "string" ,
"maxLength" : 128
} ,
"short_description" : {
"type" : "string" ,
"maxLength" : 255
2022-11-11 11:53:44 +08:00
} ,
"site_url" : {
"type" : "string" ,
"maxLength" : 512
2022-09-27 17:59:05 +08:00
}
}
} ,
"schema.SiteGeneralResp" : {
"type" : "object" ,
"required" : [
2022-11-11 11:53:44 +08:00
"contact_email" ,
2022-09-27 17:59:05 +08:00
"name" ,
2022-11-11 11:53:44 +08:00
"site_url"
2022-09-27 17:59:05 +08:00
] ,
"properties" : {
2022-11-11 11:53:44 +08:00
"contact_email" : {
"type" : "string" ,
"maxLength" : 512
} ,
2022-09-27 17:59:05 +08:00
"description" : {
"type" : "string" ,
"maxLength" : 2000
} ,
"name" : {
"type" : "string" ,
"maxLength" : 128
} ,
"short_description" : {
"type" : "string" ,
"maxLength" : 255
2022-11-11 11:53:44 +08:00
} ,
"site_url" : {
"type" : "string" ,
"maxLength" : 512
2022-09-27 17:59:05 +08:00
}
}
} ,
2022-12-09 16:46:33 +08:00
"schema.SiteInfoResp" : {
"type" : "object" ,
"properties" : {
"branding" : {
"$ref" : "#/definitions/schema.SiteBrandingResp"
} ,
2022-12-12 16:54:04 +08:00
"custom_css_html" : {
"$ref" : "#/definitions/schema.SiteCustomCssHTMLResp"
} ,
2022-12-09 16:46:33 +08:00
"general" : {
"$ref" : "#/definitions/schema.SiteGeneralResp"
} ,
"interface" : {
"$ref" : "#/definitions/schema.SiteInterfaceResp"
} ,
"login" : {
"$ref" : "#/definitions/schema.SiteLoginResp"
} ,
2023-03-24 11:49:23 +08:00
"revision" : {
"type" : "string"
} ,
2022-12-21 15:26:09 +08:00
"site_seo" : {
2022-12-14 12:29:08 +08:00
"$ref" : "#/definitions/schema.SiteSeoReq"
} ,
2023-05-09 10:54:42 +08:00
"site_users" : {
"$ref" : "#/definitions/schema.SiteUsersResp"
} ,
2022-12-09 16:46:33 +08:00
"theme" : {
"$ref" : "#/definitions/schema.SiteThemeResp"
2023-03-03 14:40:30 +08:00
} ,
"version" : {
"type" : "string"
2022-12-09 16:46:33 +08:00
}
}
} ,
2022-09-27 17:59:05 +08:00
"schema.SiteInterfaceReq" : {
"type" : "object" ,
"required" : [
"language" ,
2022-11-02 16:01:17 +08:00
"time_zone"
2022-09-27 17:59:05 +08:00
] ,
"properties" : {
"language" : {
"type" : "string" ,
"maxLength" : 128
} ,
2022-11-02 16:01:17 +08:00
"time_zone" : {
"type" : "string" ,
"maxLength" : 128
2022-09-27 17:59:05 +08:00
}
}
} ,
"schema.SiteInterfaceResp" : {
"type" : "object" ,
"required" : [
"language" ,
2022-11-02 16:01:17 +08:00
"time_zone"
2022-09-27 17:59:05 +08:00
] ,
"properties" : {
"language" : {
"type" : "string" ,
"maxLength" : 128
} ,
2022-11-02 16:01:17 +08:00
"time_zone" : {
"type" : "string" ,
"maxLength" : 128
2022-09-27 17:59:05 +08:00
}
}
} ,
2022-11-14 17:04:25 +08:00
"schema.SiteLegalReq" : {
"type" : "object" ,
"properties" : {
2022-11-15 17:12:33 +08:00
"privacy_policy_original_text" : {
"type" : "string"
} ,
"privacy_policy_parsed_text" : {
"type" : "string"
} ,
"terms_of_service_original_text" : {
2022-11-14 17:04:25 +08:00
"type" : "string"
} ,
2022-11-15 17:12:33 +08:00
"terms_of_service_parsed_text" : {
2022-11-14 17:04:25 +08:00
"type" : "string"
}
}
} ,
"schema.SiteLegalResp" : {
"type" : "object" ,
"properties" : {
2022-11-15 17:12:33 +08:00
"privacy_policy_original_text" : {
"type" : "string"
} ,
"privacy_policy_parsed_text" : {
"type" : "string"
} ,
"terms_of_service_original_text" : {
2022-11-14 17:04:25 +08:00
"type" : "string"
} ,
2022-11-15 17:12:33 +08:00
"terms_of_service_parsed_text" : {
2022-11-14 17:04:25 +08:00
"type" : "string"
}
}
} ,
2022-12-09 16:46:33 +08:00
"schema.SiteLoginReq" : {
"type" : "object" ,
"properties" : {
2023-05-09 10:54:42 +08:00
"allow_email_domains" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"allow_email_registrations" : {
"type" : "boolean"
} ,
2022-12-09 16:46:33 +08:00
"allow_new_registrations" : {
"type" : "boolean"
} ,
"login_required" : {
"type" : "boolean"
}
}
} ,
"schema.SiteLoginResp" : {
"type" : "object" ,
"properties" : {
2023-05-09 10:54:42 +08:00
"allow_email_domains" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"allow_email_registrations" : {
"type" : "boolean"
} ,
2022-12-09 16:46:33 +08:00
"allow_new_registrations" : {
"type" : "boolean"
} ,
"login_required" : {
"type" : "boolean"
}
}
} ,
2022-12-07 16:51:08 +08:00
"schema.SiteSeoReq" : {
"type" : "object" ,
"required" : [
2022-12-13 16:55:23 +08:00
"permalink" ,
2022-12-07 16:51:08 +08:00
"robots"
] ,
"properties" : {
2022-12-13 16:55:23 +08:00
"permalink" : {
"type" : "integer" ,
2023-03-13 11:31:29 +08:00
"maximum" : 4 ,
2022-12-13 16:55:23 +08:00
"minimum" : 0
} ,
2022-12-07 16:51:08 +08:00
"robots" : {
"type" : "string"
}
}
} ,
"schema.SiteSeoResp" : {
"type" : "object" ,
"required" : [
2022-12-13 16:55:23 +08:00
"permalink" ,
2022-12-07 16:51:08 +08:00
"robots"
] ,
"properties" : {
2022-12-13 16:55:23 +08:00
"permalink" : {
"type" : "integer" ,
2023-03-13 11:31:29 +08:00
"maximum" : 4 ,
2022-12-13 16:55:23 +08:00
"minimum" : 0
} ,
2022-12-07 16:51:08 +08:00
"robots" : {
"type" : "string"
}
}
} ,
2022-12-09 16:46:33 +08:00
"schema.SiteThemeReq" : {
"type" : "object" ,
"required" : [
"theme"
] ,
"properties" : {
"theme" : {
"type" : "string" ,
"maxLength" : 255
} ,
"theme_config" : {
"type" : "object" ,
"additionalProperties" : true
}
}
} ,
"schema.SiteThemeResp" : {
"type" : "object" ,
"properties" : {
"theme" : {
2022-12-14 17:34:49 +08:00
"type" : "string"
2022-12-09 16:46:33 +08:00
} ,
"theme_config" : {
"type" : "object" ,
"additionalProperties" : true
2022-12-14 17:34:49 +08:00
} ,
"theme_options" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.ThemeOption"
}
2022-12-09 16:46:33 +08:00
}
}
} ,
2023-05-09 10:54:42 +08:00
"schema.SiteUsersReq" : {
"type" : "object" ,
"required" : [
"default_avatar"
] ,
"properties" : {
"allow_update_avatar" : {
"type" : "boolean"
} ,
"allow_update_bio" : {
"type" : "boolean"
} ,
"allow_update_display_name" : {
"type" : "boolean"
} ,
"allow_update_location" : {
"type" : "boolean"
} ,
"allow_update_username" : {
"type" : "boolean"
} ,
"allow_update_website" : {
"type" : "boolean"
} ,
"default_avatar" : {
"type" : "string" ,
"enum" : [
"system" ,
"gravatar"
]
2023-05-24 11:02:16 +08:00
} ,
"gravatar_base_url" : {
"type" : "string"
2023-05-09 10:54:42 +08:00
}
}
} ,
"schema.SiteUsersResp" : {
"type" : "object" ,
"required" : [
"default_avatar"
] ,
"properties" : {
"allow_update_avatar" : {
"type" : "boolean"
} ,
"allow_update_bio" : {
"type" : "boolean"
} ,
"allow_update_display_name" : {
"type" : "boolean"
} ,
"allow_update_location" : {
"type" : "boolean"
} ,
"allow_update_username" : {
"type" : "boolean"
} ,
"allow_update_website" : {
"type" : "boolean"
} ,
"default_avatar" : {
"type" : "string" ,
"enum" : [
"system" ,
"gravatar"
]
2023-05-24 11:02:16 +08:00
} ,
"gravatar_base_url" : {
"type" : "string"
2023-05-09 10:54:42 +08:00
}
}
} ,
2022-11-14 17:04:25 +08:00
"schema.SiteWriteReq" : {
"type" : "object" ,
"properties" : {
2022-11-15 11:53:46 +08:00
"recommend_tags" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2022-11-14 17:04:25 +08:00
"required_tag" : {
"type" : "boolean"
2022-11-15 11:53:46 +08:00
} ,
"reserved_tags" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
2022-11-14 17:04:25 +08:00
}
}
} ,
"schema.SiteWriteResp" : {
"type" : "object" ,
"properties" : {
2022-11-15 11:53:46 +08:00
"recommend_tags" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2022-11-14 17:04:25 +08:00
"required_tag" : {
"type" : "boolean"
2022-11-15 11:53:46 +08:00
} ,
"reserved_tags" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
2022-11-14 17:04:25 +08:00
}
}
} ,
2022-09-27 17:59:05 +08:00
"schema.TagItem" : {
"type" : "object" ,
"properties" : {
"display_name" : {
"description" : "display_name" ,
"type" : "string" ,
2022-09-30 10:22:41 +08:00
"maxLength" : 35
2022-09-27 17:59:05 +08:00
} ,
"original_text" : {
"description" : "original text" ,
"type" : "string"
} ,
"slug_name" : {
"description" : "slug_name" ,
"type" : "string" ,
2022-09-30 10:22:41 +08:00
"maxLength" : 35
2022-09-27 17:59:05 +08:00
}
}
} ,
"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"
} ,
2022-11-15 10:54:30 +08:00
"recommend" : {
"type" : "boolean"
} ,
2022-11-16 15:28:23 +08:00
"reserved" : {
"type" : "boolean"
} ,
2022-09-27 17:59:05 +08:00
"slug_name" : {
"type" : "string"
}
}
} ,
2022-12-01 15:26:20 +08:00
"schema.TagSynonym" : {
"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"
}
}
} ,
2022-12-14 17:34:49 +08:00
"schema.ThemeOption" : {
"type" : "object" ,
"properties" : {
"label" : {
"type" : "string"
} ,
"value" : {
"type" : "string"
}
}
} ,
2023-05-09 10:54:42 +08:00
"schema.UIOptionAction" : {
"type" : "object" ,
"properties" : {
"loading" : {
"$ref" : "#/definitions/schema.LoadingAction"
} ,
"method" : {
"type" : "string"
} ,
"on_complete" : {
"$ref" : "#/definitions/schema.OnCompleteAction"
} ,
"url" : {
"type" : "string"
}
}
} ,
2022-12-01 15:26:20 +08:00
"schema.UnreviewedRevisionInfoInfo" : {
"type" : "object" ,
"properties" : {
"content" : {
"type" : "string"
} ,
"html" : {
"type" : "string"
} ,
"object_id" : {
"type" : "string"
} ,
"tags" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.TagResp"
}
} ,
"title" : {
"type" : "string"
}
}
} ,
2022-09-27 17:59:05 +08:00
"schema.UpdateCommentReq" : {
"type" : "object" ,
"required" : [
2023-02-02 16:39:51 +08:00
"comment_id" ,
"original_text"
2022-09-27 17:59:05 +08:00
] ,
"properties" : {
"comment_id" : {
"description" : "comment id" ,
"type" : "string"
} ,
"original_text" : {
"description" : "original comment content" ,
2023-02-02 16:39:51 +08:00
"type" : "string" ,
"maxLength" : 600 ,
"minLength" : 2
2022-09-27 17:59:05 +08:00
}
}
} ,
"schema.UpdateFollowTagsReq" : {
"type" : "object" ,
"properties" : {
"slug_name_list" : {
"description" : "tag slug name list" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
}
}
} ,
"schema.UpdateInfoRequest" : {
"type" : "object" ,
"properties" : {
"avatar" : {
"description" : "avatar" ,
2022-12-08 11:15:45 +08:00
"$ref" : "#/definitions/schema.AvatarInfo"
2022-09-27 17:59:05 +08:00
} ,
"bio" : {
2022-09-30 10:22:41 +08:00
"description" : "bio" ,
"type" : "string" ,
"maxLength" : 4096
2022-09-27 17:59:05 +08:00
} ,
"display_name" : {
"description" : "display_name" ,
2022-09-30 10:22:41 +08:00
"type" : "string" ,
"maxLength" : 30
2022-09-27 17:59:05 +08:00
} ,
"location" : {
"description" : "location" ,
2022-09-30 10:22:41 +08:00
"type" : "string" ,
"maxLength" : 100
2022-09-27 17:59:05 +08:00
} ,
2022-10-14 17:11:40 +08:00
"username" : {
"description" : "username" ,
"type" : "string" ,
"maxLength" : 30
} ,
2022-09-27 17:59:05 +08:00
"website" : {
"description" : "website" ,
2022-09-30 10:22:41 +08:00
"type" : "string" ,
"maxLength" : 500
2022-09-27 17:59:05 +08:00
}
}
} ,
2023-01-13 12:50:20 +08:00
"schema.UpdatePluginConfigReq" : {
"type" : "object" ,
"required" : [
"plugin_slug_name"
] ,
"properties" : {
"config_fields" : {
"type" : "object" ,
"additionalProperties" : { }
} ,
"plugin_slug_name" : {
"type" : "string" ,
"maxLength" : 100
}
}
} ,
"schema.UpdatePluginStatusReq" : {
"type" : "object" ,
"required" : [
"plugin_slug_name"
] ,
"properties" : {
"enabled" : {
"type" : "boolean"
} ,
"plugin_slug_name" : {
"type" : "string" ,
"maxLength" : 100
}
}
} ,
2023-05-09 10:54:42 +08:00
"schema.UpdatePrivilegesConfigReq" : {
"type" : "object" ,
"required" : [
"level"
] ,
"properties" : {
"level" : {
"type" : "integer" ,
"maximum" : 3 ,
"minimum" : 1
}
}
} ,
2022-10-21 10:26:32 +08:00
"schema.UpdateSMTPConfigReq" : {
"type" : "object" ,
"properties" : {
"encryption" : {
2022-10-21 17:04:41 +08:00
"description" : "\"\" SSL" ,
2022-10-21 10:26:32 +08:00
"type" : "string" ,
"enum" : [
"SSL"
]
} ,
2022-10-21 17:04:41 +08:00
"from_email" : {
2022-10-21 10:26:32 +08:00
"type" : "string" ,
"maxLength" : 256
} ,
"from_name" : {
"type" : "string" ,
"maxLength" : 256
} ,
2022-10-21 17:04:41 +08:00
"smtp_authentication" : {
"type" : "boolean"
} ,
2022-10-21 10:26:32 +08:00
"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
2022-10-21 17:04:41 +08:00
} ,
"test_email_recipient" : {
"type" : "string"
2022-10-21 10:26:32 +08:00
}
}
} ,
2022-09-27 17:59:05 +08:00
"schema.UpdateTagReq" : {
"type" : "object" ,
"required" : [
"tag_id"
] ,
"properties" : {
"display_name" : {
"description" : "display_name" ,
"type" : "string" ,
2022-09-30 10:22:41 +08:00
"maxLength" : 35
2022-09-27 17:59:05 +08:00
} ,
"edit_summary" : {
"description" : "edit summary" ,
"type" : "string"
} ,
"original_text" : {
"description" : "original text" ,
"type" : "string"
} ,
"slug_name" : {
"description" : "slug_name" ,
"type" : "string" ,
2022-09-30 10:22:41 +08:00
"maxLength" : 35
2022-09-27 17:59:05 +08:00
} ,
"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"
}
}
} ,
2022-11-11 15:13:23 +08:00
"schema.UpdateUserInterfaceRequest" : {
"type" : "object" ,
"required" : [
"language"
] ,
"properties" : {
"language" : {
"description" : "language" ,
"type" : "string" ,
"maxLength" : 100
}
}
} ,
2022-12-09 16:46:33 +08:00
"schema.UpdateUserPasswordReq" : {
"type" : "object" ,
"required" : [
"password" ,
"user_id"
] ,
"properties" : {
"password" : {
"type" : "string" ,
"maxLength" : 32 ,
"minLength" : 8
} ,
"user_id" : {
"type" : "string"
}
}
} ,
2022-11-29 15:10:57 +08:00
"schema.UpdateUserRoleReq" : {
"type" : "object" ,
"required" : [
"role_id" ,
"user_id"
] ,
"properties" : {
"role_id" : {
"description" : "role id" ,
"type" : "integer"
} ,
"user_id" : {
"description" : "user id" ,
"type" : "string"
}
}
} ,
2022-09-27 17:59:05 +08:00
"schema.UpdateUserStatusReq" : {
"type" : "object" ,
"required" : [
"status" ,
"user_id"
] ,
"properties" : {
"status" : {
"type" : "string" ,
"enum" : [
"normal" ,
"suspended" ,
"deleted" ,
"inactive"
]
} ,
"user_id" : {
"type" : "string"
}
}
} ,
"schema.UserBasicInfo" : {
"type" : "object" ,
"properties" : {
"avatar" : {
"description" : "avatar" ,
"type" : "string"
} ,
"display_name" : {
"description" : "display_name" ,
"type" : "string"
} ,
2022-12-07 16:51:08 +08:00
"id" : {
"description" : "user_id" ,
"type" : "string"
} ,
2022-09-27 17:59:05 +08:00
"ip_info" : {
"description" : "ip info" ,
"type" : "string"
} ,
"location" : {
"description" : "location" ,
"type" : "string"
} ,
"rank" : {
"description" : "rank" ,
"type" : "integer"
} ,
"status" : {
"description" : "status" ,
2022-09-29 15:27:56 +08:00
"type" : "string"
2022-09-27 17:59:05 +08:00
} ,
"username" : {
"description" : "name" ,
"type" : "string"
} ,
"website" : {
"description" : "website" ,
"type" : "string"
}
}
} ,
"schema.UserChangeEmailSendCodeReq" : {
"type" : "object" ,
"required" : [
"e_mail"
] ,
"properties" : {
2022-10-28 17:13:49 +08:00
"captcha_code" : {
"type" : "string" ,
"maxLength" : 500
} ,
"captcha_id" : {
"type" : "string" ,
"maxLength" : 500
} ,
2022-09-27 17:59:05 +08:00
"e_mail" : {
"type" : "string" ,
"maxLength" : 500
2023-05-09 10:54:42 +08:00
} ,
"pass" : {
"type" : "string" ,
"maxLength" : 32 ,
"minLength" : 8
2022-09-27 17:59:05 +08:00
}
}
} ,
"schema.UserChangeEmailVerifyReq" : {
"type" : "object" ,
"required" : [
"code"
] ,
"properties" : {
"code" : {
"type" : "string" ,
"maxLength" : 500
}
}
} ,
"schema.UserEmailLogin" : {
"type" : "object" ,
2022-11-17 19:23:02 +08:00
"required" : [
"e_mail" ,
"pass"
] ,
2022-09-27 17:59:05 +08:00
"properties" : {
"captcha_code" : {
"description" : "captcha_code" ,
"type" : "string"
} ,
"captcha_id" : {
"description" : "captcha_id" ,
"type" : "string"
} ,
"e_mail" : {
"description" : "e_mail" ,
2022-11-17 19:23:02 +08:00
"type" : "string" ,
"maxLength" : 500
2022-09-27 17:59:05 +08:00
} ,
"pass" : {
"description" : "password" ,
2022-11-17 19:23:02 +08:00
"type" : "string" ,
"maxLength" : 32 ,
"minLength" : 8
2022-09-27 17:59:05 +08:00
}
}
} ,
2023-05-09 10:54:42 +08:00
"schema.UserModifyPasswordReq" : {
2022-09-27 17:59:05 +08:00
"type" : "object" ,
2023-04-11 14:21:34 +08:00
"required" : [
"pass"
] ,
2022-09-27 17:59:05 +08:00
"properties" : {
2023-05-17 17:27:29 +08:00
"captcha_code" : {
"type" : "string" ,
"maxLength" : 500
} ,
"captcha_id" : {
"type" : "string" ,
"maxLength" : 500
} ,
2022-09-27 17:59:05 +08:00
"old_pass" : {
2023-04-11 14:21:34 +08:00
"type" : "string" ,
"maxLength" : 32 ,
"minLength" : 8
2022-09-27 17:59:05 +08:00
} ,
"pass" : {
2023-04-11 14:21:34 +08:00
"type" : "string" ,
"maxLength" : 32 ,
"minLength" : 8
2022-09-27 17:59:05 +08:00
}
}
} ,
"schema.UserNoticeSetRequest" : {
"type" : "object" ,
"properties" : {
"notice_switch" : {
"type" : "boolean"
}
}
} ,
"schema.UserNoticeSetResp" : {
"type" : "object" ,
"properties" : {
"notice_switch" : {
"type" : "boolean"
}
}
} ,
2022-12-12 16:54:04 +08:00
"schema.UserRankingResp" : {
"type" : "object" ,
"properties" : {
"staffs" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.UserRankingSimpleInfo"
}
} ,
"users_with_the_most_reputation" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.UserRankingSimpleInfo"
}
} ,
"users_with_the_most_vote" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.UserRankingSimpleInfo"
}
}
}
} ,
"schema.UserRankingSimpleInfo" : {
"type" : "object" ,
"properties" : {
"avatar" : {
"description" : "avatar" ,
"type" : "string"
} ,
"display_name" : {
"description" : "display name" ,
"type" : "string"
} ,
"rank" : {
"description" : "rank" ,
"type" : "integer"
} ,
"username" : {
"description" : "username" ,
"type" : "string"
} ,
"vote_count" : {
"description" : "vote" ,
"type" : "integer"
}
}
} ,
2022-09-27 17:59:05 +08:00
"schema.UserRePassWordRequest" : {
"type" : "object" ,
"required" : [
"code" ,
"pass"
] ,
"properties" : {
"code" : {
"description" : "code" ,
"type" : "string" ,
"maxLength" : 100
} ,
"pass" : {
"description" : "Password" ,
"type" : "string" ,
"maxLength" : 32
}
}
} ,
2022-10-14 17:11:40 +08:00
"schema.UserRegisterReq" : {
2022-09-27 17:59:05 +08:00
"type" : "object" ,
"required" : [
"e_mail" ,
"name" ,
"pass"
] ,
"properties" : {
2022-12-18 00:14:50 +08:00
"captcha_code" : {
"description" : "captcha_code" ,
"type" : "string"
} ,
"captcha_id" : {
"description" : "captcha_id" ,
"type" : "string"
} ,
2022-09-27 17:59:05 +08:00
"e_mail" : {
"description" : "email" ,
"type" : "string" ,
"maxLength" : 500
} ,
"name" : {
"description" : "name" ,
"type" : "string" ,
2022-10-14 17:11:40 +08:00
"maxLength" : 30
2022-09-27 17:59:05 +08:00
} ,
"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"
}
}
2022-11-11 15:13:23 +08:00
} ,
"translator.LangOption" : {
"type" : "object" ,
"properties" : {
"label" : {
"type" : "string"
} ,
2023-03-07 10:18:58 +08:00
"progress" : {
"description" : "Translation completion percentage" ,
"type" : "integer"
} ,
2022-11-11 15:13:23 +08:00
"value" : {
"type" : "string"
}
}
2022-09-27 17:59:05 +08:00
}
} ,
"securityDefinitions" : {
"ApiKeyAuth" : {
"type" : "apiKey" ,
"name" : "Authorization" ,
"in" : "header"
}
}
2022-11-15 10:54:30 +08:00
}