docs: 重新生成 swagger 接口文档

This commit is contained in:
zetaloop
2026-05-03 19:03:09 +08:00
parent 164f98cf33
commit 44c73e787f
13 changed files with 5963 additions and 5237 deletions
+282 -177
View File
@@ -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"
}
}
}