Mod user other api swagger docs
All checks were successful
Client CMS Check Build (NixCN CMS) TeamCity build finished
Backend Check Build (NixCN CMS) TeamCity build finished

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-01-31 08:33:12 +08:00
parent 1d885feb1f
commit 392a15c849
4 changed files with 268 additions and 5 deletions

View File

@@ -968,6 +968,100 @@ const docTemplate = `{
}
},
"/user/info": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Fetches the complete profile data for the user associated with the provided session/token.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "Get My User Information",
"responses": {
"200": {
"description": "Successful profile retrieval",
"schema": {
"allOf": [
{
"$ref": "#/definitions/utils.RespStatus"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_user.UserInfoData"
}
}
}
]
}
},
"403": {
"description": "Missing User ID / Unauthorized",
"schema": {
"allOf": [
{
"$ref": "#/definitions/utils.RespStatus"
},
{
"type": "object",
"properties": {
"data": {
"type": "object"
}
}
}
]
}
},
"404": {
"description": "User Not Found",
"schema": {
"allOf": [
{
"$ref": "#/definitions/utils.RespStatus"
},
{
"type": "object",
"properties": {
"data": {
"type": "object"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error (UUID Parse Failed)",
"schema": {
"allOf": [
{
"$ref": "#/definitions/utils.RespStatus"
},
{
"type": "object",
"properties": {
"data": {
"type": "object"
}
}
}
]
}
}
}
}
},
"/user/info/{user_id}": {
"get": {
"security": [
{
@@ -985,6 +1079,15 @@ const docTemplate = `{
"User"
],
"summary": "Get Other User Information",
"parameters": [
{
"type": "string",
"description": "Other user id",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Successful profile retrieval",

View File

@@ -966,6 +966,100 @@
}
},
"/user/info": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Fetches the complete profile data for the user associated with the provided session/token.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "Get My User Information",
"responses": {
"200": {
"description": "Successful profile retrieval",
"schema": {
"allOf": [
{
"$ref": "#/definitions/utils.RespStatus"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_user.UserInfoData"
}
}
}
]
}
},
"403": {
"description": "Missing User ID / Unauthorized",
"schema": {
"allOf": [
{
"$ref": "#/definitions/utils.RespStatus"
},
{
"type": "object",
"properties": {
"data": {
"type": "object"
}
}
}
]
}
},
"404": {
"description": "User Not Found",
"schema": {
"allOf": [
{
"$ref": "#/definitions/utils.RespStatus"
},
{
"type": "object",
"properties": {
"data": {
"type": "object"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error (UUID Parse Failed)",
"schema": {
"allOf": [
{
"$ref": "#/definitions/utils.RespStatus"
},
{
"type": "object",
"properties": {
"data": {
"type": "object"
}
}
}
]
}
}
}
}
},
"/user/info/{user_id}": {
"get": {
"security": [
{
@@ -983,6 +1077,15 @@
"User"
],
"summary": "Get Other User Information",
"parameters": [
{
"type": "string",
"description": "Other user id",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Successful profile retrieval",

View File

@@ -718,6 +718,62 @@ paths:
type: object
security:
- ApiKeyAuth: []
summary: Get My User Information
tags:
- User
/user/info/{user_id}:
get:
consumes:
- application/json
description: Fetches the complete profile data for the user associated with
the provided session/token.
parameters:
- description: Other user id
in: path
name: user_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Successful profile retrieval
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
$ref: '#/definitions/service_user.UserInfoData'
type: object
"403":
description: Missing User ID / Unauthorized
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
type: object
type: object
"404":
description: User Not Found
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
type: object
type: object
"500":
description: Internal Server Error (UUID Parse Failed)
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
type: object
type: object
security:
- ApiKeyAuth: []
summary: Get Other User Information
tags:
- User