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: update swagger

LinkinStarca09c60ee1a9
diff --git a/docs/docs.go b/docs/docs.go
index f21f508c..7a37d7e3 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -121,11 +121,6 @@ const docTemplate = `{
},
"/answer/admin/api/language/options": {
"get": {
- "security": [
- {
- "ApiKeyAuth": []
- }
- ],
"description": "Get language options",
"produces": [
"application/json"
@@ -1432,11 +1427,6 @@ const docTemplate = `{
},
"/answer/api/v1/language/options": {
"get": {
- "security": [
- {
- "ApiKeyAuth": []
- }
- ],
"description": "Get language options",
"produces": [
"application/json"
@@ -3391,6 +3381,52 @@ const docTemplate = `{
}
}
},
+ "/answer/api/v1/user/interface": {
+ "put": {
+ "security": [
+ {
+ "ApiKeyAuth": []
+ }
+ ],
+ "description": "UserUpdateInterface update user interface config",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "User"
+ ],
+ "summary": "UserUpdateInterface update user interface config",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "access-token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "UpdateInfoRequest",
+ "name": "data",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/schema.UpdateUserInterfaceRequest"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/handler.RespBody"
+ }
+ }
+ }
+ }
+ },
"/answer/api/v1/user/login/email": {
"post": {
"description": "UserEmailLogin",
@@ -4822,6 +4858,10 @@ const docTemplate = `{
"description": "is admin",
"type": "boolean"
},
+ "language": {
+ "description": "language",
+ "type": "string"
+ },
"last_login_date": {
"description": "last login date",
"type": "integer"
@@ -4918,6 +4958,10 @@ const docTemplate = `{
"description": "is admin",
"type": "boolean"
},
+ "language": {
+ "description": "language",
+ "type": "string"
+ },
"last_login_date": {
"description": "last login date",
"type": "integer"
@@ -5573,6 +5617,19 @@ const docTemplate = `{
}
}
},
+ "schema.UpdateUserInterfaceRequest": {
+ "type": "object",
+ "required": [
+ "language"
+ ],
+ "properties": {
+ "language": {
+ "description": "language",
+ "type": "string",
+ "maxLength": 100
+ }
+ }
+ },
"schema.UpdateUserStatusReq": {
"type": "object",
"required": [
diff --git a/docs/swagger.json b/docs/swagger.json
index 039f67f5..405c5d2a 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -109,11 +109,6 @@
},
"/answer/admin/api/language/options": {
"get": {
- "security": [
- {
- "ApiKeyAuth": []
- }
- ],
"description": "Get language options",
"produces": [
"application/json"
@@ -1420,11 +1415,6 @@
},
"/answer/api/v1/language/options": {
"get": {
- "security": [
- {
- "ApiKeyAuth": []
- }
- ],
"description": "Get language options",
"produces": [
"application/json"
@@ -3379,6 +3369,52 @@
}
}
},
+ "/answer/api/v1/user/interface": {
+ "put": {
+ "security": [
+ {
+ "ApiKeyAuth": []
+ }
+ ],
+ "description": "UserUpdateInterface update user interface config",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "User"
+ ],
+ "summary": "UserUpdateInterface update user interface config",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "access-token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "UpdateInfoRequest",
+ "name": "data",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/schema.UpdateUserInterfaceRequest"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/handler.RespBody"
+ }
+ }
+ }
+ }
+ },
"/answer/api/v1/user/login/email": {
"post": {
"description": "UserEmailLogin",
@@ -4810,6 +4846,10 @@
"description": "is admin",
"type": "boolean"
},
+ "language": {
+ "description": "language",
+ "type": "string"
+ },
"last_login_date": {
"description": "last login date",
"type": "integer"
@@ -4906,6 +4946,10 @@
"description": "is admin",
"type": "boolean"
},
+ "language": {
+ "description": "language",
+ "type": "string"
+ },
"last_login_date": {
"description": "last login date",
"type": "integer"
@@ -5561,6 +5605,19 @@
}
}
},
+ "schema.UpdateUserInterfaceRequest": {
+ "type": "object",
+ "required": [
+ "language"
+ ],
+ "properties": {
+ "language": {
+ "description": "language",
+ "type": "string",
+ "maxLength": 100
+ }
+ }
+ },
"schema.UpdateUserStatusReq": {
"type": "object",
"required": [
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index c419b60e..d2a9dab8 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -652,6 +652,9 @@ definitions:
is_admin:
description: is admin
type: boolean
+ language:
+ description: language
+ type: string
last_login_date:
description: last login date
type: integer
@@ -723,6 +726,9 @@ definitions:
is_admin:
description: is admin
type: boolean
+ language:
+ description: language
+ type: string
last_login_date:
description: last login date
type: integer
@@ -1195,6 +1201,15 @@ definitions:
- synonym_tag_list
- tag_id
type: object
+ schema.UpdateUserInterfaceRequest:
+ properties:
+ language:
+ description: language
+ maxLength: 100
+ type: string
+ required:
+ - language
+ type: object
schema.UpdateUserStatusReq:
properties:
status:
@@ -1444,8 +1459,6 @@ paths:
description: OK
schema:
$ref: '#/definitions/handler.RespBody'
- security:
- - ApiKeyAuth: []
summary: Get language options
tags:
- Lang
@@ -2237,8 +2250,6 @@ paths:
description: OK
schema:
$ref: '#/definitions/handler.RespBody'
- security:
- - ApiKeyAuth: []
summary: Get language options
tags:
- Lang
@@ -3425,6 +3436,35 @@ paths:
summary: UserUpdateInfo update user info
tags:
- User
+ /answer/api/v1/user/interface:
+ put:
+ consumes:
+ - application/json
+ description: UserUpdateInterface update user interface config
+ parameters:
+ - description: access-token
+ in: header
+ name: Authorization
+ required: true
+ type: string
+ - description: UpdateInfoRequest
+ in: body
+ name: data
+ required: true
+ schema:
+ $ref: '#/definitions/schema.UpdateUserInterfaceRequest'
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/handler.RespBody'
+ security:
+ - ApiKeyAuth: []
+ summary: UserUpdateInterface update user interface config
+ tags:
+ - User
/answer/api/v1/user/login/email:
post:
consumes: