docs(health): OpenAPI 注解 — diagnosis + device_reading + vital_signs_daily
为 3 个 handler 文件共 8 个函数添加 #[utoipa::path] 注解。 P1-5 批次 2/N。
This commit is contained in:
@@ -33,6 +33,13 @@ pub struct HourlyQuery {
|
||||
pub page_size: Option<u64>,
|
||||
}
|
||||
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/health/patients/{patient_id}/device-readings/batch",
|
||||
responses((status = 200, description = "批量创建成功")),
|
||||
tag = "设备数据",
|
||||
security(("bearer_auth" = [])),
|
||||
)]
|
||||
pub async fn batch_create<S>(
|
||||
State(state): State<HealthState>,
|
||||
Extension(ctx): Extension<TenantContext>,
|
||||
@@ -50,6 +57,13 @@ where
|
||||
Ok(axum::Json(ApiResponse::ok(result)))
|
||||
}
|
||||
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/health/patients/{patient_id}/device-readings",
|
||||
responses((status = 200, description = "设备读数列表")),
|
||||
tag = "设备数据",
|
||||
security(("bearer_auth" = [])),
|
||||
)]
|
||||
pub async fn list_readings<S>(
|
||||
State(state): State<HealthState>,
|
||||
Extension(ctx): Extension<TenantContext>,
|
||||
@@ -76,6 +90,13 @@ where
|
||||
Ok(axum::Json(ApiResponse::ok(result)))
|
||||
}
|
||||
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/health/patients/{patient_id}/device-readings/hourly",
|
||||
responses((status = 200, description = "小时聚合数据")),
|
||||
tag = "设备数据",
|
||||
security(("bearer_auth" = [])),
|
||||
)]
|
||||
pub async fn list_hourly<S>(
|
||||
State(state): State<HealthState>,
|
||||
Extension(ctx): Extension<TenantContext>,
|
||||
|
||||
Reference in New Issue
Block a user