feat(menu): update admin menu settings to include questions, tags, and advanced options
This commit is contained in:
+350
-182
@@ -856,6 +856,77 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/answer/admin/api/siteinfo/advanced": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "get site advanced setting",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "get site advanced setting",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/handler.RespBody"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/schema.SiteAdvancedResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "update site advanced info",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "update site advanced info",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "advanced settings",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/schema.SiteAdvancedReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.RespBody"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/answer/admin/api/siteinfo/branding": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -1282,6 +1353,77 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/answer/admin/api/siteinfo/question": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "get site questions setting",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "get site questions setting",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/handler.RespBody"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/schema.SiteQuestionsResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "update site question settings",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "update site question settings",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "questions settings",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/schema.SiteQuestionsReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.RespBody"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/answer/admin/api/siteinfo/seo": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -1353,6 +1495,77 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/answer/admin/api/siteinfo/tag": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "get site tags setting",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "get site tags setting",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/handler.RespBody"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/schema.SiteTagsResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "update site tag settings",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "update site tag settings",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "tags settings",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/schema.SiteTagsReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.RespBody"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/answer/admin/api/siteinfo/theme": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -1495,77 +1708,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/answer/admin/api/theme/options": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -10478,6 +10620,58 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteAdvancedReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"authorized_attachment_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"authorized_image_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"max_attachment_size": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_megapixel": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_size": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteAdvancedResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"authorized_attachment_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"authorized_image_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"max_attachment_size": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_megapixel": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_size": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteBrandingReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -10657,18 +10851,24 @@ const docTemplate = `{
|
||||
"revision": {
|
||||
"type": "string"
|
||||
},
|
||||
"site_advanced": {
|
||||
"$ref": "#/definitions/schema.SiteAdvancedResp"
|
||||
},
|
||||
"site_legal": {
|
||||
"$ref": "#/definitions/schema.SiteLegalSimpleResp"
|
||||
},
|
||||
"site_questions": {
|
||||
"$ref": "#/definitions/schema.SiteQuestionsResp"
|
||||
},
|
||||
"site_seo": {
|
||||
"$ref": "#/definitions/schema.SiteSeoResp"
|
||||
},
|
||||
"site_tags": {
|
||||
"$ref": "#/definitions/schema.SiteTagsResp"
|
||||
},
|
||||
"site_users": {
|
||||
"$ref": "#/definitions/schema.SiteUsersResp"
|
||||
},
|
||||
"site_write": {
|
||||
"$ref": "#/definitions/schema.SiteWriteResp"
|
||||
},
|
||||
"theme": {
|
||||
"$ref": "#/definitions/schema.SiteThemeResp"
|
||||
},
|
||||
@@ -10848,6 +11048,32 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteQuestionsReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"min_content": {
|
||||
"type": "integer",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"restrict_answer": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteQuestionsResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"min_content": {
|
||||
"type": "integer",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"restrict_answer": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteSeoReq": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -10882,6 +11108,56 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteTagsReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"min_tags": {
|
||||
"type": "integer",
|
||||
"maximum": 5,
|
||||
"minimum": 0
|
||||
},
|
||||
"recommend_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
},
|
||||
"required_tag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"reserved_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteTagsResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"min_tags": {
|
||||
"type": "integer",
|
||||
"maximum": 5,
|
||||
"minimum": 0
|
||||
},
|
||||
"recommend_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
},
|
||||
"required_tag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"reserved_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteThemeReq": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -10995,114 +11271,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteWriteReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"authorized_attachment_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"authorized_image_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"max_attachment_size": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_megapixel": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_size": {
|
||||
"type": "integer"
|
||||
},
|
||||
"min_content": {
|
||||
"type": "integer",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"min_tags": {
|
||||
"type": "integer",
|
||||
"maximum": 5,
|
||||
"minimum": 0
|
||||
},
|
||||
"recommend_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
},
|
||||
"required_tag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"reserved_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
},
|
||||
"restrict_answer": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteWriteResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"authorized_attachment_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"authorized_image_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"max_attachment_size": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_megapixel": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_size": {
|
||||
"type": "integer"
|
||||
},
|
||||
"min_content": {
|
||||
"type": "integer",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"min_tags": {
|
||||
"type": "integer",
|
||||
"maximum": 5,
|
||||
"minimum": 0
|
||||
},
|
||||
"recommend_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
},
|
||||
"required_tag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"reserved_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
},
|
||||
"restrict_answer": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteWriteTag": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
+350
-182
@@ -848,6 +848,77 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/answer/admin/api/siteinfo/advanced": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "get site advanced setting",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "get site advanced setting",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/handler.RespBody"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/schema.SiteAdvancedResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "update site advanced info",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "update site advanced info",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "advanced settings",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/schema.SiteAdvancedReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.RespBody"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/answer/admin/api/siteinfo/branding": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -1274,6 +1345,77 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/answer/admin/api/siteinfo/question": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "get site questions setting",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "get site questions setting",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/handler.RespBody"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/schema.SiteQuestionsResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "update site question settings",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "update site question settings",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "questions settings",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/schema.SiteQuestionsReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.RespBody"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/answer/admin/api/siteinfo/seo": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -1345,6 +1487,77 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/answer/admin/api/siteinfo/tag": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "get site tags setting",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "get site tags setting",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/handler.RespBody"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/schema.SiteTagsResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "update site tag settings",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "update site tag settings",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "tags settings",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/schema.SiteTagsReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.RespBody"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/answer/admin/api/siteinfo/theme": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -1487,77 +1700,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/answer/admin/api/theme/options": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -10470,6 +10612,58 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteAdvancedReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"authorized_attachment_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"authorized_image_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"max_attachment_size": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_megapixel": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_size": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteAdvancedResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"authorized_attachment_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"authorized_image_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"max_attachment_size": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_megapixel": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_size": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteBrandingReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -10649,18 +10843,24 @@
|
||||
"revision": {
|
||||
"type": "string"
|
||||
},
|
||||
"site_advanced": {
|
||||
"$ref": "#/definitions/schema.SiteAdvancedResp"
|
||||
},
|
||||
"site_legal": {
|
||||
"$ref": "#/definitions/schema.SiteLegalSimpleResp"
|
||||
},
|
||||
"site_questions": {
|
||||
"$ref": "#/definitions/schema.SiteQuestionsResp"
|
||||
},
|
||||
"site_seo": {
|
||||
"$ref": "#/definitions/schema.SiteSeoResp"
|
||||
},
|
||||
"site_tags": {
|
||||
"$ref": "#/definitions/schema.SiteTagsResp"
|
||||
},
|
||||
"site_users": {
|
||||
"$ref": "#/definitions/schema.SiteUsersResp"
|
||||
},
|
||||
"site_write": {
|
||||
"$ref": "#/definitions/schema.SiteWriteResp"
|
||||
},
|
||||
"theme": {
|
||||
"$ref": "#/definitions/schema.SiteThemeResp"
|
||||
},
|
||||
@@ -10840,6 +11040,32 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteQuestionsReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"min_content": {
|
||||
"type": "integer",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"restrict_answer": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteQuestionsResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"min_content": {
|
||||
"type": "integer",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"restrict_answer": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteSeoReq": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -10874,6 +11100,56 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteTagsReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"min_tags": {
|
||||
"type": "integer",
|
||||
"maximum": 5,
|
||||
"minimum": 0
|
||||
},
|
||||
"recommend_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
},
|
||||
"required_tag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"reserved_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteTagsResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"min_tags": {
|
||||
"type": "integer",
|
||||
"maximum": 5,
|
||||
"minimum": 0
|
||||
},
|
||||
"recommend_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
},
|
||||
"required_tag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"reserved_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteThemeReq": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -10987,114 +11263,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteWriteReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"authorized_attachment_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"authorized_image_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"max_attachment_size": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_megapixel": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_size": {
|
||||
"type": "integer"
|
||||
},
|
||||
"min_content": {
|
||||
"type": "integer",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"min_tags": {
|
||||
"type": "integer",
|
||||
"maximum": 5,
|
||||
"minimum": 0
|
||||
},
|
||||
"recommend_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
},
|
||||
"required_tag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"reserved_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
},
|
||||
"restrict_answer": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteWriteResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"authorized_attachment_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"authorized_image_extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"max_attachment_size": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_megapixel": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_image_size": {
|
||||
"type": "integer"
|
||||
},
|
||||
"min_content": {
|
||||
"type": "integer",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"min_tags": {
|
||||
"type": "integer",
|
||||
"maximum": 5,
|
||||
"minimum": 0
|
||||
},
|
||||
"recommend_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
},
|
||||
"required_tag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"reserved_tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.SiteWriteTag"
|
||||
}
|
||||
},
|
||||
"restrict_answer": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.SiteWriteTag": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
+215
-117
@@ -2055,6 +2055,40 @@ definitions:
|
||||
required:
|
||||
- user_id
|
||||
type: object
|
||||
schema.SiteAdvancedReq:
|
||||
properties:
|
||||
authorized_attachment_extensions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
authorized_image_extensions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
max_attachment_size:
|
||||
type: integer
|
||||
max_image_megapixel:
|
||||
type: integer
|
||||
max_image_size:
|
||||
type: integer
|
||||
type: object
|
||||
schema.SiteAdvancedResp:
|
||||
properties:
|
||||
authorized_attachment_extensions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
authorized_image_extensions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
max_attachment_size:
|
||||
type: integer
|
||||
max_image_megapixel:
|
||||
type: integer
|
||||
max_image_size:
|
||||
type: integer
|
||||
type: object
|
||||
schema.SiteBrandingReq:
|
||||
properties:
|
||||
favicon:
|
||||
@@ -2183,14 +2217,18 @@ definitions:
|
||||
$ref: '#/definitions/schema.SiteLoginResp'
|
||||
revision:
|
||||
type: string
|
||||
site_advanced:
|
||||
$ref: '#/definitions/schema.SiteAdvancedResp'
|
||||
site_legal:
|
||||
$ref: '#/definitions/schema.SiteLegalSimpleResp'
|
||||
site_questions:
|
||||
$ref: '#/definitions/schema.SiteQuestionsResp'
|
||||
site_seo:
|
||||
$ref: '#/definitions/schema.SiteSeoResp'
|
||||
site_tags:
|
||||
$ref: '#/definitions/schema.SiteTagsResp'
|
||||
site_users:
|
||||
$ref: '#/definitions/schema.SiteUsersResp'
|
||||
site_write:
|
||||
$ref: '#/definitions/schema.SiteWriteResp'
|
||||
theme:
|
||||
$ref: '#/definitions/schema.SiteThemeResp'
|
||||
version:
|
||||
@@ -2312,6 +2350,24 @@ definitions:
|
||||
login_required:
|
||||
type: boolean
|
||||
type: object
|
||||
schema.SiteQuestionsReq:
|
||||
properties:
|
||||
min_content:
|
||||
maximum: 65535
|
||||
minimum: 0
|
||||
type: integer
|
||||
restrict_answer:
|
||||
type: boolean
|
||||
type: object
|
||||
schema.SiteQuestionsResp:
|
||||
properties:
|
||||
min_content:
|
||||
maximum: 65535
|
||||
minimum: 0
|
||||
type: integer
|
||||
restrict_answer:
|
||||
type: boolean
|
||||
type: object
|
||||
schema.SiteSeoReq:
|
||||
properties:
|
||||
permalink:
|
||||
@@ -2336,6 +2392,40 @@ definitions:
|
||||
- permalink
|
||||
- robots
|
||||
type: object
|
||||
schema.SiteTagsReq:
|
||||
properties:
|
||||
min_tags:
|
||||
maximum: 5
|
||||
minimum: 0
|
||||
type: integer
|
||||
recommend_tags:
|
||||
items:
|
||||
$ref: '#/definitions/schema.SiteWriteTag'
|
||||
type: array
|
||||
required_tag:
|
||||
type: boolean
|
||||
reserved_tags:
|
||||
items:
|
||||
$ref: '#/definitions/schema.SiteWriteTag'
|
||||
type: array
|
||||
type: object
|
||||
schema.SiteTagsResp:
|
||||
properties:
|
||||
min_tags:
|
||||
maximum: 5
|
||||
minimum: 0
|
||||
type: integer
|
||||
recommend_tags:
|
||||
items:
|
||||
$ref: '#/definitions/schema.SiteWriteTag'
|
||||
type: array
|
||||
required_tag:
|
||||
type: boolean
|
||||
reserved_tags:
|
||||
items:
|
||||
$ref: '#/definitions/schema.SiteWriteTag'
|
||||
type: array
|
||||
type: object
|
||||
schema.SiteThemeReq:
|
||||
properties:
|
||||
color_scheme:
|
||||
@@ -2412,80 +2502,6 @@ definitions:
|
||||
required:
|
||||
- default_avatar
|
||||
type: object
|
||||
schema.SiteWriteReq:
|
||||
properties:
|
||||
authorized_attachment_extensions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
authorized_image_extensions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
max_attachment_size:
|
||||
type: integer
|
||||
max_image_megapixel:
|
||||
type: integer
|
||||
max_image_size:
|
||||
type: integer
|
||||
min_content:
|
||||
maximum: 65535
|
||||
minimum: 0
|
||||
type: integer
|
||||
min_tags:
|
||||
maximum: 5
|
||||
minimum: 0
|
||||
type: integer
|
||||
recommend_tags:
|
||||
items:
|
||||
$ref: '#/definitions/schema.SiteWriteTag'
|
||||
type: array
|
||||
required_tag:
|
||||
type: boolean
|
||||
reserved_tags:
|
||||
items:
|
||||
$ref: '#/definitions/schema.SiteWriteTag'
|
||||
type: array
|
||||
restrict_answer:
|
||||
type: boolean
|
||||
type: object
|
||||
schema.SiteWriteResp:
|
||||
properties:
|
||||
authorized_attachment_extensions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
authorized_image_extensions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
max_attachment_size:
|
||||
type: integer
|
||||
max_image_megapixel:
|
||||
type: integer
|
||||
max_image_size:
|
||||
type: integer
|
||||
min_content:
|
||||
maximum: 65535
|
||||
minimum: 0
|
||||
type: integer
|
||||
min_tags:
|
||||
maximum: 5
|
||||
minimum: 0
|
||||
type: integer
|
||||
recommend_tags:
|
||||
items:
|
||||
$ref: '#/definitions/schema.SiteWriteTag'
|
||||
type: array
|
||||
required_tag:
|
||||
type: boolean
|
||||
reserved_tags:
|
||||
items:
|
||||
$ref: '#/definitions/schema.SiteWriteTag'
|
||||
type: array
|
||||
restrict_answer:
|
||||
type: boolean
|
||||
type: object
|
||||
schema.SiteWriteTag:
|
||||
properties:
|
||||
display_name:
|
||||
@@ -3685,6 +3701,47 @@ paths:
|
||||
summary: update smtp config
|
||||
tags:
|
||||
- admin
|
||||
/answer/admin/api/siteinfo/advanced:
|
||||
get:
|
||||
description: get site advanced setting
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/handler.RespBody'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/schema.SiteAdvancedResp'
|
||||
type: object
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: get site advanced setting
|
||||
tags:
|
||||
- admin
|
||||
put:
|
||||
description: update site advanced info
|
||||
parameters:
|
||||
- description: advanced settings
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/schema.SiteAdvancedReq'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/handler.RespBody'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: update site advanced info
|
||||
tags:
|
||||
- admin
|
||||
/answer/admin/api/siteinfo/branding:
|
||||
get:
|
||||
description: get site interface
|
||||
@@ -3931,6 +3988,47 @@ paths:
|
||||
summary: update site login
|
||||
tags:
|
||||
- admin
|
||||
/answer/admin/api/siteinfo/question:
|
||||
get:
|
||||
description: get site questions setting
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/handler.RespBody'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/schema.SiteQuestionsResp'
|
||||
type: object
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: get site questions setting
|
||||
tags:
|
||||
- admin
|
||||
put:
|
||||
description: update site question settings
|
||||
parameters:
|
||||
- description: questions settings
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/schema.SiteQuestionsReq'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/handler.RespBody'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: update site question settings
|
||||
tags:
|
||||
- admin
|
||||
/answer/admin/api/siteinfo/seo:
|
||||
get:
|
||||
description: get site seo information
|
||||
@@ -3972,6 +4070,47 @@ paths:
|
||||
summary: update site seo information
|
||||
tags:
|
||||
- admin
|
||||
/answer/admin/api/siteinfo/tag:
|
||||
get:
|
||||
description: get site tags setting
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/handler.RespBody'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/schema.SiteTagsResp'
|
||||
type: object
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: get site tags setting
|
||||
tags:
|
||||
- admin
|
||||
put:
|
||||
description: update site tag settings
|
||||
parameters:
|
||||
- description: tags settings
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/schema.SiteTagsReq'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/handler.RespBody'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: update site tag settings
|
||||
tags:
|
||||
- admin
|
||||
/answer/admin/api/siteinfo/theme:
|
||||
get:
|
||||
description: get site info theme config
|
||||
@@ -4054,47 +4193,6 @@ paths:
|
||||
summary: update site info config about users
|
||||
tags:
|
||||
- admin
|
||||
/answer/admin/api/siteinfo/write:
|
||||
get:
|
||||
description: get site interface
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/handler.RespBody'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/schema.SiteWriteResp'
|
||||
type: object
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: get site interface
|
||||
tags:
|
||||
- admin
|
||||
put:
|
||||
description: update site write info
|
||||
parameters:
|
||||
- description: write info
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/schema.SiteWriteReq'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/handler.RespBody'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: update site write info
|
||||
tags:
|
||||
- admin
|
||||
/answer/admin/api/theme/options:
|
||||
get:
|
||||
description: Get theme options
|
||||
|
||||
Reference in New Issue
Block a user