update tests and doc
This commit is contained in:
@@ -8,6 +8,399 @@ servers:
|
||||
url: /api/v1
|
||||
description: 'API v1'
|
||||
paths:
|
||||
/api/v1/dashboard/overview:
|
||||
get:
|
||||
tags:
|
||||
- Dashboard
|
||||
summary: 获取概览统计
|
||||
description: 返回今日/本周/本月的成功和失败同步数,以及按数据类型的本月分组统计。
|
||||
operationId: 867e0544fefdad33775c25bb6188d484
|
||||
responses:
|
||||
'200':
|
||||
description: 获取成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
code: { type: integer, example: 0 }
|
||||
message: { type: string, example: 获取成功 }
|
||||
data: { $ref: '#/components/schemas/DashboardOverview' }
|
||||
type: object
|
||||
'401':
|
||||
description: 未认证
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'403':
|
||||
description: 无权限
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
/api/v1/dashboard/trend:
|
||||
get:
|
||||
tags:
|
||||
- Dashboard
|
||||
summary: 获取趋势数据
|
||||
description: 返回指定时间范围内按日/周/月聚合的成功和失败同步趋势。
|
||||
operationId: d3850b6a1ce1436c8ddf4b92fc0b7e44
|
||||
parameters:
|
||||
-
|
||||
name: from
|
||||
in: query
|
||||
description: 起始日期(默认30天前)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date
|
||||
example: '2026-02-15'
|
||||
-
|
||||
name: to
|
||||
in: query
|
||||
description: 结束日期(默认今天)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date
|
||||
example: '2026-03-17'
|
||||
-
|
||||
name: group_by
|
||||
in: query
|
||||
description: 聚合粒度
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
default: day
|
||||
enum:
|
||||
- day
|
||||
- week
|
||||
- month
|
||||
-
|
||||
name: data_type
|
||||
in: query
|
||||
description: 数据类型筛选
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- order
|
||||
- product
|
||||
- refund
|
||||
- inventory
|
||||
responses:
|
||||
'200':
|
||||
description: 获取成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
code: { type: integer, example: 0 }
|
||||
message: { type: string, example: 获取成功 }
|
||||
data: { type: array, items: { $ref: '#/components/schemas/DashboardTrendItem' } }
|
||||
type: object
|
||||
'400':
|
||||
description: 参数错误
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'401':
|
||||
description: 未认证
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'403':
|
||||
description: 无权限
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
/api/v1/dashboard/breakdown:
|
||||
get:
|
||||
tags:
|
||||
- Dashboard
|
||||
summary: 获取分组统计
|
||||
description: 按公司/平台/店铺维度统计成功和失败同步数。
|
||||
operationId: 91349b224bcf13f440df27de0a198f54
|
||||
parameters:
|
||||
-
|
||||
name: dimension
|
||||
in: query
|
||||
description: 分组维度
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- company
|
||||
- platform
|
||||
- store
|
||||
-
|
||||
name: from
|
||||
in: query
|
||||
description: 起始日期(默认今天)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date
|
||||
example: '2026-03-17'
|
||||
-
|
||||
name: to
|
||||
in: query
|
||||
description: 结束日期(默认今天)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date
|
||||
example: '2026-03-17'
|
||||
-
|
||||
name: data_type
|
||||
in: query
|
||||
description: 数据类型筛选
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- order
|
||||
- product
|
||||
- refund
|
||||
- inventory
|
||||
responses:
|
||||
'200':
|
||||
description: 获取成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
code: { type: integer, example: 0 }
|
||||
message: { type: string, example: 获取成功 }
|
||||
data: { type: array, items: { $ref: '#/components/schemas/DashboardBreakdownItem' } }
|
||||
type: object
|
||||
'400':
|
||||
description: 参数错误
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'401':
|
||||
description: 未认证
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'403':
|
||||
description: 无权限
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
/api/v1/failed-messages:
|
||||
get:
|
||||
tags:
|
||||
- 'Failed Messages'
|
||||
summary: 失败消息列表
|
||||
description: '获取 Consumer 处理失败的消息列表,支持分页、按数据类型/平台/时间筛选。仅 admin 可访问。'
|
||||
operationId: 6dac9bdff8b35f75565ed5c6b8638937
|
||||
parameters:
|
||||
-
|
||||
name: page
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
default: 1
|
||||
-
|
||||
name: per_page
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
default: 15
|
||||
maximum: 100
|
||||
-
|
||||
name: data_type
|
||||
in: query
|
||||
description: 数据类型精确筛选(order/product/refund)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- order
|
||||
- product
|
||||
- refund
|
||||
-
|
||||
name: platform_id
|
||||
in: query
|
||||
description: '平台 ID 精确筛选'
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
-
|
||||
name: error_type
|
||||
in: query
|
||||
description: 异常类名模糊搜索
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
-
|
||||
name: failed_at_from
|
||||
in: query
|
||||
description: 失败时间起始(含)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date
|
||||
example: '2026-01-01'
|
||||
-
|
||||
name: failed_at_to
|
||||
in: query
|
||||
description: 失败时间截止(含)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date
|
||||
example: '2026-12-31'
|
||||
responses:
|
||||
'200':
|
||||
description: 获取成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
code: { type: integer, example: 0 }
|
||||
message: { type: string, example: 获取成功 }
|
||||
data: { properties: { items: { type: array, items: { $ref: '#/components/schemas/FailedMessageList' } }, total: { type: integer, example: 100 }, page: { type: integer, example: 1 }, per_page: { type: integer, example: 15 } }, type: object }
|
||||
type: object
|
||||
'401':
|
||||
description: 未认证
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'403':
|
||||
description: 无权限
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
'/api/v1/failed-messages/{id}':
|
||||
get:
|
||||
tags:
|
||||
- 'Failed Messages'
|
||||
summary: 失败消息详情
|
||||
description: '获取失败消息详情,含完整错误堆栈和原始消息体。仅 admin 可访问。'
|
||||
operationId: 4f6b7410222ebc0fa65afdc1d168c15a
|
||||
parameters:
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: '失败消息 ID'
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
description: 获取成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
code: { type: integer, example: 0 }
|
||||
message: { type: string, example: 获取成功 }
|
||||
data: { $ref: '#/components/schemas/FailedMessageDetail' }
|
||||
type: object
|
||||
'401':
|
||||
description: 未认证
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'403':
|
||||
description: 无权限
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'404':
|
||||
description: 数据不存在
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
/api/v1/mq/status:
|
||||
get:
|
||||
tags:
|
||||
- 'MQ Status'
|
||||
summary: 获取消息队列状态
|
||||
description: '查询 RabbitMQ 各队列的消息数、消费者数和运行状态。支持按队列类型筛选。仅 admin 角色可访问。'
|
||||
operationId: 3f5b041034fafc9738ecf65f166b6193
|
||||
parameters:
|
||||
-
|
||||
name: queue
|
||||
in: query
|
||||
description: 队列类型筛选(orders/products/refunds/inventory)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- orders
|
||||
- products
|
||||
- refunds
|
||||
- inventory
|
||||
responses:
|
||||
'200':
|
||||
description: 获取成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
code: { type: integer, example: 0 }
|
||||
message: { type: string, example: 获取成功 }
|
||||
data: { $ref: '#/components/schemas/MqQueueStatus' }
|
||||
type: object
|
||||
'400':
|
||||
description: 无效的队列类型参数
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'401':
|
||||
description: 未认证
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'403':
|
||||
description: 无权限
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'500':
|
||||
description: 'RabbitMQ 连接异常'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
/orders:
|
||||
get:
|
||||
tags:
|
||||
@@ -1017,6 +1410,13 @@ paths:
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
-
|
||||
name: platform_product_id
|
||||
in: query
|
||||
description: '平台商品 ID 精确筛选'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
-
|
||||
name: created_date_from
|
||||
in: query
|
||||
@@ -1348,6 +1748,13 @@ paths:
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
-
|
||||
name: platform_product_id
|
||||
in: query
|
||||
description: '平台商品 ID 精确筛选'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
-
|
||||
name: created_date_from
|
||||
in: query
|
||||
@@ -1439,6 +1846,154 @@ paths:
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
/api/v1/logs/requests:
|
||||
get:
|
||||
tags:
|
||||
- 'Request Logs'
|
||||
summary: 请求日志列表
|
||||
description: '获取 API 请求日志列表,支持分页、按用户/方法/路径/状态码/时间筛选。仅 admin 可访问。'
|
||||
operationId: db0b73fd478b1f9dfacb819a397254ff
|
||||
parameters:
|
||||
-
|
||||
name: page
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
default: 1
|
||||
-
|
||||
name: per_page
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
default: 15
|
||||
maximum: 100
|
||||
-
|
||||
name: user_id
|
||||
in: query
|
||||
description: '用户 ID 精确筛选'
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
-
|
||||
name: method
|
||||
in: query
|
||||
description: 'HTTP 方法精确筛选'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- GET
|
||||
- POST
|
||||
- PUT
|
||||
- PATCH
|
||||
- DELETE
|
||||
-
|
||||
name: path
|
||||
in: query
|
||||
description: 请求路径模糊搜索
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
-
|
||||
name: status_code
|
||||
in: query
|
||||
description: 'HTTP 状态码精确筛选'
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
-
|
||||
name: created_at_from
|
||||
in: query
|
||||
description: 创建时间起始(含)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date
|
||||
example: '2026-01-01'
|
||||
-
|
||||
name: created_at_to
|
||||
in: query
|
||||
description: 创建时间截止(含)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date
|
||||
example: '2026-12-31'
|
||||
responses:
|
||||
'200':
|
||||
description: 获取成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
code: { type: integer, example: 0 }
|
||||
message: { type: string, example: 获取成功 }
|
||||
data: { properties: { items: { type: array, items: { $ref: '#/components/schemas/ApiRequestLogList' } }, total: { type: integer, example: 100 }, page: { type: integer, example: 1 }, per_page: { type: integer, example: 15 } }, type: object }
|
||||
type: object
|
||||
'401':
|
||||
description: 未认证
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'403':
|
||||
description: 无权限
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
'/api/v1/logs/requests/{id}':
|
||||
get:
|
||||
tags:
|
||||
- 'Request Logs'
|
||||
summary: 请求日志详情
|
||||
description: '获取请求日志详情,含完整请求体和 User-Agent。仅 admin 可访问。'
|
||||
operationId: f730ba32caa6f4a153d5d394a1102912
|
||||
parameters:
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: '请求日志 ID'
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
description: 获取成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
code: { type: integer, example: 0 }
|
||||
message: { type: string, example: 获取成功 }
|
||||
data: { $ref: '#/components/schemas/ApiRequestLogDetail' }
|
||||
type: object
|
||||
'401':
|
||||
description: 未认证
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'403':
|
||||
description: 无权限
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'404':
|
||||
description: 数据不存在
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
/me/api-keys:
|
||||
get:
|
||||
tags:
|
||||
@@ -3463,6 +4018,348 @@ components:
|
||||
type: object
|
||||
nullable: true
|
||||
type: object
|
||||
MqQueueInfo:
|
||||
description: 单个队列的状态信息
|
||||
properties:
|
||||
queue:
|
||||
description: 队列名称
|
||||
type: string
|
||||
example: orders.queue
|
||||
messages:
|
||||
description: '消息数量(异常时为 N/A)'
|
||||
example: 5
|
||||
oneOf:
|
||||
-
|
||||
type: integer
|
||||
-
|
||||
type: string
|
||||
consumers:
|
||||
description: '消费者数量(异常时为 N/A)'
|
||||
example: 1
|
||||
oneOf:
|
||||
-
|
||||
type: integer
|
||||
-
|
||||
type: string
|
||||
status:
|
||||
description: 队列状态
|
||||
type: string
|
||||
example: active
|
||||
enum:
|
||||
- high_load
|
||||
- processing
|
||||
- active
|
||||
- empty
|
||||
- error
|
||||
type: object
|
||||
MqQueueStatus:
|
||||
description: 消息队列全量状态
|
||||
properties:
|
||||
business_queues:
|
||||
description: 业务队列列表
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/MqQueueInfo'
|
||||
retry_queues:
|
||||
description: 重试队列列表
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/MqQueueInfo'
|
||||
error_queue:
|
||||
$ref: '#/components/schemas/MqQueueInfo'
|
||||
summary:
|
||||
description: 汇总统计
|
||||
properties:
|
||||
total_messages:
|
||||
description: 消息总数
|
||||
type: integer
|
||||
example: 7
|
||||
total_consumers:
|
||||
description: 消费者总数
|
||||
type: integer
|
||||
example: 1
|
||||
type: object
|
||||
fetched_at:
|
||||
description: 数据获取时间
|
||||
type: string
|
||||
format: date-time
|
||||
example: '2026-03-13 12:00:00'
|
||||
type: object
|
||||
FailedMessageList:
|
||||
description: 失败消息列表项
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
example: 1
|
||||
error_id:
|
||||
type: string
|
||||
example: err_67890abc
|
||||
data_type:
|
||||
type: string
|
||||
example: order
|
||||
enum:
|
||||
- order
|
||||
- product
|
||||
- refund
|
||||
platform:
|
||||
type: string
|
||||
example: Tmall
|
||||
nullable: true
|
||||
platform_id:
|
||||
type: integer
|
||||
example: 1
|
||||
nullable: true
|
||||
company_id:
|
||||
type: integer
|
||||
example: 1
|
||||
nullable: true
|
||||
store_id:
|
||||
type: integer
|
||||
example: 1
|
||||
nullable: true
|
||||
error_type:
|
||||
type: string
|
||||
example: RuntimeException
|
||||
error_message:
|
||||
type: string
|
||||
example: 'Connection refused'
|
||||
retry_count:
|
||||
type: integer
|
||||
example: 3
|
||||
message_id:
|
||||
type: string
|
||||
example: msg_12345
|
||||
nullable: true
|
||||
failed_at:
|
||||
type: string
|
||||
format: date-time
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
type: object
|
||||
FailedMessageDetail:
|
||||
description: 失败消息详情(含完整错误堆栈和原始消息体)
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
example: 1
|
||||
error_id:
|
||||
type: string
|
||||
example: err_67890abc
|
||||
data_type:
|
||||
type: string
|
||||
example: order
|
||||
enum:
|
||||
- order
|
||||
- product
|
||||
- refund
|
||||
platform:
|
||||
type: string
|
||||
example: Tmall
|
||||
nullable: true
|
||||
platform_id:
|
||||
type: integer
|
||||
example: 1
|
||||
nullable: true
|
||||
company_id:
|
||||
type: integer
|
||||
example: 1
|
||||
nullable: true
|
||||
store_id:
|
||||
type: integer
|
||||
example: 1
|
||||
nullable: true
|
||||
error_type:
|
||||
type: string
|
||||
example: RuntimeException
|
||||
error_message:
|
||||
type: string
|
||||
example: 'Connection refused'
|
||||
error_code:
|
||||
type: integer
|
||||
example: 0
|
||||
error_trace:
|
||||
description: 完整异常堆栈
|
||||
type: string
|
||||
original_message:
|
||||
description: '原始消息体 JSON'
|
||||
type: object
|
||||
retry_count:
|
||||
type: integer
|
||||
example: 3
|
||||
message_id:
|
||||
type: string
|
||||
example: msg_12345
|
||||
nullable: true
|
||||
failed_at:
|
||||
type: string
|
||||
format: date-time
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
type: object
|
||||
DashboardOverview:
|
||||
description: 'Dashboard 概览统计'
|
||||
properties:
|
||||
today:
|
||||
description: 今日统计
|
||||
properties:
|
||||
success:
|
||||
type: integer
|
||||
example: 120
|
||||
failed:
|
||||
type: integer
|
||||
example: 3
|
||||
type: object
|
||||
this_week:
|
||||
description: 本周统计
|
||||
properties:
|
||||
success:
|
||||
type: integer
|
||||
example: 850
|
||||
failed:
|
||||
type: integer
|
||||
example: 15
|
||||
type: object
|
||||
this_month:
|
||||
description: 本月统计
|
||||
properties:
|
||||
success:
|
||||
type: integer
|
||||
example: 3200
|
||||
failed:
|
||||
type: integer
|
||||
example: 42
|
||||
type: object
|
||||
by_type:
|
||||
description: 按数据类型分组统计(本月窗口)
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
data_type:
|
||||
type: string
|
||||
example: order
|
||||
enum:
|
||||
- order
|
||||
- product
|
||||
- refund
|
||||
- inventory
|
||||
success:
|
||||
type: integer
|
||||
example: 1000
|
||||
failed:
|
||||
type: integer
|
||||
example: 10
|
||||
type: object
|
||||
type: object
|
||||
DashboardTrendItem:
|
||||
description: 趋势数据点
|
||||
properties:
|
||||
date:
|
||||
type: string
|
||||
format: date
|
||||
example: '2026-03-17'
|
||||
success:
|
||||
type: integer
|
||||
example: 120
|
||||
failed:
|
||||
type: integer
|
||||
example: 3
|
||||
type: object
|
||||
DashboardBreakdownItem:
|
||||
description: 分组统计项
|
||||
properties:
|
||||
id:
|
||||
description: '维度 ID(公司/平台/店铺)'
|
||||
type: integer
|
||||
example: 1
|
||||
name:
|
||||
description: 维度名称
|
||||
type: string
|
||||
example: Tmall
|
||||
success:
|
||||
type: integer
|
||||
example: 500
|
||||
failed:
|
||||
type: integer
|
||||
example: 8
|
||||
type: object
|
||||
ApiRequestLogList:
|
||||
description: 'API 请求日志列表项'
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
example: 1
|
||||
user_id:
|
||||
type: integer
|
||||
example: 1
|
||||
nullable: true
|
||||
method:
|
||||
type: string
|
||||
example: GET
|
||||
path:
|
||||
type: string
|
||||
example: /api/v1/users
|
||||
status_code:
|
||||
type: integer
|
||||
example: 200
|
||||
ip:
|
||||
type: string
|
||||
example: 127.0.0.1
|
||||
nullable: true
|
||||
response_code:
|
||||
type: integer
|
||||
example: 0
|
||||
nullable: true
|
||||
duration_ms:
|
||||
type: integer
|
||||
example: 42
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
type: object
|
||||
ApiRequestLogDetail:
|
||||
description: 'API 请求日志详情(含完整请求体和 User-Agent)'
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
example: 1
|
||||
user_id:
|
||||
type: integer
|
||||
example: 1
|
||||
nullable: true
|
||||
method:
|
||||
type: string
|
||||
example: POST
|
||||
path:
|
||||
type: string
|
||||
example: /api/v1/users
|
||||
status_code:
|
||||
type: integer
|
||||
example: 200
|
||||
ip:
|
||||
type: string
|
||||
example: 127.0.0.1
|
||||
nullable: true
|
||||
user_agent:
|
||||
type: string
|
||||
example: Mozilla/5.0
|
||||
nullable: true
|
||||
request_body:
|
||||
description: 请求体(脱敏后)
|
||||
type: object
|
||||
nullable: true
|
||||
response_code:
|
||||
type: integer
|
||||
example: 0
|
||||
nullable: true
|
||||
duration_ms:
|
||||
type: integer
|
||||
example: 42
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
type: object
|
||||
securitySchemes:
|
||||
bearerAuth:
|
||||
type: http
|
||||
@@ -3473,6 +4370,15 @@ components:
|
||||
name: X-API-Key
|
||||
in: header
|
||||
tags:
|
||||
-
|
||||
name: Dashboard
|
||||
description: 'Dashboard 数据同步统计'
|
||||
-
|
||||
name: 'Failed Messages'
|
||||
description: 失败消息查看
|
||||
-
|
||||
name: 'MQ Status'
|
||||
description: 消息队列状态监控
|
||||
-
|
||||
name: Orders
|
||||
description: 订单管理
|
||||
@@ -3500,6 +4406,9 @@ tags:
|
||||
-
|
||||
name: 'Refund Items'
|
||||
description: 退款项管理
|
||||
-
|
||||
name: 'Request Logs'
|
||||
description: 'API 请求日志查看'
|
||||
-
|
||||
name: ApiKeys
|
||||
description: 'API Key 管理'
|
||||
|
||||
Reference in New Issue
Block a user