docs(health): OpenAPI 注解 — device_handler + consent_handler
为 device_handler (2 函数) 和 consent_handler (3 函数) 添加 #[utoipa::path] 注解。P1-5 批次 1/N。
This commit is contained in:
@@ -27,6 +27,16 @@ pub struct DeviceListQuery {
|
||||
}
|
||||
|
||||
/// GET /api/v1/health/devices — 设备绑定列表
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/health/devices",
|
||||
params(DeviceListQuery),
|
||||
responses(
|
||||
(status = 200, description = "设备列表"),
|
||||
),
|
||||
tag = "设备管理",
|
||||
security(("bearer_auth" = [])),
|
||||
)]
|
||||
pub async fn list_devices<S>(
|
||||
State(state): State<HealthState>,
|
||||
Extension(ctx): Extension<TenantContext>,
|
||||
@@ -60,6 +70,16 @@ where
|
||||
}
|
||||
|
||||
/// DELETE /api/v1/health/devices/{id} — 解绑设备(软删除)
|
||||
#[utoipa::path(
|
||||
delete,
|
||||
path = "/health/devices/{id}",
|
||||
responses(
|
||||
(status = 200, description = "解绑成功"),
|
||||
(status = 404, description = "设备不存在"),
|
||||
),
|
||||
tag = "设备管理",
|
||||
security(("bearer_auth" = [])),
|
||||
)]
|
||||
pub async fn unbind_device<S>(
|
||||
State(state): State<HealthState>,
|
||||
Extension(ctx): Extension<TenantContext>,
|
||||
|
||||
Reference in New Issue
Block a user