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.

update swagger

aichy1268fb447405294
diff --git a/docs/docs.go b/docs/docs.go
index 8ba38fcb..af029e38 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -3326,7 +3326,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
- "$ref": "#/definitions/schema.GetUserResp"
+ "$ref": "#/definitions/schema.GetUserToSetShowResp"
}
}
}
@@ -4853,6 +4853,102 @@ const docTemplate = `{
}
}
},
+ "schema.GetUserToSetShowResp": {
+ "type": "object",
+ "properties": {
+ "access_token": {
+ "description": "access token",
+ "type": "string"
+ },
+ "answer_count": {
+ "description": "answer count",
+ "type": "integer"
+ },
+ "authority_group": {
+ "description": "authority group",
+ "type": "integer"
+ },
+ "avatar": {
+ "$ref": "#/definitions/schema.AvatarInfo"
+ },
+ "bio": {
+ "description": "bio markdown",
+ "type": "string"
+ },
+ "bio_html": {
+ "description": "bio html",
+ "type": "string"
+ },
+ "created_at": {
+ "description": "create time",
+ "type": "integer"
+ },
+ "display_name": {
+ "description": "display name",
+ "type": "string"
+ },
+ "e_mail": {
+ "description": "email",
+ "type": "string"
+ },
+ "follow_count": {
+ "description": "follow count",
+ "type": "integer"
+ },
+ "id": {
+ "description": "user id",
+ "type": "string"
+ },
+ "ip_info": {
+ "description": "ip info",
+ "type": "string"
+ },
+ "is_admin": {
+ "description": "is admin",
+ "type": "boolean"
+ },
+ "last_login_date": {
+ "description": "last login date",
+ "type": "integer"
+ },
+ "location": {
+ "description": "location",
+ "type": "string"
+ },
+ "mail_status": {
+ "description": "mail status(1 pass 2 to be verified)",
+ "type": "integer"
+ },
+ "mobile": {
+ "description": "mobile",
+ "type": "string"
+ },
+ "notice_status": {
+ "description": "notice status(1 on 2off)",
+ "type": "integer"
+ },
+ "question_count": {
+ "description": "question count",
+ "type": "integer"
+ },
+ "rank": {
+ "description": "rank",
+ "type": "integer"
+ },
+ "status": {
+ "description": "user status",
+ "type": "string"
+ },
+ "username": {
+ "description": "username",
+ "type": "string"
+ },
+ "website": {
+ "description": "website",
+ "type": "string"
+ }
+ }
+ },
"schema.GetVoteWithPageResp": {
"type": "object",
"properties": {
diff --git a/docs/swagger.json b/docs/swagger.json
index 3d1859d3..d2273f9e 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -3314,7 +3314,7 @@
"type": "object",
"properties": {
"data": {
- "$ref": "#/definitions/schema.GetUserResp"
+ "$ref": "#/definitions/schema.GetUserToSetShowResp"
}
}
}
@@ -4841,6 +4841,102 @@
}
}
},
+ "schema.GetUserToSetShowResp": {
+ "type": "object",
+ "properties": {
+ "access_token": {
+ "description": "access token",
+ "type": "string"
+ },
+ "answer_count": {
+ "description": "answer count",
+ "type": "integer"
+ },
+ "authority_group": {
+ "description": "authority group",
+ "type": "integer"
+ },
+ "avatar": {
+ "$ref": "#/definitions/schema.AvatarInfo"
+ },
+ "bio": {
+ "description": "bio markdown",
+ "type": "string"
+ },
+ "bio_html": {
+ "description": "bio html",
+ "type": "string"
+ },
+ "created_at": {
+ "description": "create time",
+ "type": "integer"
+ },
+ "display_name": {
+ "description": "display name",
+ "type": "string"
+ },
+ "e_mail": {
+ "description": "email",
+ "type": "string"
+ },
+ "follow_count": {
+ "description": "follow count",
+ "type": "integer"
+ },
+ "id": {
+ "description": "user id",
+ "type": "string"
+ },
+ "ip_info": {
+ "description": "ip info",
+ "type": "string"
+ },
+ "is_admin": {
+ "description": "is admin",
+ "type": "boolean"
+ },
+ "last_login_date": {
+ "description": "last login date",
+ "type": "integer"
+ },
+ "location": {
+ "description": "location",
+ "type": "string"
+ },
+ "mail_status": {
+ "description": "mail status(1 pass 2 to be verified)",
+ "type": "integer"
+ },
+ "mobile": {
+ "description": "mobile",
+ "type": "string"
+ },
+ "notice_status": {
+ "description": "notice status(1 on 2off)",
+ "type": "integer"
+ },
+ "question_count": {
+ "description": "question count",
+ "type": "integer"
+ },
+ "rank": {
+ "description": "rank",
+ "type": "integer"
+ },
+ "status": {
+ "description": "user status",
+ "type": "string"
+ },
+ "username": {
+ "description": "username",
+ "type": "string"
+ },
+ "website": {
+ "description": "website",
+ "type": "string"
+ }
+ }
+ },
"schema.GetVoteWithPageResp": {
"type": "object",
"properties": {
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index aaa1a77d..66991ad2 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -683,6 +683,77 @@ definitions:
description: website
type: string
type: object
+ schema.GetUserToSetShowResp:
+ properties:
+ access_token:
+ description: access token
+ type: string
+ answer_count:
+ description: answer count
+ type: integer
+ authority_group:
+ description: authority group
+ type: integer
+ avatar:
+ $ref: '#/definitions/schema.AvatarInfo'
+ bio:
+ description: bio markdown
+ type: string
+ bio_html:
+ description: bio html
+ type: string
+ created_at:
+ description: create time
+ type: integer
+ display_name:
+ description: display name
+ type: string
+ e_mail:
+ description: email
+ type: string
+ follow_count:
+ description: follow count
+ type: integer
+ id:
+ description: user id
+ type: string
+ ip_info:
+ description: ip info
+ type: string
+ is_admin:
+ description: is admin
+ type: boolean
+ last_login_date:
+ description: last login date
+ type: integer
+ location:
+ description: location
+ type: string
+ mail_status:
+ description: mail status(1 pass 2 to be verified)
+ type: integer
+ mobile:
+ description: mobile
+ type: string
+ notice_status:
+ description: notice status(1 on 2off)
+ type: integer
+ question_count:
+ description: question count
+ type: integer
+ rank:
+ description: rank
+ type: integer
+ status:
+ description: user status
+ type: string
+ username:
+ description: username
+ type: string
+ website:
+ description: website
+ type: string
+ type: object
schema.GetVoteWithPageResp:
properties:
answer_id:
@@ -3305,7 +3376,7 @@ paths:
- $ref: '#/definitions/handler.RespBody'
- properties:
data:
- $ref: '#/definitions/schema.GetUserResp'
+ $ref: '#/definitions/schema.GetUserToSetShowResp'
type: object
security:
- ApiKeyAuth: []
diff --git a/internal/controller/user_controller.go b/internal/controller/user_controller.go
index 4c346035..19bbc6ae 100644
--- a/internal/controller/user_controller.go
+++ b/internal/controller/user_controller.go
@@ -52,7 +52,7 @@ func NewUserController(
// @Accept json
// @Produce json
// @Security ApiKeyAuth
-// @Success 200 {object} handler.RespBody{data=schema.GetUserResp}
+// @Success 200 {object} handler.RespBody{data=schema.GetUserToSetShowResp}
// @Router /answer/api/v1/user/info [get]
func (uc *UserController) GetUserInfoByUserID(ctx *gin.Context) {
userID := middleware.GetLoginUserIDFromContext(ctx)