docs: 重新生成 swagger 接口文档
This commit is contained in:
+693
-963
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,485 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "",
|
||||
"version": ""
|
||||
},
|
||||
"schemes": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/api/v1/disputes": {
|
||||
"get": {
|
||||
"summary": "获取争议列表",
|
||||
"operationId": "ListDisputes",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/DisputeListResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"dispute"
|
||||
],
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/disputes/{id}/appeal": {
|
||||
"post": {
|
||||
"summary": "申诉",
|
||||
"operationId": "AppealDispute",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EmptyResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/AppealReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"dispute"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/disputes/{id}/response": {
|
||||
"post": {
|
||||
"summary": "回应争议",
|
||||
"operationId": "RespondDispute",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EmptyResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/DisputeResponseReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"dispute"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/orders/{id}/dispute": {
|
||||
"get": {
|
||||
"summary": "获取订单争议",
|
||||
"operationId": "GetOrderDispute",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Dispute"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"dispute"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"summary": "发起争议",
|
||||
"operationId": "CreateDispute",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EmptyResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/CreateDisputeReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"dispute"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"AppealReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"reason": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "AppealReq",
|
||||
"required": [
|
||||
"reason"
|
||||
]
|
||||
},
|
||||
"CreateDisputeReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"title": "CreateDisputeReq",
|
||||
"required": [
|
||||
"reason",
|
||||
"evidence"
|
||||
]
|
||||
},
|
||||
"Dispute": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"orderId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"initiatorId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"initiatorName": {
|
||||
"type": "string"
|
||||
},
|
||||
"respondentId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"result": {
|
||||
"type": "string"
|
||||
},
|
||||
"respondentReason": {
|
||||
"type": "string"
|
||||
},
|
||||
"respondentEvidence": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"appealReason": {
|
||||
"type": "string"
|
||||
},
|
||||
"appealedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolvedBy": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"resolvedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "Dispute",
|
||||
"required": [
|
||||
"id",
|
||||
"orderId",
|
||||
"initiatorId",
|
||||
"initiatorName",
|
||||
"respondentId",
|
||||
"reason",
|
||||
"evidence",
|
||||
"status",
|
||||
"respondentEvidence",
|
||||
"createdAt",
|
||||
"updatedAt"
|
||||
]
|
||||
},
|
||||
"DisputeListReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "DisputeListReq"
|
||||
},
|
||||
"DisputeListResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Dispute"
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/PageMeta"
|
||||
}
|
||||
},
|
||||
"title": "DisputeListResp",
|
||||
"required": [
|
||||
"items",
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
"DisputePathId": {
|
||||
"type": "object",
|
||||
"title": "DisputePathId"
|
||||
},
|
||||
"DisputeResponseReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"title": "DisputeResponseReq",
|
||||
"required": [
|
||||
"reason",
|
||||
"evidence"
|
||||
]
|
||||
},
|
||||
"EmptyResp": {
|
||||
"type": "object",
|
||||
"title": "EmptyResp"
|
||||
},
|
||||
"PageMeta": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
"title": "PageMeta",
|
||||
"required": [
|
||||
"total",
|
||||
"offset",
|
||||
"limit"
|
||||
]
|
||||
},
|
||||
"PageReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
}
|
||||
},
|
||||
"title": "PageReq",
|
||||
"required": [
|
||||
"offset",
|
||||
"limit"
|
||||
]
|
||||
},
|
||||
"SimpleUser": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "SimpleUser",
|
||||
"required": [
|
||||
"id",
|
||||
"nickname",
|
||||
"avatar"
|
||||
]
|
||||
},
|
||||
"UserProfile": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"description": " consumer, player, owner, admin"
|
||||
},
|
||||
"verifiedRoles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"verificationStatus": {
|
||||
"type": "object"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
},
|
||||
"bio": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "UserProfile",
|
||||
"required": [
|
||||
"id",
|
||||
"username",
|
||||
"nickname",
|
||||
"avatar",
|
||||
"role",
|
||||
"verifiedRoles",
|
||||
"verificationStatus",
|
||||
"createdAt"
|
||||
]
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"apiKey": {
|
||||
"type": "apiKey",
|
||||
"description": "Enter JWT Bearer token **_only_**",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}
|
||||
+100
-83
@@ -1,121 +1,138 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "",
|
||||
"version": "1.0"
|
||||
},
|
||||
"schemes": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"version": "1.0"
|
||||
},
|
||||
"basePath": "/",
|
||||
"paths": {
|
||||
"/api/v1/auth/forgot-password/send": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "忘记密码-发送验证码",
|
||||
"operationId": "emailForgotPassword",
|
||||
"operationId": "ForgotPassword",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EmptyResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"email"
|
||||
],
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/ForgotPasswordReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
"tags": [
|
||||
"email"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/email/verification-code/send": {
|
||||
"post": {
|
||||
"description": "向用户邮箱发送验证码,支持注册、登录、重置密码、绑定邮箱等场景",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "发送邮箱验证码",
|
||||
"operationId": "emailSendVerificationCode",
|
||||
"description": "向用户邮箱发送验证码,支持注册、登录、重置密码、绑定邮箱等场景",
|
||||
"operationId": "SendVerificationCode",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/SendVerificationCodeResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"email",
|
||||
"scene"
|
||||
],
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"scene": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/SendVerificationCodeReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"expireInSec": {
|
||||
"type": "integer"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"requestId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"tags": [
|
||||
"email"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-date": "2026-04-22 22:30:26",
|
||||
"x-description": "This is a goctl generated swagger file.",
|
||||
"x-github": "https://github.com/zeromicro/go-zero",
|
||||
"x-go-zero-doc": "https://go-zero.dev/",
|
||||
"x-goctl-version": "1.10.1"
|
||||
"definitions": {
|
||||
"EmptyResp": {
|
||||
"type": "object",
|
||||
"title": "EmptyResp"
|
||||
},
|
||||
"ForgotPasswordReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "ForgotPasswordReq",
|
||||
"required": [
|
||||
"email"
|
||||
]
|
||||
},
|
||||
"SendVerificationCodeReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"scene": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "SendVerificationCodeReq",
|
||||
"required": [
|
||||
"email",
|
||||
"required",
|
||||
"scene"
|
||||
]
|
||||
},
|
||||
"SendVerificationCodeResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"requestId": {
|
||||
"type": "string"
|
||||
},
|
||||
"expireInSec": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "SendVerificationCodeResp",
|
||||
"required": [
|
||||
"requestId",
|
||||
"expireInSec",
|
||||
"message"
|
||||
]
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"apiKey": {
|
||||
"type": "apiKey",
|
||||
"description": "Enter JWT Bearer token **_only_**",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}
|
||||
+240
-172
@@ -1,213 +1,281 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "",
|
||||
"version": ""
|
||||
},
|
||||
"schemes": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"version": "1.0"
|
||||
},
|
||||
"basePath": "/",
|
||||
"paths": {
|
||||
"/api/v1/games": {
|
||||
"/api/v1/games/": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取游戏列表",
|
||||
"operationId": "gameListGames",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"example": 0,
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 20,
|
||||
"example": 20,
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"operationId": "ListGames",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"icon",
|
||||
"category"
|
||||
],
|
||||
"properties": {
|
||||
"category": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"total",
|
||||
"offset",
|
||||
"limit"
|
||||
],
|
||||
"properties": {
|
||||
"limit": {
|
||||
"type": "integer"
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/GameListResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"game"
|
||||
],
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "创建游戏",
|
||||
"operationId": "gameCreateGame",
|
||||
"operationId": "CreateGame",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Game"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"icon",
|
||||
"category"
|
||||
],
|
||||
"properties": {
|
||||
"category": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/Game"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"category": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"tags": [
|
||||
"game"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/games/{id}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取游戏详情",
|
||||
"operationId": "gameGetGame",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"operationId": "GetGame",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"category": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/Game"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"game"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-date": "2026-04-22 22:30:23",
|
||||
"x-description": "This is a goctl generated swagger file.",
|
||||
"x-github": "https://github.com/zeromicro/go-zero",
|
||||
"x-go-zero-doc": "https://go-zero.dev/",
|
||||
"x-goctl-version": "1.10.1"
|
||||
"definitions": {
|
||||
"EmptyResp": {
|
||||
"type": "object",
|
||||
"title": "EmptyResp"
|
||||
},
|
||||
"Game": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
"category": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "Game",
|
||||
"required": [
|
||||
"name",
|
||||
"icon",
|
||||
"category"
|
||||
]
|
||||
},
|
||||
"GameListResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Game"
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/PageMeta"
|
||||
}
|
||||
},
|
||||
"title": "GameListResp",
|
||||
"required": [
|
||||
"items",
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
"GetGameReq": {
|
||||
"type": "object",
|
||||
"title": "GetGameReq"
|
||||
},
|
||||
"PageMeta": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
"title": "PageMeta",
|
||||
"required": [
|
||||
"total",
|
||||
"offset",
|
||||
"limit"
|
||||
]
|
||||
},
|
||||
"PageReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
}
|
||||
},
|
||||
"title": "PageReq",
|
||||
"required": [
|
||||
"offset",
|
||||
"limit"
|
||||
]
|
||||
},
|
||||
"SimpleUser": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "SimpleUser",
|
||||
"required": [
|
||||
"id",
|
||||
"nickname",
|
||||
"avatar"
|
||||
]
|
||||
},
|
||||
"UserProfile": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"description": " consumer, player, owner, admin"
|
||||
},
|
||||
"verifiedRoles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"verificationStatus": {
|
||||
"type": "object"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
},
|
||||
"bio": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "UserProfile",
|
||||
"required": [
|
||||
"id",
|
||||
"username",
|
||||
"nickname",
|
||||
"avatar",
|
||||
"role",
|
||||
"verifiedRoles",
|
||||
"verificationStatus",
|
||||
"createdAt"
|
||||
]
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"apiKey": {
|
||||
"type": "apiKey",
|
||||
"description": "Enter JWT Bearer token **_only_**",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,305 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "",
|
||||
"version": ""
|
||||
},
|
||||
"schemes": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/api/v1/notifications": {
|
||||
"get": {
|
||||
"summary": "获取通知列表",
|
||||
"operationId": "ListNotifications",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/NotificationListResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"notification"
|
||||
],
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/notifications/read-all": {
|
||||
"put": {
|
||||
"summary": "全部已读",
|
||||
"operationId": "ReadAllNotifications",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EmptyResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"description": " 空响应",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EmptyResp"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"notification"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/notifications/{id}/read": {
|
||||
"put": {
|
||||
"summary": "标记已读",
|
||||
"operationId": "ReadNotification",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EmptyResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/PathId"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"notification"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"EmptyResp": {
|
||||
"type": "object",
|
||||
"title": "EmptyResp"
|
||||
},
|
||||
"Notification": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"read": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"link": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "Notification",
|
||||
"required": [
|
||||
"id",
|
||||
"type",
|
||||
"title",
|
||||
"content",
|
||||
"read",
|
||||
"createdAt"
|
||||
]
|
||||
},
|
||||
"NotificationListResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Notification"
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/PageMeta"
|
||||
}
|
||||
},
|
||||
"title": "NotificationListResp",
|
||||
"required": [
|
||||
"items",
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
"PageMeta": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
"title": "PageMeta",
|
||||
"required": [
|
||||
"total",
|
||||
"offset",
|
||||
"limit"
|
||||
]
|
||||
},
|
||||
"PageReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
}
|
||||
},
|
||||
"title": "PageReq",
|
||||
"required": [
|
||||
"offset",
|
||||
"limit"
|
||||
]
|
||||
},
|
||||
"PathId": {
|
||||
"type": "object",
|
||||
"title": "PathId"
|
||||
},
|
||||
"SimpleUser": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "SimpleUser",
|
||||
"required": [
|
||||
"id",
|
||||
"nickname",
|
||||
"avatar"
|
||||
]
|
||||
},
|
||||
"UserProfile": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"description": " consumer, player, owner, admin"
|
||||
},
|
||||
"verifiedRoles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"verificationStatus": {
|
||||
"type": "object"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
},
|
||||
"bio": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "UserProfile",
|
||||
"required": [
|
||||
"id",
|
||||
"username",
|
||||
"nickname",
|
||||
"avatar",
|
||||
"role",
|
||||
"verifiedRoles",
|
||||
"verificationStatus",
|
||||
"createdAt"
|
||||
]
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"apiKey": {
|
||||
"type": "apiKey",
|
||||
"description": "Enter JWT Bearer token **_only_**",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,95 +1,132 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "文件服务",
|
||||
"description": "处理文件上传与获取",
|
||||
"version": "v1"
|
||||
},
|
||||
"schemes": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "文件服务",
|
||||
"version": "v1"
|
||||
},
|
||||
"basePath": "/",
|
||||
"paths": {
|
||||
"/api/v1/files": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "文件获取接口 (如果是私有文件,通过此接口获取或重定向)",
|
||||
"operationId": "fileGetFile",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "key",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"operationId": "GetFile",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"description": "A successful response.",
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "key",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"file"
|
||||
],
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/upload": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/x-www-form-urlencoded"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "文件上传接口",
|
||||
"operationId": "fileUpload",
|
||||
"parameters": [
|
||||
{
|
||||
"enum": [
|
||||
"avatar",
|
||||
"chat",
|
||||
"post",
|
||||
"verification",
|
||||
"dispute"
|
||||
],
|
||||
"type": "string",
|
||||
"description": "文件类型限制",
|
||||
"name": "type",
|
||||
"in": "formData",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"operationId": "Upload",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {
|
||||
"description": "返回 CDN 地址或访问地址",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/UploadResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"description": " 上传请求参数(File文件流在Handler中通过 r.FormFile 获取)",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/UploadReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"file"
|
||||
],
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-date": "2026-04-22 22:30:27",
|
||||
"x-description": "This is a goctl generated swagger file.",
|
||||
"x-github": "https://github.com/zeromicro/go-zero",
|
||||
"x-go-zero-doc": "https://go-zero.dev/",
|
||||
"x-goctl-version": "1.10.1"
|
||||
"definitions": {
|
||||
"GetFileReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "GetFileReq",
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
},
|
||||
"UploadReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"avatar",
|
||||
"chat",
|
||||
"post",
|
||||
"verification",
|
||||
"dispute"
|
||||
],
|
||||
"description": " 文件类型限制"
|
||||
}
|
||||
},
|
||||
"title": "UploadReq",
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
"UploadResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": " 返回 CDN 地址或访问地址"
|
||||
}
|
||||
},
|
||||
"title": "UploadResp",
|
||||
"required": [
|
||||
"url"
|
||||
]
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"apiKey": {
|
||||
"type": "apiKey",
|
||||
"description": "Enter JWT Bearer token **_only_**",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}
|
||||
+560
-774
File diff suppressed because it is too large
Load Diff
+660
-1024
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,401 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "",
|
||||
"version": ""
|
||||
},
|
||||
"schemes": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/api/v1/orders/{id}/review": {
|
||||
"post": {
|
||||
"summary": "提交评价",
|
||||
"operationId": "SubmitReview",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EmptyResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/SubmitReviewReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"review"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/orders/{id}/reviews": {
|
||||
"get": {
|
||||
"summary": "获取订单评价",
|
||||
"operationId": "GetOrderReviews",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ReviewListResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"review"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/reviews": {
|
||||
"get": {
|
||||
"summary": "获取公开评价列表",
|
||||
"operationId": "ListReviews",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ReviewListResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"review"
|
||||
],
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/users/{id}/reviews": {
|
||||
"get": {
|
||||
"summary": "获取用户收到的评价",
|
||||
"operationId": "ListUserReviews",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ReviewListResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"review"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"EmptyResp": {
|
||||
"type": "object",
|
||||
"title": "EmptyResp"
|
||||
},
|
||||
"GetOrderReviewsReq": {
|
||||
"type": "object",
|
||||
"title": "GetOrderReviewsReq"
|
||||
},
|
||||
"ListUserReviewsReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
}
|
||||
},
|
||||
"title": "ListUserReviewsReq"
|
||||
},
|
||||
"PageMeta": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
"title": "PageMeta",
|
||||
"required": [
|
||||
"total",
|
||||
"offset",
|
||||
"limit"
|
||||
]
|
||||
},
|
||||
"PageReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
}
|
||||
},
|
||||
"title": "PageReq",
|
||||
"required": [
|
||||
"offset",
|
||||
"limit"
|
||||
]
|
||||
},
|
||||
"Review": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"orderId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"fromUserId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"fromUserName": {
|
||||
"type": "string"
|
||||
},
|
||||
"rating": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"sealed": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "Review",
|
||||
"required": [
|
||||
"id",
|
||||
"orderId",
|
||||
"fromUserId",
|
||||
"fromUserName",
|
||||
"rating",
|
||||
"content",
|
||||
"sealed",
|
||||
"createdAt"
|
||||
]
|
||||
},
|
||||
"ReviewListResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Review"
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/PageMeta"
|
||||
}
|
||||
},
|
||||
"title": "ReviewListResp",
|
||||
"required": [
|
||||
"items",
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
"ReviewPathId": {
|
||||
"type": "object",
|
||||
"title": "ReviewPathId"
|
||||
},
|
||||
"SimpleUser": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "SimpleUser",
|
||||
"required": [
|
||||
"id",
|
||||
"nickname",
|
||||
"avatar"
|
||||
]
|
||||
},
|
||||
"SubmitReviewReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rating": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "SubmitReviewReq",
|
||||
"required": [
|
||||
"rating"
|
||||
]
|
||||
},
|
||||
"UserProfile": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"description": " consumer, player, owner, admin"
|
||||
},
|
||||
"verifiedRoles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"verificationStatus": {
|
||||
"type": "object"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
},
|
||||
"bio": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "UserProfile",
|
||||
"required": [
|
||||
"id",
|
||||
"username",
|
||||
"nickname",
|
||||
"avatar",
|
||||
"role",
|
||||
"verifiedRoles",
|
||||
"verificationStatus",
|
||||
"createdAt"
|
||||
]
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"apiKey": {
|
||||
"type": "apiKey",
|
||||
"description": "Enter JWT Bearer token **_only_**",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,549 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "",
|
||||
"version": ""
|
||||
},
|
||||
"schemes": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/api/v1/favorites": {
|
||||
"get": {
|
||||
"summary": "获取收藏列表",
|
||||
"operationId": "ListFavorites",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/FavoriteListResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"favorites"
|
||||
],
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"summary": "添加收藏",
|
||||
"operationId": "AddFavorite",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EmptyResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/FavoriteReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"favorites"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/favorites/{id}": {
|
||||
"delete": {
|
||||
"summary": "取消收藏",
|
||||
"operationId": "RemoveFavorite",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EmptyResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/PathIDReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"favorites"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/recommendations/home": {
|
||||
"get": {
|
||||
"summary": "首页推荐",
|
||||
"operationId": "Recommendations",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/SearchResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"search"
|
||||
],
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/search": {
|
||||
"get": {
|
||||
"summary": "统一搜索",
|
||||
"operationId": "Search",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/SearchResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
},
|
||||
{
|
||||
"name": "q",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "min",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
{
|
||||
"name": "max",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
{
|
||||
"name": "onlyOnline",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "sort",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"search"
|
||||
],
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/users/{id}/favorites/check": {
|
||||
"get": {
|
||||
"summary": "检查收藏状态",
|
||||
"operationId": "CheckFavorite",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/FavoriteCheckResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
{
|
||||
"name": "targetType",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "targetId",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"favorites"
|
||||
],
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"EmptyResp": {
|
||||
"type": "object",
|
||||
"title": "EmptyResp"
|
||||
},
|
||||
"Favorite": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"userId": {
|
||||
"type": "string"
|
||||
},
|
||||
"targetType": {
|
||||
"type": "string"
|
||||
},
|
||||
"targetId": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "Favorite",
|
||||
"required": [
|
||||
"id",
|
||||
"userId",
|
||||
"targetType",
|
||||
"targetId",
|
||||
"createdAt"
|
||||
]
|
||||
},
|
||||
"FavoriteCheckReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"targetType": {
|
||||
"type": "string"
|
||||
},
|
||||
"targetId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "FavoriteCheckReq",
|
||||
"required": [
|
||||
"targetType",
|
||||
"targetId"
|
||||
]
|
||||
},
|
||||
"FavoriteCheckResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"favorited": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
},
|
||||
"title": "FavoriteCheckResp",
|
||||
"required": [
|
||||
"favorited"
|
||||
]
|
||||
},
|
||||
"FavoriteListResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Favorite"
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/PageMeta"
|
||||
}
|
||||
},
|
||||
"title": "FavoriteListResp",
|
||||
"required": [
|
||||
"items",
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
"FavoriteReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"targetType": {
|
||||
"type": "string",
|
||||
"description": " player, shop"
|
||||
},
|
||||
"targetId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "FavoriteReq",
|
||||
"required": [
|
||||
"targetType",
|
||||
"targetId"
|
||||
]
|
||||
},
|
||||
"PageMeta": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
"title": "PageMeta",
|
||||
"required": [
|
||||
"total",
|
||||
"offset",
|
||||
"limit"
|
||||
]
|
||||
},
|
||||
"PageReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
}
|
||||
},
|
||||
"title": "PageReq",
|
||||
"required": [
|
||||
"offset",
|
||||
"limit"
|
||||
]
|
||||
},
|
||||
"PathIDReq": {
|
||||
"type": "object",
|
||||
"title": "PathIDReq"
|
||||
},
|
||||
"SearchReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
},
|
||||
"q": {
|
||||
"type": "string"
|
||||
},
|
||||
"min": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"max": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"onlyOnline": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"sort": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "SearchReq"
|
||||
},
|
||||
"SearchResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object"
|
||||
},
|
||||
"description": " Mixed items"
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/PageMeta"
|
||||
}
|
||||
},
|
||||
"title": "SearchResp",
|
||||
"required": [
|
||||
"items",
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
"SimpleUser": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "SimpleUser",
|
||||
"required": [
|
||||
"id",
|
||||
"nickname",
|
||||
"avatar"
|
||||
]
|
||||
},
|
||||
"UserProfile": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"description": " consumer, player, owner, admin"
|
||||
},
|
||||
"verifiedRoles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"verificationStatus": {
|
||||
"type": "object"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
},
|
||||
"bio": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "UserProfile",
|
||||
"required": [
|
||||
"id",
|
||||
"username",
|
||||
"nickname",
|
||||
"avatar",
|
||||
"role",
|
||||
"verifiedRoles",
|
||||
"verificationStatus",
|
||||
"createdAt"
|
||||
]
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"apiKey": {
|
||||
"type": "apiKey",
|
||||
"description": "Enter JWT Bearer token **_only_**",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}
|
||||
+714
-958
File diff suppressed because it is too large
Load Diff
+864
-1013
File diff suppressed because it is too large
Load Diff
+281
-176
@@ -1,234 +1,339 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "钱包服务",
|
||||
"description": "处理钱包充值相关",
|
||||
"version": "1.0"
|
||||
},
|
||||
"schemes": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "钱包服务",
|
||||
"version": "1.0"
|
||||
},
|
||||
"basePath": "/",
|
||||
"paths": {
|
||||
"/api/v1/wallet/balance": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取余额",
|
||||
"operationId": "walletGetBalance",
|
||||
"operationId": "GetBalance",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"balance": {
|
||||
"type": "string"
|
||||
},
|
||||
"frozenBalance": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/WalletBalance"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"wallet"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/wallet/topup": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "充值",
|
||||
"operationId": "walletTopup",
|
||||
"operationId": "Topup",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EmptyResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"amount",
|
||||
"method"
|
||||
],
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "string"
|
||||
},
|
||||
"method": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/TopupReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
"tags": [
|
||||
"wallet"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/wallet/transactions": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取流水",
|
||||
"operationId": "walletListTransactions",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"example": 0,
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 20,
|
||||
"example": 20,
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"operationId": "ListTransactions",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"type",
|
||||
"amount",
|
||||
"description",
|
||||
"createdAt"
|
||||
],
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"orderId": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"total",
|
||||
"offset",
|
||||
"limit"
|
||||
],
|
||||
"properties": {
|
||||
"limit": {
|
||||
"type": "integer"
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/TransactionListResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"wallet"
|
||||
],
|
||||
"consumes": [
|
||||
"multipart/form-data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/wallet/withdraw": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "提现",
|
||||
"operationId": "walletWithdraw",
|
||||
"operationId": "Withdraw",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EmptyResp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"amount",
|
||||
"method"
|
||||
],
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "string"
|
||||
},
|
||||
"method": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/TopupReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
"tags": [
|
||||
"wallet"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-date": "2026-04-22 22:30:25",
|
||||
"x-description": "This is a goctl generated swagger file.",
|
||||
"x-github": "https://github.com/zeromicro/go-zero",
|
||||
"x-go-zero-doc": "https://go-zero.dev/",
|
||||
"x-goctl-version": "1.10.1"
|
||||
"definitions": {
|
||||
"EmptyResp": {
|
||||
"type": "object",
|
||||
"title": "EmptyResp"
|
||||
},
|
||||
"PageMeta": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
"title": "PageMeta",
|
||||
"required": [
|
||||
"total",
|
||||
"offset",
|
||||
"limit"
|
||||
]
|
||||
},
|
||||
"PageReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "0"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": "20"
|
||||
}
|
||||
},
|
||||
"title": "PageReq",
|
||||
"required": [
|
||||
"offset",
|
||||
"limit"
|
||||
]
|
||||
},
|
||||
"SimpleUser": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "SimpleUser",
|
||||
"required": [
|
||||
"id",
|
||||
"nickname",
|
||||
"avatar"
|
||||
]
|
||||
},
|
||||
"TopupReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "string"
|
||||
},
|
||||
"method": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "TopupReq",
|
||||
"required": [
|
||||
"amount",
|
||||
"method"
|
||||
]
|
||||
},
|
||||
"Transaction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"amount": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"orderId": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "Transaction",
|
||||
"required": [
|
||||
"id",
|
||||
"type",
|
||||
"amount",
|
||||
"description",
|
||||
"createdAt"
|
||||
]
|
||||
},
|
||||
"TransactionListResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Transaction"
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/PageMeta"
|
||||
}
|
||||
},
|
||||
"title": "TransactionListResp",
|
||||
"required": [
|
||||
"items",
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
"UserProfile": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"description": " consumer, player, owner, admin"
|
||||
},
|
||||
"verifiedRoles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"verificationStatus": {
|
||||
"type": "object"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
},
|
||||
"bio": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "UserProfile",
|
||||
"required": [
|
||||
"id",
|
||||
"username",
|
||||
"nickname",
|
||||
"avatar",
|
||||
"role",
|
||||
"verifiedRoles",
|
||||
"verificationStatus",
|
||||
"createdAt"
|
||||
]
|
||||
},
|
||||
"WalletBalance": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"balance": {
|
||||
"type": "string"
|
||||
},
|
||||
"frozenBalance": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "WalletBalance",
|
||||
"required": [
|
||||
"balance",
|
||||
"frozenBalance"
|
||||
]
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"apiKey": {
|
||||
"type": "apiKey",
|
||||
"description": "Enter JWT Bearer token **_only_**",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user