docs(swagger): update swagger docs

This commit is contained in:
LinkinStars 2023-05-29 15:08:57 +08:00
parent 209dc4f623
commit 935bcf21ff
3 changed files with 591 additions and 591 deletions

View File

@ -3373,7 +3373,7 @@ const docTemplate = `{
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.GetRankPersonalWithPageResp"
"$ref": "#/definitions/schema.GetRankPersonalPageResp"
}
}
}
@ -5071,7 +5071,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetUserResp"
"$ref": "#/definitions/schema.UserLoginResp"
}
}
}
@ -5155,7 +5155,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetUserToSetShowResp"
"$ref": "#/definitions/schema.GetCurrentLoginUserInfoResp"
}
}
}
@ -5340,7 +5340,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetUserResp"
"$ref": "#/definitions/schema.UserLoginResp"
}
}
}
@ -5596,7 +5596,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetUserResp"
"$ref": "#/definitions/schema.UserLoginResp"
}
}
}
@ -5642,7 +5642,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetUserResp"
"$ref": "#/definitions/schema.UserLoginResp"
}
}
}
@ -6800,6 +6800,109 @@ const docTemplate = `{
}
}
},
"schema.GetCurrentLoginUserInfoResp": {
"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"
},
"have_password": {
"type": "boolean"
},
"id": {
"description": "user id",
"type": "string"
},
"ip_info": {
"description": "ip info",
"type": "string"
},
"language": {
"description": "language",
"type": "string"
},
"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"
},
"role_id": {
"description": "role id",
"type": "integer"
},
"status": {
"description": "user status",
"type": "string"
},
"username": {
"description": "username",
"type": "string"
},
"website": {
"description": "website",
"type": "string"
}
}
},
"schema.GetFollowingTagsResp": {
"type": "object",
"properties": {
@ -6983,7 +7086,7 @@ const docTemplate = `{
}
}
},
"schema.GetRankPersonalWithPageResp": {
"schema.GetRankPersonalPageResp": {
"type": "object",
"properties": {
"answer_id": {
@ -7347,214 +7450,6 @@ const docTemplate = `{
}
}
},
"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": {
"description": "email",
"type": "string"
},
"follow_count": {
"description": "follow count",
"type": "integer"
},
"have_password": {
"description": "user have password",
"type": "boolean"
},
"id": {
"description": "user id",
"type": "string"
},
"ip_info": {
"description": "ip info",
"type": "string"
},
"language": {
"description": "language",
"type": "string"
},
"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"
},
"role_id": {
"description": "role id",
"type": "integer"
},
"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": {
"description": "email",
"type": "string"
},
"follow_count": {
"description": "follow count",
"type": "integer"
},
"have_password": {
"type": "boolean"
},
"id": {
"description": "user id",
"type": "string"
},
"ip_info": {
"description": "ip info",
"type": "string"
},
"language": {
"description": "language",
"type": "string"
},
"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"
},
"role_id": {
"description": "role id",
"type": "integer"
},
"status": {
"description": "user status",
"type": "string"
},
"username": {
"description": "username",
"type": "string"
},
"website": {
"description": "website",
"type": "string"
}
}
},
"schema.GetVoteWithPageResp": {
"type": "object",
"properties": {
@ -9080,6 +8975,111 @@ const docTemplate = `{
}
}
},
"schema.UserLoginResp": {
"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": {
"description": "email",
"type": "string"
},
"follow_count": {
"description": "follow count",
"type": "integer"
},
"have_password": {
"description": "user have password",
"type": "boolean"
},
"id": {
"description": "user id",
"type": "string"
},
"ip_info": {
"description": "ip info",
"type": "string"
},
"language": {
"description": "language",
"type": "string"
},
"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"
},
"role_id": {
"description": "role id",
"type": "integer"
},
"status": {
"description": "user status",
"type": "string"
},
"username": {
"description": "username",
"type": "string"
},
"website": {
"description": "website",
"type": "string"
}
}
},
"schema.UserModifyPasswordReq": {
"type": "object",
"required": [

View File

@ -3361,7 +3361,7 @@
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.GetRankPersonalWithPageResp"
"$ref": "#/definitions/schema.GetRankPersonalPageResp"
}
}
}
@ -5059,7 +5059,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetUserResp"
"$ref": "#/definitions/schema.UserLoginResp"
}
}
}
@ -5143,7 +5143,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetUserToSetShowResp"
"$ref": "#/definitions/schema.GetCurrentLoginUserInfoResp"
}
}
}
@ -5328,7 +5328,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetUserResp"
"$ref": "#/definitions/schema.UserLoginResp"
}
}
}
@ -5584,7 +5584,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetUserResp"
"$ref": "#/definitions/schema.UserLoginResp"
}
}
}
@ -5630,7 +5630,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetUserResp"
"$ref": "#/definitions/schema.UserLoginResp"
}
}
}
@ -6788,6 +6788,109 @@
}
}
},
"schema.GetCurrentLoginUserInfoResp": {
"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"
},
"have_password": {
"type": "boolean"
},
"id": {
"description": "user id",
"type": "string"
},
"ip_info": {
"description": "ip info",
"type": "string"
},
"language": {
"description": "language",
"type": "string"
},
"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"
},
"role_id": {
"description": "role id",
"type": "integer"
},
"status": {
"description": "user status",
"type": "string"
},
"username": {
"description": "username",
"type": "string"
},
"website": {
"description": "website",
"type": "string"
}
}
},
"schema.GetFollowingTagsResp": {
"type": "object",
"properties": {
@ -6971,7 +7074,7 @@
}
}
},
"schema.GetRankPersonalWithPageResp": {
"schema.GetRankPersonalPageResp": {
"type": "object",
"properties": {
"answer_id": {
@ -7335,214 +7438,6 @@
}
}
},
"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": {
"description": "email",
"type": "string"
},
"follow_count": {
"description": "follow count",
"type": "integer"
},
"have_password": {
"description": "user have password",
"type": "boolean"
},
"id": {
"description": "user id",
"type": "string"
},
"ip_info": {
"description": "ip info",
"type": "string"
},
"language": {
"description": "language",
"type": "string"
},
"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"
},
"role_id": {
"description": "role id",
"type": "integer"
},
"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": {
"description": "email",
"type": "string"
},
"follow_count": {
"description": "follow count",
"type": "integer"
},
"have_password": {
"type": "boolean"
},
"id": {
"description": "user id",
"type": "string"
},
"ip_info": {
"description": "ip info",
"type": "string"
},
"language": {
"description": "language",
"type": "string"
},
"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"
},
"role_id": {
"description": "role id",
"type": "integer"
},
"status": {
"description": "user status",
"type": "string"
},
"username": {
"description": "username",
"type": "string"
},
"website": {
"description": "website",
"type": "string"
}
}
},
"schema.GetVoteWithPageResp": {
"type": "object",
"properties": {
@ -9068,6 +8963,111 @@
}
}
},
"schema.UserLoginResp": {
"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": {
"description": "email",
"type": "string"
},
"follow_count": {
"description": "follow count",
"type": "integer"
},
"have_password": {
"description": "user have password",
"type": "boolean"
},
"id": {
"description": "user id",
"type": "string"
},
"ip_info": {
"description": "ip info",
"type": "string"
},
"language": {
"description": "language",
"type": "string"
},
"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"
},
"role_id": {
"description": "role id",
"type": "integer"
},
"status": {
"description": "user status",
"type": "string"
},
"username": {
"description": "username",
"type": "string"
},
"website": {
"description": "website",
"type": "string"
}
}
},
"schema.UserModifyPasswordReq": {
"type": "object",
"required": [

View File

@ -526,6 +526,82 @@ definitions:
description: user vote amount
type: integer
type: object
schema.GetCurrentLoginUserInfoResp:
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
have_password:
type: boolean
id:
description: user id
type: string
ip_info:
description: ip info
type: string
language:
description: language
type: string
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
role_id:
description: role id
type: integer
status:
description: user status
type: string
username:
description: username
type: string
website:
description: website
type: string
type: object
schema.GetFollowingTagsResp:
properties:
display_name:
@ -655,7 +731,7 @@ definitions:
selected_level:
type: integer
type: object
schema.GetRankPersonalWithPageResp:
schema.GetRankPersonalPageResp:
properties:
answer_id:
description: answer id
@ -915,160 +991,6 @@ definitions:
description: username
type: string
type: object
schema.GetUserResp:
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:
description: email
type: string
follow_count:
description: follow count
type: integer
have_password:
description: user have password
type: boolean
id:
description: user id
type: string
ip_info:
description: ip info
type: string
language:
description: language
type: string
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
role_id:
description: role id
type: integer
status:
description: user status
type: string
username:
description: username
type: string
website:
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
have_password:
type: boolean
id:
description: user id
type: string
ip_info:
description: ip info
type: string
language:
description: language
type: string
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
role_id:
description: role id
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:
@ -2134,6 +2056,84 @@ definitions:
- e_mail
- pass
type: object
schema.UserLoginResp:
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:
description: email
type: string
follow_count:
description: follow count
type: integer
have_password:
description: user have password
type: boolean
id:
description: user id
type: string
ip_info:
description: ip info
type: string
language:
description: language
type: string
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
role_id:
description: role id
type: integer
status:
description: user status
type: string
username:
description: username
type: string
website:
description: website
type: string
type: object
schema.UserModifyPasswordReq:
properties:
captcha_code:
@ -4325,7 +4325,7 @@ paths:
- properties:
list:
items:
$ref: '#/definitions/schema.GetRankPersonalWithPageResp'
$ref: '#/definitions/schema.GetRankPersonalPageResp'
type: array
type: object
type: object
@ -5355,7 +5355,7 @@ paths:
- $ref: '#/definitions/handler.RespBody'
- properties:
data:
$ref: '#/definitions/schema.GetUserResp'
$ref: '#/definitions/schema.UserLoginResp'
type: object
summary: UserVerifyEmail
tags:
@ -5404,7 +5404,7 @@ paths:
- $ref: '#/definitions/handler.RespBody'
- properties:
data:
$ref: '#/definitions/schema.GetUserToSetShowResp'
$ref: '#/definitions/schema.GetCurrentLoginUserInfoResp'
type: object
security:
- ApiKeyAuth: []
@ -5518,7 +5518,7 @@ paths:
- $ref: '#/definitions/handler.RespBody'
- properties:
data:
$ref: '#/definitions/schema.GetUserResp'
$ref: '#/definitions/schema.UserLoginResp'
type: object
summary: UserEmailLogin
tags:
@ -5672,7 +5672,7 @@ paths:
- $ref: '#/definitions/handler.RespBody'
- properties:
data:
$ref: '#/definitions/schema.GetUserResp'
$ref: '#/definitions/schema.UserLoginResp'
type: object
summary: UserRegisterCaptcha
tags:
@ -5699,7 +5699,7 @@ paths:
- $ref: '#/definitions/handler.RespBody'
- properties:
data:
$ref: '#/definitions/schema.GetUserResp'
$ref: '#/definitions/schema.UserLoginResp'
type: object
summary: UserRegisterByEmail
tags: