Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

doc(swagger): Regenerate the swagger document

LinkinStar350f317fc399
diff --git a/docs/docs.go b/docs/docs.go
index 5d69dd2c..edd782a7 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -609,6 +609,77 @@ const docTemplate = `{
}
}
},
+ "/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"
+ }
+ }
+ }
+ }
+ },
"/answer/admin/api/siteinfo/general": {
"get": {
"security": [
@@ -822,6 +893,77 @@ const docTemplate = `{
}
}
},
+ "/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"
+ }
+ }
+ }
+ }
+ },
"/answer/admin/api/siteinfo/seo": {
"get": {
"security": [
@@ -893,6 +1035,77 @@ const docTemplate = `{
}
}
},
+ "/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"
+ }
+ }
+ }
+ }
+ },
"/answer/admin/api/siteinfo/write": {
"get": {
"security": [
@@ -989,6 +1202,84 @@ const docTemplate = `{
}
}
},
+ "/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"
+ }
+ }
+ }
+ }
+ },
"/answer/admin/api/user/role": {
"put": {
"security": [
@@ -3456,7 +3747,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
- "$ref": "#/definitions/schema.SiteGeneralResp"
+ "$ref": "#/definitions/schema.SiteInfoResp"
}
}
}
@@ -5059,6 +5350,29 @@ const docTemplate = `{
}
}
},
+ "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
+ }
+ }
+ },
"schema.AdminSetAnswerStatusRequest": {
"type": "object",
"properties": {
@@ -6470,6 +6784,48 @@ const docTemplate = `{
}
}
},
+ "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
+ }
+ }
+ },
+ "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
+ }
+ }
+ },
"schema.SiteGeneralReq": {
"type": "object",
"required": [
@@ -6542,6 +6898,26 @@ const docTemplate = `{
}
}
},
+ "schema.SiteInfoResp": {
+ "type": "object",
+ "properties": {
+ "branding": {
+ "$ref": "#/definitions/schema.SiteBrandingResp"
+ },
+ "general": {
+ "$ref": "#/definitions/schema.SiteGeneralResp"
+ },
+ "interface": {
+ "$ref": "#/definitions/schema.SiteInterfaceResp"
+ },
+ "login": {
+ "$ref": "#/definitions/schema.SiteLoginResp"
+ },
+ "theme": {
+ "$ref": "#/definitions/schema.SiteThemeResp"
+ }
+ }
+ },
"schema.SiteInterfaceReq": {
"type": "object",
"required": [
@@ -6620,6 +6996,28 @@ const docTemplate = `{
}
}
},
+ "schema.SiteLoginReq": {
+ "type": "object",
+ "properties": {
+ "allow_new_registrations": {
+ "type": "boolean"
+ },
+ "login_required": {
+ "type": "boolean"
+ }
+ }
+ },
+ "schema.SiteLoginResp": {
+ "type": "object",
+ "properties": {
+ "allow_new_registrations": {
+ "type": "boolean"
+ },
+ "login_required": {
+ "type": "boolean"
+ }
+ }
+ },
"schema.SiteSeoReq": {
"type": "object",
"required": [
@@ -6642,6 +7040,38 @@ const docTemplate = `{
}
}
},
+ "schema.SiteThemeReq": {
+ "type": "object",
+ "required": [
+ "theme"
+ ],
+ "properties": {
+ "theme": {
+ "type": "string",
+ "maxLength": 255
+ },
+ "theme_config": {
+ "type": "object",
+ "additionalProperties": true
+ }
+ }
+ },
+ "schema.SiteThemeResp": {
+ "type": "object",
+ "required": [
+ "theme"
+ ],
+ "properties": {
+ "theme": {
+ "type": "string",
+ "maxLength": 255
+ },
+ "theme_config": {
+ "type": "object",
+ "additionalProperties": true
+ }
+ }
+ },
"schema.SiteWriteReq": {
"type": "object",
"properties": {
@@ -6954,6 +7384,23 @@ const docTemplate = `{
}
}
},
+ "schema.UpdateUserPasswordReq": {
+ "type": "object",
+ "required": [
+ "password",
+ "user_id"
+ ],
+ "properties": {
+ "password": {
+ "type": "string",
+ "maxLength": 32,
+ "minLength": 8
+ },
+ "user_id": {
+ "type": "string"
+ }
+ }
+ },
"schema.UpdateUserRoleReq": {
"type": "object",
"required": [
diff --git a/docs/swagger.json b/docs/swagger.json
index 534cccc6..fa899855 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -597,6 +597,77 @@
}
}
},
+ "/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"
+ }
+ }
+ }
+ }
+ },
"/answer/admin/api/siteinfo/general": {
"get": {
"security": [
@@ -810,6 +881,77 @@
}
}
},
+ "/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"
+ }
+ }
+ }
+ }
+ },
"/answer/admin/api/siteinfo/seo": {
"get": {
"security": [
@@ -881,6 +1023,77 @@
}
}
},
+ "/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"
+ }
+ }
+ }
+ }
+ },
"/answer/admin/api/siteinfo/write": {
"get": {
"security": [
@@ -977,6 +1190,84 @@
}
}
},
+ "/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"
+ }
+ }
+ }
+ }
+ },
"/answer/admin/api/user/role": {
"put": {
"security": [
@@ -3444,7 +3735,7 @@
"type": "object",
"properties": {
"data": {
- "$ref": "#/definitions/schema.SiteGeneralResp"
+ "$ref": "#/definitions/schema.SiteInfoResp"
}
}
}
@@ -5047,6 +5338,29 @@
}
}
},
+ "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
+ }
+ }
+ },
"schema.AdminSetAnswerStatusRequest": {
"type": "object",
"properties": {
@@ -6458,6 +6772,48 @@
}
}
},
+ "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
+ }
+ }
+ },
+ "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
+ }
+ }
+ },
"schema.SiteGeneralReq": {
"type": "object",
"required": [
@@ -6530,6 +6886,26 @@
}
}
},
+ "schema.SiteInfoResp": {
+ "type": "object",
+ "properties": {
+ "branding": {
+ "$ref": "#/definitions/schema.SiteBrandingResp"
+ },
+ "general": {
+ "$ref": "#/definitions/schema.SiteGeneralResp"
+ },
+ "interface": {
+ "$ref": "#/definitions/schema.SiteInterfaceResp"
+ },
+ "login": {
+ "$ref": "#/definitions/schema.SiteLoginResp"
+ },
+ "theme": {
+ "$ref": "#/definitions/schema.SiteThemeResp"
+ }
+ }
+ },
"schema.SiteInterfaceReq": {
"type": "object",
"required": [
@@ -6608,6 +6984,28 @@
}
}
},
+ "schema.SiteLoginReq": {
+ "type": "object",
+ "properties": {
+ "allow_new_registrations": {
+ "type": "boolean"
+ },
+ "login_required": {
+ "type": "boolean"
+ }
+ }
+ },
+ "schema.SiteLoginResp": {
+ "type": "object",
+ "properties": {
+ "allow_new_registrations": {
+ "type": "boolean"
+ },
+ "login_required": {
+ "type": "boolean"
+ }
+ }
+ },
"schema.SiteSeoReq": {
"type": "object",
"required": [
@@ -6630,6 +7028,38 @@
}
}
},
+ "schema.SiteThemeReq": {
+ "type": "object",
+ "required": [
+ "theme"
+ ],
+ "properties": {
+ "theme": {
+ "type": "string",
+ "maxLength": 255
+ },
+ "theme_config": {
+ "type": "object",
+ "additionalProperties": true
+ }
+ }
+ },
+ "schema.SiteThemeResp": {
+ "type": "object",
+ "required": [
+ "theme"
+ ],
+ "properties": {
+ "theme": {
+ "type": "string",
+ "maxLength": 255
+ },
+ "theme_config": {
+ "type": "object",
+ "additionalProperties": true
+ }
+ }
+ },
"schema.SiteWriteReq": {
"type": "object",
"properties": {
@@ -6942,6 +7372,23 @@
}
}
},
+ "schema.UpdateUserPasswordReq": {
+ "type": "object",
+ "required": [
+ "password",
+ "user_id"
+ ],
+ "properties": {
+ "password": {
+ "type": "string",
+ "maxLength": 32,
+ "minLength": 8
+ },
+ "user_id": {
+ "type": "string"
+ }
+ }
+ },
"schema.UpdateUserRoleReq": {
"type": "object",
"required": [
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 6ad1e87c..e2802ad4 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -176,6 +176,23 @@ definitions:
- object_id
- report_type
type: object
+ schema.AddUserReq:
+ properties:
+ display_name:
+ maxLength: 30
+ type: string
+ email:
+ maxLength: 500
+ type: string
+ password:
+ maxLength: 32
+ minLength: 8
+ type: string
+ required:
+ - display_name
+ - email
+ - password
+ type: object
schema.AdminSetAnswerStatusRequest:
properties:
answer_id:
@@ -1189,6 +1206,36 @@ definitions:
- logo
- square_icon
type: object
+ schema.SiteCustomCssHTMLReq:
+ properties:
+ custom_css:
+ maxLength: 65536
+ type: string
+ custom_footer:
+ maxLength: 65536
+ type: string
+ custom_head:
+ maxLength: 65536
+ type: string
+ custom_header:
+ maxLength: 65536
+ type: string
+ type: object
+ schema.SiteCustomCssHTMLResp:
+ properties:
+ custom_css:
+ maxLength: 65536
+ type: string
+ custom_footer:
+ maxLength: 65536
+ type: string
+ custom_head:
+ maxLength: 65536
+ type: string
+ custom_header:
+ maxLength: 65536
+ type: string
+ type: object
schema.SiteGeneralReq:
properties:
contact_email:
@@ -1243,6 +1290,19 @@ definitions:
- permalink
- site_url
type: object
+ schema.SiteInfoResp:
+ properties:
+ branding:
+ $ref: '#/definitions/schema.SiteBrandingResp'
+ general:
+ $ref: '#/definitions/schema.SiteGeneralResp'
+ interface:
+ $ref: '#/definitions/schema.SiteInterfaceResp'
+ login:
+ $ref: '#/definitions/schema.SiteLoginResp'
+ theme:
+ $ref: '#/definitions/schema.SiteThemeResp'
+ type: object
schema.SiteInterfaceReq:
properties:
language:
@@ -1297,6 +1357,20 @@ definitions:
terms_of_service_parsed_text:
type: string
type: object
+ schema.SiteLoginReq:
+ properties:
+ allow_new_registrations:
+ type: boolean
+ login_required:
+ type: boolean
+ type: object
+ schema.SiteLoginResp:
+ properties:
+ allow_new_registrations:
+ type: boolean
+ login_required:
+ type: boolean
+ type: object
schema.SiteSeoReq:
properties:
robots:
@@ -1311,6 +1385,28 @@ definitions:
required:
- robots
type: object
+ schema.SiteThemeReq:
+ properties:
+ theme:
+ maxLength: 255
+ type: string
+ theme_config:
+ additionalProperties: true
+ type: object
+ required:
+ - theme
+ type: object
+ schema.SiteThemeResp:
+ properties:
+ theme:
+ maxLength: 255
+ type: string
+ theme_config:
+ additionalProperties: true
+ type: object
+ required:
+ - theme
+ type: object
schema.SiteWriteReq:
properties:
recommend_tags:
@@ -1533,6 +1629,18 @@ definitions:
required:
- language
type: object
+ schema.UpdateUserPasswordReq:
+ properties:
+ password:
+ maxLength: 32
+ minLength: 8
+ type: string
+ user_id:
+ type: string
+ required:
+ - password
+ - user_id
+ type: object
schema.UpdateUserRoleReq:
properties:
role_id:
@@ -2102,6 +2210,47 @@ paths:
summary: update site info branding
tags:
- admin
+ /answer/admin/api/siteinfo/custom-css-html:
+ get:
+ description: get site info custom html css config
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: OK
+ schema:
+ allOf:
+ - $ref: '#/definitions/handler.RespBody'
+ - properties:
+ data:
+ $ref: '#/definitions/schema.SiteCustomCssHTMLResp'
+ type: object
+ security:
+ - ApiKeyAuth: []
+ summary: get site info custom html css config
+ tags:
+ - admin
+ put:
+ description: update site custom css html config
+ parameters:
+ - description: login info
+ in: body
+ name: data
+ required: true
+ schema:
+ $ref: '#/definitions/schema.SiteCustomCssHTMLReq'
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/handler.RespBody'
+ security:
+ - ApiKeyAuth: []
+ summary: update site custom css html config
+ tags:
+ - admin
/answer/admin/api/siteinfo/general:
get:
description: get site general information
@@ -2225,6 +2374,47 @@ paths:
summary: update site legal info
tags:
- admin
+ /answer/admin/api/siteinfo/login:
+ get:
+ description: get site info login config
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: OK
+ schema:
+ allOf:
+ - $ref: '#/definitions/handler.RespBody'
+ - properties:
+ data:
+ $ref: '#/definitions/schema.SiteLoginResp'
+ type: object
+ security:
+ - ApiKeyAuth: []
+ summary: get site info login config
+ tags:
+ - admin
+ put:
+ description: update site login
+ parameters:
+ - description: login info
+ in: body
+ name: data
+ required: true
+ schema:
+ $ref: '#/definitions/schema.SiteLoginReq'
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/handler.RespBody'
+ security:
+ - ApiKeyAuth: []
+ summary: update site login
+ tags:
+ - admin
/answer/admin/api/siteinfo/seo:
get:
description: get site seo information
@@ -2266,6 +2456,47 @@ paths:
summary: update site seo information
tags:
- admin
+ /answer/admin/api/siteinfo/theme:
+ get:
+ description: get site info theme config
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: OK
+ schema:
+ allOf:
+ - $ref: '#/definitions/handler.RespBody'
+ - properties:
+ data:
+ $ref: '#/definitions/schema.SiteThemeResp'
+ type: object
+ security:
+ - ApiKeyAuth: []
+ summary: get site info theme config
+ tags:
+ - admin
+ put:
+ description: update site custom css html config
+ parameters:
+ - description: login info
+ in: body
+ name: data
+ required: true
+ schema:
+ $ref: '#/definitions/schema.SiteThemeReq'
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/handler.RespBody'
+ security:
+ - ApiKeyAuth: []
+ summary: update site custom css html config
+ tags:
+ - admin
/answer/admin/api/siteinfo/write:
get:
description: get site interface
@@ -2322,6 +2553,54 @@ paths:
summary: Get theme options
tags:
- admin
+ /answer/admin/api/user:
+ post:
+ consumes:
+ - application/json
+ description: add user
+ parameters:
+ - description: user
+ in: body
+ name: data
+ required: true
+ schema:
+ $ref: '#/definitions/schema.AddUserReq'
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/handler.RespBody'
+ security:
+ - ApiKeyAuth: []
+ summary: add user
+ tags:
+ - admin
+ /answer/admin/api/user/password:
+ put:
+ consumes:
+ - application/json
+ description: update user password
+ parameters:
+ - description: user
+ in: body
+ name: data
+ required: true
+ schema:
+ $ref: '#/definitions/schema.UpdateUserPasswordReq'
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/handler.RespBody'
+ security:
+ - ApiKeyAuth: []
+ summary: update user password
+ tags:
+ - admin
/answer/admin/api/user/role:
put:
consumes:
@@ -3824,7 +4103,7 @@ paths:
- $ref: '#/definitions/handler.RespBody'
- properties:
data:
- $ref: '#/definitions/schema.SiteGeneralResp'
+ $ref: '#/definitions/schema.SiteInfoResp'
type: object
summary: get site info
tags: