feat(api): add descriptions for various API endpoints
ZhenYi committed
This change is very large, so some diffs are not shown. Clone the repository to see the full change.
Modified lib/auth/src/handlers/accept_agreement.rs lib/auth/src/handlers/accept_agreement.rs +1 −0 View lib/auth/src/handlers/accept_agreement.rs
@@ -20,6 +20,7 @@
2020 put,
2121 path = "/me/agreements/{key}",
2222 tag = "account",
23 description = "记录当前用户已同意指定版本的协议文本。",
2324 params(
2425 ("key" = String, Path, description = "agreement key")
2526 ),
Modified lib/auth/src/handlers/add_ssh_key.rs lib/auth/src/handlers/add_ssh_key.rs +1 −0 View lib/auth/src/handlers/add_ssh_key.rs
@@ -13,6 +13,7 @@
1313 post,
1414 path = "/auth/ssh-keys",
1515 tag = "security",
16 description = "校验并登记 SSH 公钥,指纹冲突时拒绝添加。",
1617 request_body = AddSshKeyCmd,
1718 responses(
1819 (status = 200, description = "ssh key registered", body = AppResponseData<SshKeyDto>),
Modified lib/auth/src/handlers/cancel_deletion.rs lib/auth/src/handlers/cancel_deletion.rs +1 −0 View lib/auth/src/handlers/cancel_deletion.rs
@@ -10,6 +10,7 @@
1010 delete,
1111 path = "/me/deletion",
1212 tag = "deletion",
13 description = "撤销当前用户尚未完成的账号注销预约。",
1314 responses(
1415 (status = 200, description = "deletion request cancelled", body = AppResponseData<NoData>),
1516 (status = 404, description = "resource not found", body = AppResponseData<NoData>),
Modified lib/auth/src/handlers/cancel_email_change.rs lib/auth/src/handlers/cancel_email_change.rs +1 −0 View lib/auth/src/handlers/cancel_email_change.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/auth/email/change/{ticket_id}",
1313 tag = "auth",
14 description = "取消当前用户尚未完成的邮箱换绑工单。",
1415 params(
1516 ("ticket_id" = Uuid, Path, description = "email change ticket id")
1617 ),
Modified lib/auth/src/handlers/change_password.rs lib/auth/src/handlers/change_password.rs +1 −0 View lib/auth/src/handlers/change_password.rs
@@ -13,6 +13,7 @@
1313 post,
1414 path = "/auth/password/change",
1515 tag = "auth",
16 description = "校验旧密码后修改当前账号密码,并吊销其他会话但保留当前会话。",
1617 request_body = ChangePasswordCmd,
1718 responses(
1819 (status = 200, description = "password changed, other sessions invalidated", body = AppResponseData<NoData>),
Modified lib/auth/src/handlers/confirm_email_change.rs lib/auth/src/handlers/confirm_email_change.rs +1 −0 View lib/auth/src/handlers/confirm_email_change.rs
@@ -21,6 +21,7 @@
2121 post,
2222 path = "/auth/email/change/confirm",
2323 tag = "auth",
24 description = "输入确认码完成邮箱换绑,将新邮箱激活并设为主邮箱。",
2425 request_body = ConfirmEmailChangeCmd,
2526 responses(
2627 (status = 200, description = "email changed to the ticket address", body = AppResponseData<NoData>),
Modified lib/auth/src/handlers/create_access_key.rs lib/auth/src/handlers/create_access_key.rs +1 −0 View lib/auth/src/handlers/create_access_key.rs
@@ -13,6 +13,7 @@
1313 post,
1414 path = "/auth/access-keys",
1515 tag = "security",
16 description = "创建带作用域和可选过期时间的访问令牌,明文令牌仅本次返回。",
1617 request_body = CreateAccessKeyCmd,
1718 responses(
1819 (status = 200, description = "access key created, token shown only in this response", body = AppResponseData<CreateAccessKeyResp>),
Modified lib/auth/src/handlers/create_report.rs lib/auth/src/handlers/create_report.rs +1 −0 View lib/auth/src/handlers/create_report.rs
@@ -13,6 +13,7 @@
1313 post,
1414 path = "/me/reports",
1515 tag = "reports",
16 description = "提交针对其他用户的举报及可选证据,供平台按处理状态跟踪。",
1617 request_body = CreateReportCmd,
1718 responses(
1819 (status = 200, description = "report filed", body = AppResponseData<ReportDto>),
Modified lib/auth/src/handlers/delete_access_key.rs lib/auth/src/handlers/delete_access_key.rs +1 −0 View lib/auth/src/handlers/delete_access_key.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/auth/access-keys/{key_id}",
1313 tag = "security",
14 description = "删除当前用户指定的访问令牌,使其立即无法继续认证。",
1415 params(
1516 ("key_id" = Uuid, Path, description = "access key id")
1617 ),
Modified lib/auth/src/handlers/delete_notification.rs lib/auth/src/handlers/delete_notification.rs +1 −0 View lib/auth/src/handlers/delete_notification.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/me/notifications/{notification_id}",
1313 tag = "notifications",
14 description = "删除当前用户名下的指定通知记录。",
1415 params(
1516 ("notification_id" = Uuid, Path, description = "notification id")
1617 ),
Modified lib/auth/src/handlers/delete_ssh_key.rs lib/auth/src/handlers/delete_ssh_key.rs +1 −0 View lib/auth/src/handlers/delete_ssh_key.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/auth/ssh-keys/{key_id}",
1313 tag = "security",
14 description = "删除当前用户名下的指定 SSH 公钥。",
1415 params(
1516 ("key_id" = Uuid, Path, description = "ssh key id")
1617 ),
Modified lib/auth/src/handlers/deletion_status.rs lib/auth/src/handlers/deletion_status.rs +1 −0 View lib/auth/src/handlers/deletion_status.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/me/deletion",
1313 tag = "deletion",
14 description = "查询当前用户最近一次账号注销申请及处理状态。",
1415 responses(
1516 (status = 200, description = "latest deletion request for the current user", body = AppResponseData<Option<DeletionDto>>),
1617 (status = 404, description = "resource not found", body = AppResponseData<NoData>),
Modified lib/auth/src/handlers/devices.rs lib/auth/src/handlers/devices.rs +3 −0 View lib/auth/src/handlers/devices.rs
@@ -14,6 +14,7 @@
1414 get,
1515 path = "/me/devices",
1616 tag = "account",
17 description = "列出当前账号登录过的设备及其最近活跃信息。",
1718 params(ListQuery),
1819 responses(
1920 (status = 200, description = "devices seen by your account", body = AppResponseData<Vec<DeviceDto>>),
@@ -35,6 +36,7 @@
3536 patch,
3637 path = "/me/devices/{device_id}",
3738 tag = "account",
39 description = "修改当前账号设备的显示名称、类型或可信标记。",
3840 params(("device_id" = Uuid, Path)),
3941 request_body = UpdateDeviceCmd,
4042 responses(
@@ -62,6 +64,7 @@
6264 delete,
6365 path = "/me/devices/{device_id}",
6466 tag = "account",
67 description = "删除当前账号设备记录,并吊销该设备关联的全部会话。",
6568 params(("device_id" = Uuid, Path)),
6669 responses(
6770 (status = 200, description = "device removed and its sessions revoked", body = AppResponseData<NoData>),
Modified lib/auth/src/handlers/forgot_password.rs lib/auth/src/handlers/forgot_password.rs +1 −0 View lib/auth/src/handlers/forgot_password.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/auth/password/forgot",
1414 tag = "auth",
15 description = "为已存在邮箱申请一次性密码重置链接;未知邮箱也返回成功以避免账号枚举。",
1516 request_body = ForgotPasswordCmd,
1617 responses(
1718 (status = 200, description = "reset token issued, delivery is not disclosed", body = AppResponseData<ForgotPasswordResp>),
Modified lib/auth/src/handlers/get_preferences.rs lib/auth/src/handlers/get_preferences.rs +1 −0 View lib/auth/src/handlers/get_preferences.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/me/preferences",
1313 tag = "account",
14 description = "读取当前用户的通知与界面偏好,未配置时返回默认值。",
1415 responses(
1516 (status = 200, description = "preferences for the current user, defaults when unset", body = AppResponseData<UserPreferencesDto>),
1617 (status = 404, description = "resource not found", body = AppResponseData<NoData>),
Modified lib/auth/src/handlers/get_user.rs lib/auth/src/handlers/get_user.rs +1 −0 View lib/auth/src/handlers/get_user.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/users/{user_id}",
1414 tag = "users",
15 description = "按用户 ID 返回公开身份资料,并按账号状态与可见性过滤。",
1516 params(
1617 ("user_id" = Uuid, Path, description = "user id")
1718 ),
Modified lib/auth/src/handlers/list_access_keys.rs lib/auth/src/handlers/list_access_keys.rs +1 −0 View lib/auth/src/handlers/list_access_keys.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/auth/access-keys",
1414 tag = "security",
15 description = "分页列出当前用户创建的访问令牌元数据。",
1516 params(ListQuery),
1617 responses(
1718 (status = 200, description = "access keys for the current user", body = AppResponseData<export::pagination::Page<AccessKeyDto>>),
Modified lib/auth/src/handlers/list_agreements.rs lib/auth/src/handlers/list_agreements.rs +1 −0 View lib/auth/src/handlers/list_agreements.rs
@@ -9,6 +9,7 @@
99 get,
1010 path = "/auth/agreements",
1111 tag = "account",
12 description = "返回服务端配置中的协议列表及其当前版本与正文。",
1213 responses(
1314 (status = 200, description = "agreement documents from configuration", body = AppResponseData<Vec<AgreementDoc>>),
1415 (status = 404, description = "resource not found", body = AppResponseData<NoData>)
Modified lib/auth/src/handlers/list_notifications.rs lib/auth/src/handlers/list_notifications.rs +1 −0 View lib/auth/src/handlers/list_notifications.rs
@@ -22,6 +22,7 @@
2222 get,
2323 path = "/me/notifications",
2424 tag = "notifications",
25 description = "分页读取当前用户站内通知,可按类型或未读状态过滤。",
2526 params(ListNotificationsQuery),
2627 responses(
2728 (status = 200, description = "notifications for the current user", body = AppResponseData<export::pagination::Page<NotificationDto>>),
Modified lib/auth/src/handlers/list_ssh_keys.rs lib/auth/src/handlers/list_ssh_keys.rs +1 −0 View lib/auth/src/handlers/list_ssh_keys.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/auth/ssh-keys",
1414 tag = "security",
15 description = "分页列出当前用户已登记的 SSH 公钥。",
1516 params(ListQuery),
1617 responses(
1718 (status = 200, description = "ssh keys for the current user", body = AppResponseData<export::pagination::Page<SshKeyDto>>),
Modified lib/auth/src/handlers/login.rs lib/auth/src/handlers/login.rs +1 −0 View lib/auth/src/handlers/login.rs
@@ -13,6 +13,7 @@
1313 post,
1414 path = "/auth/login",
1515 tag = "auth",
16 description = "使用账号密码与 PoW 挑战登录;账号启用 2FA 时返回待验证挑战而非会话。",
1617 request_body = LoginCmd,
1718 responses(
1819 (status = 200, description = "login accepted, session established", body = AppResponseData<LoginResp>),
Modified lib/auth/src/handlers/login_2fa.rs lib/auth/src/handlers/login_2fa.rs +1 −0 View lib/auth/src/handlers/login_2fa.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/auth/login/2fa",
1414 tag = "auth",
15 description = "提交 TOTP 动态码或恢复码完成登录二次验证,并建立当前会话。",
1516 request_body = TwoFactorLoginCmd,
1617 responses(
1718 (status = 200, description = "two-factor challenge accepted, session established", body = AppResponseData<LoginResp>),
Modified lib/auth/src/handlers/logout.rs lib/auth/src/handlers/logout.rs +1 −0 View lib/auth/src/handlers/logout.rs
@@ -10,6 +10,7 @@
1010 post,
1111 path = "/auth/logout",
1212 tag = "auth",
13 description = "退出登录并吊销当前会话对应的服务端会话记录。",
1314 responses(
1415 (status = 200, description = "active user logged out of the session", body = AppResponseData<LogoutResp>),
1516 (status = 401, description = "authentication required", body = AppResponseData<NoData>)
Modified lib/auth/src/handlers/mark_notifications_read.rs lib/auth/src/handlers/mark_notifications_read.rs +1 −0 View lib/auth/src/handlers/mark_notifications_read.rs
@@ -26,6 +26,7 @@
2626 put,
2727 path = "/me/notifications/read",
2828 tag = "account",
29 description = "按通知 ID 集合或 all=true 将当前用户的通知标记为已读。",
2930 request_body = MarkNotificationsReadCmd,
3031 responses(
3132 (status = 200, description = "notifications marked read", body = AppResponseData<MarkedCountResp>),
Modified lib/auth/src/handlers/me.rs lib/auth/src/handlers/me.rs +1 −0 View lib/auth/src/handlers/me.rs
@@ -19,6 +19,7 @@
1919 get,
2020 path = "/me",
2121 tag = "account",
22 description = "返回当前登录用户的身份、账号状态与资料,并刷新会话活跃时间。",
2223 responses(
2324 (status = 200, description = "identity and profile of the active user", body = AppResponseData<MeResp>),
2425 (status = 404, description = "resource not found", body = AppResponseData<NoData>),
Modified lib/auth/src/handlers/pow_challenge.rs lib/auth/src/handlers/pow_challenge.rs +1 −0 View lib/auth/src/handlers/pow_challenge.rs
@@ -19,6 +19,7 @@
1919 get,
2020 path = "/auth/pow/challenge",
2121 tag = "auth",
22 description = "签发绑定当前会话的工作量证明挑战,用于注册、登录等防滥用流程。",
2223 responses(
2324 (status = 200, description = "challenge issued", body = AppResponseData<PowChallengeResp>),
2425 (status = 404, description = "resource not found", body = AppResponseData<NoData>)
Modified lib/auth/src/handlers/reclaim.rs lib/auth/src/handlers/reclaim.rs +1 −0 View lib/auth/src/handlers/reclaim.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/auth/email/reclaim",
1414 tag = "auth",
15 description = "为未激活账号校验密码并重新发送账号找回验证码。",
1516 request_body = ReclaimCmd,
1617 responses(
1718 (status = 200, description = "inactive account reclaim issued", body = AppResponseData<ReclaimResp>),
Modified lib/auth/src/handlers/recovery_codes.rs lib/auth/src/handlers/recovery_codes.rs +1 −0 View lib/auth/src/handlers/recovery_codes.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/auth/2fa/recovery-codes",
1313 tag = "auth",
14 description = "查询恢复码总数与已使用数量;明文恢复码不可再次读取。",
1415 responses(
1516 (status = 200, description = "recovery code usage summary, codes never returned", body = AppResponseData<RecoveryCodesResp>),
1617 (status = 404, description = "resource not found", body = AppResponseData<NoData>),
Modified lib/auth/src/handlers/regenerate_recovery_codes.rs lib/auth/src/handlers/regenerate_recovery_codes.rs +1 −0 View lib/auth/src/handlers/regenerate_recovery_codes.rs
@@ -13,6 +13,7 @@
1313 put,
1414 path = "/auth/2fa/recovery-codes",
1515 tag = "auth",
16 description = "校验密码后重新生成全部恢复码,并一次性返回新明文集合。",
1617 request_body = RegenerateRecoveryCodesCmd,
1718 responses(
1819 (status = 200, description = "replacement codes issued, shown only in this response", body = AppResponseData<RecoveryCodesResp>),
Modified lib/auth/src/handlers/register.rs lib/auth/src/handlers/register.rs +1 −0 View lib/auth/src/handlers/register.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/auth/register",
1414 tag = "auth",
15 description = "创建待激活账号并发送邮箱验证码;成功后返回 temp_id 供验证使用。",
1516 request_body = RegisterCmd,
1617 responses(
1718 (status = 200, description = "registration pending email verification", body = AppResponseData<RegisterResp>),
Modified lib/auth/src/handlers/request_deletion.rs lib/auth/src/handlers/request_deletion.rs +1 −0 View lib/auth/src/handlers/request_deletion.rs
@@ -21,6 +21,7 @@
2121 post,
2222 path = "/me/deletion",
2323 tag = "deletion",
24 description = "校验密码后预约注销当前账号,并进入配置的宽限期。",
2425 request_body = RequestDeletionCmd,
2526 responses(
2627 (status = 200, description = "deletion request recorded", body = AppResponseData<DeletionDto>),
Modified lib/auth/src/handlers/request_email_change.rs lib/auth/src/handlers/request_email_change.rs +1 −0 View lib/auth/src/handlers/request_email_change.rs
@@ -13,6 +13,7 @@
1313 post,
1414 path = "/auth/email/change",
1515 tag = "auth",
16 description = "校验密码后申请换绑邮箱,并向新邮箱发送确认验证码。",
1617 request_body = RequestEmailChangeCmd,
1718 responses(
1819 (status = 200, description = "email change ticket created", body = AppResponseData<EmailChangeTicketDto>),
Modified lib/auth/src/handlers/resend_code.rs lib/auth/src/handlers/resend_code.rs +1 −0 View lib/auth/src/handlers/resend_code.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/auth/email/resend",
1414 tag = "auth",
15 description = "重新发送指定邮箱与用途的验证码,并受发送频率限制。",
1516 request_body = ResendCodeCmd,
1617 responses(
1718 (status = 200, description = "verification code resent", body = AppResponseData<ResendCodeResp>),
Modified lib/auth/src/handlers/reset_password.rs lib/auth/src/handlers/reset_password.rs +1 −0 View lib/auth/src/handlers/reset_password.rs
@@ -10,6 +10,7 @@
1010 post,
1111 path = "/auth/password/reset",
1212 tag = "auth",
13 description = "使用一次性重置令牌设置新密码,并使旧密码签发会话失效。",
1314 request_body = ResetPasswordCmd,
1415 responses(
1516 (status = 200, description = "password replaced, existing sessions invalidated", body = AppResponseData<NoData>),
Modified lib/auth/src/handlers/rotate_access_key.rs lib/auth/src/handlers/rotate_access_key.rs +1 −0 View lib/auth/src/handlers/rotate_access_key.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/auth/access-keys/{key_id}/rotate",
1414 tag = "auth",
15 description = "轮换访问令牌密钥并一次性返回新明文令牌,旧令牌随即失效。",
1516 params(("key_id" = Uuid, Path)),
1617 responses(
1718 (status = 200, description = "access key rotated, new token returned", body = AppResponseData<CreateAccessKeyResp>),
Modified lib/auth/src/handlers/totp_disable.rs lib/auth/src/handlers/totp_disable.rs +1 −0 View lib/auth/src/handlers/totp_disable.rs
@@ -13,6 +13,7 @@
1313 post,
1414 path = "/auth/2fa/disable",
1515 tag = "auth",
16 description = "使用 TOTP 码或恢复码关闭双因素认证并清除既有恢复码。",
1617 request_body = TotpCodeCmd,
1718 responses(
1819 (status = 200, description = "two-factor authentication disabled and recovery codes removed", body = AppResponseData<NoData>),
Modified lib/auth/src/handlers/totp_enable.rs lib/auth/src/handlers/totp_enable.rs +1 −0 View lib/auth/src/handlers/totp_enable.rs
@@ -13,6 +13,7 @@
1313 post,
1414 path = "/auth/2fa/enable",
1515 tag = "auth",
16 description = "校验密码与 TOTP 码后启用双因素认证,并一次性返回恢复码。",
1617 request_body = TotpEnableCmd,
1718 responses(
1819 (status = 200, description = "two-factor authentication enabled and recovery codes generated", body = AppResponseData<RecoveryCodesResp>),
Modified lib/auth/src/handlers/totp_setup.rs lib/auth/src/handlers/totp_setup.rs +1 −0 View lib/auth/src/handlers/totp_setup.rs
@@ -11,6 +11,7 @@
1111 post,
1212 path = "/auth/2fa/setup",
1313 tag = "auth",
14 description = "生成尚未启用的 TOTP 密钥与 otpauth URI,供验证器录入。",
1415 responses(
1516 (status = 200, description = "new secret stored, awaiting enable", body = AppResponseData<TotpSetupResp>),
1617 (status = 401, description = "authentication required", body = AppResponseData<NoData>)
Modified lib/auth/src/handlers/totp_status.rs lib/auth/src/handlers/totp_status.rs +1 −0 View lib/auth/src/handlers/totp_status.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/auth/2fa/status",
1313 tag = "auth",
14 description = "查询当前账号是否已启用 TOTP 双因素认证。",
1415 responses(
1516 (status = 200, description = "two-factor status for the current user", body = AppResponseData<TotpStatusResp>),
1617 (status = 404, description = "resource not found", body = AppResponseData<NoData>),
Modified lib/auth/src/handlers/unread_notifications_count.rs lib/auth/src/handlers/unread_notifications_count.rs +1 −0 View lib/auth/src/handlers/unread_notifications_count.rs
@@ -17,6 +17,7 @@
1717 get,
1818 path = "/me/notifications/unread-count",
1919 tag = "notifications",
20 description = "统计当前用户尚未读取的通知数量。",
2021 responses(
2122 (status = 200, description = "number of unread notifications", body = AppResponseData<UnreadCountResp>),
2223 (status = 404, description = "resource not found", body = AppResponseData<NoData>),
Modified lib/auth/src/handlers/update_access_key.rs lib/auth/src/handlers/update_access_key.rs +1 −0 View lib/auth/src/handlers/update_access_key.rs
@@ -13,6 +13,7 @@
1313 patch,
1414 path = "/auth/access-keys/{key_id}",
1515 tag = "auth",
16 description = "更新访问令牌名称、作用域或过期时间;显式传 null 可清除过期时间。",
1617 params(("key_id" = Uuid, Path)),
1718 request_body = UpdateAccessKeyCmd,
1819 responses(
Modified lib/auth/src/handlers/update_preferences.rs lib/auth/src/handlers/update_preferences.rs +1 −0 View lib/auth/src/handlers/update_preferences.rs
@@ -13,6 +13,7 @@
1313 patch,
1414 path = "/me/preferences",
1515 tag = "account",
16 description = "增量更新当前用户的通知、界面和静音等偏好设置。",
1617 request_body = UpdatePreferencesCmd,
1718 responses(
1819 (status = 200, description = "preferences updated", body = AppResponseData<NoData>),
Modified lib/auth/src/handlers/update_profile.rs lib/auth/src/handlers/update_profile.rs +1 −0 View lib/auth/src/handlers/update_profile.rs
@@ -13,6 +13,7 @@
1313 patch,
1414 path = "/me",
1515 tag = "account",
16 description = "增量更新当前用户的显示资料、时区语言、可见性和资料开关。",
1617 request_body = UpdateProfileCmd,
1718 responses(
1819 (status = 200, description = "profile fields updated", body = AppResponseData<NoData>),
Modified lib/auth/src/handlers/users.rs lib/auth/src/handlers/users.rs +3 −0 View lib/auth/src/handlers/users.rs
@@ -20,6 +20,7 @@
2020 get,
2121 path = "/users",
2222 tag = "users",
23 description = "按 ID 批量解析用户公开资料,并自动隐藏不可见账号。",
2324 params(UsersBatchQuery),
2425 responses(
2526 (status = 200, description = "resolved public identities", body = AppResponseData<Vec<UserPublic>>),
@@ -44,6 +45,7 @@
4445 get,
4546 path = "/users/by-username/{username}",
4647 tag = "users",
48 description = "按用户名精确查询用户公开资料,并遵循可见性规则。",
4749 params(("username" = String, Path, description = "username")),
4850 responses(
4951 (status = 200, description = "public user identity", body = AppResponseData<UserPublic>),
@@ -73,6 +75,7 @@
7375 put,
7476 path = "/me/username",
7577 tag = "account",
78 description = "校验格式和全局唯一性后修改当前用户用户名。",
7679 request_body = UpdateUsernameCmd,
7780 responses(
7881 (status = 200, description = "username updated", body = AppResponseData<UserPublic>),
Modified lib/auth/src/handlers/verify_email.rs lib/auth/src/handlers/verify_email.rs +1 −0 View lib/auth/src/handlers/verify_email.rs
@@ -10,6 +10,7 @@
1010 post,
1111 path = "/auth/email/verify",
1212 tag = "auth",
13 description = "校验注册、找回或重置等用途的邮箱验证码,并按用途激活对应流程。",
1314 request_body = VerifyEmailCmd,
1415 responses(
1516 (status = 200, description = "verification code accepted", body = AppResponseData<VerifyEmailResp>),
Modified lib/chat/src/handlers/attachments.rs lib/chat/src/handlers/attachments.rs +4 −0 View lib/chat/src/handlers/attachments.rs
@@ -16,6 +16,7 @@
1616 post,
1717 path = "/chat/attachments",
1818 tag = "chat",
19 description = "为聊天附件申请预签名直传地址,并创建待归档的附件记录。",
1920 request_body = CreateAttachmentCmd,
2021 responses(
2122 (status = 200, description = "upload intent", body = AppResponseData<UploadIntentDto>),
@@ -38,6 +39,7 @@
3839 post,
3940 path = "/chat/attachments/{attachment_id}/finalize",
4041 tag = "chat",
42 description = "校验已上传附件的大小与类型,将其标记为可用并返回最终元数据。",
4143 params(("attachment_id" = Uuid, Path, description = "attachment id")),
4244 request_body = FinalizeAttachmentCmd,
4345 responses(
@@ -62,6 +64,7 @@
6264 get,
6365 path = "/chat/attachments/{attachment_id}",
6466 tag = "chat",
67 description = "读取当前用户可访问聊天附件的元数据。",
6568 params(("attachment_id" = Uuid, Path, description = "attachment id")),
6669 responses(
6770 (status = 200, description = "attachment meta", body = AppResponseData<AttachmentDto>),
@@ -83,6 +86,7 @@
8386 get,
8487 path = "/chat/attachments/{attachment_id}/file",
8588 tag = "chat",
89 description = "以安全响应头流式下载聊天附件原始内容。",
8690 params(("attachment_id" = Uuid, Path, description = "attachment id")),
8791 responses(
8892 (status = 200, description = "file stream"),
Modified lib/chat/src/handlers/bookmarks.rs lib/chat/src/handlers/bookmarks.rs +4 −0 View lib/chat/src/handlers/bookmarks.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/chat/rooms/{room_id}/bookmarks",
1414 tag = "chat",
15 description = "按排序位置读取指定房间的书签列表。",
1516 params(("room_id" = Uuid, Path, description = "room id"), export::pagination::PageQuery),
1617 responses(
1718 (status = 200, description = "bookmark list", body = AppResponseData<export::pagination::Page<BookmarkDto>>),
@@ -34,6 +35,7 @@
3435 post,
3536 path = "/chat/rooms/{room_id}/bookmarks",
3637 tag = "chat",
38 description = "在可读取的房间中创建链接书签或表情书签。",
3739 params(("room_id" = Uuid, Path, description = "room id")),
3840 request_body = CreateBookmarkCmd,
3941 responses(
@@ -58,6 +60,7 @@
5860 patch,
5961 path = "/chat/rooms/{room_id}/bookmarks/{bookmark_id}",
6062 tag = "chat",
63 description = "更新书签的标题、链接、表情或排序位置;仅作者或空间管理员可改。",
6164 params(
6265 ("room_id" = Uuid, Path, description = "room id"),
6366 ("bookmark_id" = Uuid, Path, description = "bookmark id")
@@ -87,6 +90,7 @@
8790 delete,
8891 path = "/chat/rooms/{room_id}/bookmarks/{bookmark_id}",
8992 tag = "chat",
93 description = "删除指定房间书签;仅作者或空间管理员可操作。",
9094 params(
9195 ("room_id" = Uuid, Path, description = "room id"),
9296 ("bookmark_id" = Uuid, Path, description = "bookmark id")
Modified lib/chat/src/handlers/dms.rs lib/chat/src/handlers/dms.rs +3 −0 View lib/chat/src/handlers/dms.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/chat/dms",
1414 tag = "chat",
15 description = "打开与指定用户的私聊会话;已有会话则恢复,新会话则创建。",
1516 params(export::pagination::PageQuery),
1617 request_body = OpenDmCmd,
1718 responses(
@@ -37,6 +38,7 @@
3738 get,
3839 path = "/chat/dms",
3940 tag = "chat",
41 description = "列出当前用户仍有效的私聊会话及其未读信息。",
4042 params(export::pagination::PageQuery),
4143 responses(
4244 (status = 200, description = "my dms", body = AppResponseData<export::pagination::Page<DmDto>>),
@@ -58,6 +60,7 @@
5860 delete,
5961 path = "/chat/dms/{room_id}",
6062 tag = "chat",
63 description = "将当前用户从指定私聊会话中移除,不再接收该会话消息。",
6164 params(("room_id" = Uuid, Path, description = "dm room id")),
6265 responses(
6366 (status = 200, description = "dm closed", body = AppResponseData<NoData>),
Modified lib/chat/src/handlers/drafts.rs lib/chat/src/handlers/drafts.rs +4 −0 View lib/chat/src/handlers/drafts.rs
@@ -17,6 +17,7 @@
1717 put,
1818 path = "/chat/rooms/{room_id}/draft",
1919 tag = "chat",
20 description = "保存房间或话题输入草稿;提交空内容会清除对应草稿。",
2021 params(("room_id" = Uuid, Path, description = "room id")),
2122 request_body = UpsertDraftCmd,
2223 responses(
@@ -40,6 +41,7 @@
4041 get,
4142 path = "/chat/rooms/{room_id}/draft",
4243 tag = "chat",
44 description = "读取当前用户在指定房间或话题中的输入草稿。",
4345 params(("room_id" = Uuid, Path, description = "room id"), DraftQuery),
4446 responses(
4547 (status = 200, description = "draft", body = AppResponseData<Option<DraftDto>>),
@@ -62,6 +64,7 @@
6264 get,
6365 path = "/chat/drafts",
6466 tag = "chat",
67 description = "分页列出当前用户保存的全部聊天草稿。",
6568 responses(
6669 (status = 200, description = "my drafts", body = AppResponseData<export::pagination::Page<DraftDto>>),
6770 (status = 401, description = "unauthorized", body = AppResponseData<NoData>),
@@ -82,6 +85,7 @@
8285 delete,
8386 path = "/chat/rooms/{room_id}/draft",
8487 tag = "chat",
88 description = "删除当前用户在指定房间或话题中的输入草稿。",
8589 params(("room_id" = Uuid, Path), ("thread_id" = Option<Uuid>, Query, description = "thread scope")),
8690 responses(
8791 (status = 200, description = "draft deleted", body = AppResponseData<NoData>),
Modified lib/chat/src/handlers/emojis.rs lib/chat/src/handlers/emojis.rs +5 −0 View lib/chat/src/handlers/emojis.rs
@@ -15,6 +15,7 @@
1515 get,
1616 path = "/chat/spaces/{space_name}/emojis",
1717 tag = "chat",
18 description = "返回指定空间可用的自定义表情列表。",
1819 params(("space_name" = String, Path, description = "space name")),
1920 responses(
2021 (status = 200, description = "emoji list", body = AppResponseData<export::pagination::Page<EmojiDto>>),
@@ -36,6 +37,7 @@
3637 post,
3738 path = "/chat/spaces/{space_name}/emojis",
3839 tag = "chat",
40 description = "空间管理员上传并登记一个新的自定义表情。",
3941 params(("space_name" = String, Path, description = "space name")),
4042 request_body = UploadEmojiCmd,
4143 responses(
@@ -61,6 +63,7 @@
6163 delete,
6264 path = "/chat/spaces/{space_name}/emojis/{emoji_id}",
6365 tag = "chat",
66 description = "空间管理员删除空间自定义表情及对应存储对象。",
6467 params(
6568 ("space_name" = String, Path, description = "space name"),
6669 ("emoji_id" = Uuid, Path, description = "emoji id")
@@ -85,6 +88,7 @@
8588 get,
8689 path = "/chat/spaces/{space_name}/emojis/{emoji_id}/image",
8790 tag = "chat",
91 description = "返回空间自定义表情的二进制图片内容。",
8892 params(
8993 ("space_name" = String, Path, description = "space name"),
9094 ("emoji_id" = Uuid, Path, description = "emoji id")
@@ -111,6 +115,7 @@
111115 get,
112116 path = "/chat/spaces/{space_name}/emojis/{emoji_id}",
113117 tag = "chat",
118 description = "读取单个空间自定义表情的元数据。",
114119 params(("space_name" = String, Path), ("emoji_id" = Uuid, Path)),
115120 responses(
116121 (status = 200, description = "emoji", body = AppResponseData<EmojiDto>),
Modified lib/chat/src/handlers/messages.rs lib/chat/src/handlers/messages.rs +10 −0 View lib/chat/src/handlers/messages.rs
@@ -16,6 +16,7 @@
1616 post,
1717 path = "/chat/rooms/{room_id}/messages",
1818 tag = "chat",
19 description = "向房间即时发送消息,或按未来 send_at 时间预约发送。",
1920 params(("room_id" = Uuid, Path, description = "room id")),
2021 request_body = SendMessageCmd,
2122 responses(
@@ -49,6 +50,7 @@
4950 get,
5051 path = "/chat/rooms/{room_id}/messages",
5152 tag = "chat",
53 description = "按房间序号游标读取消息页,并附带作者、附件和回应状态。",
5254 params(("room_id" = Uuid, Path, description = "room id"), ListMessageQuery),
5355 responses(
5456 (status = 200, description = "message page", body = AppResponseData<MessagePage>),
@@ -71,6 +73,7 @@
7173 get,
7274 path = "/chat/rooms/{room_id}/messages/{message_id}",
7375 tag = "chat",
76 description = "读取指定房间中单条未删除消息的详情。",
7477 params(MessagePath),
7578 responses(
7679 (status = 200, description = "message detail", body = AppResponseData<MessageDto>),
@@ -94,6 +97,7 @@
9497 patch,
9598 path = "/chat/rooms/{room_id}/messages/{message_id}",
9699 tag = "chat",
100 description = "编辑自己或空间管理员有权修改的消息,并保存历史版本。",
97101 params(MessagePath),
98102 request_body = UpdateMessageCmd,
99103 responses(
@@ -120,6 +124,7 @@
120124 delete,
121125 path = "/chat/rooms/{room_id}/messages/{message_id}",
122126 tag = "chat",
127 description = "软删除指定消息并广播删除事件;作者或空间管理员可操作。",
123128 params(MessagePath),
124129 responses(
125130 (status = 200, description = "message deleted", body = AppResponseData<NoData>),
@@ -143,6 +148,7 @@
143148 post,
144149 path = "/chat/rooms/{room_id}/messages/bulk-delete",
145150 tag = "chat",
151 description = "批量软删除同一房间内最多 100 条有权删除的消息。",
146152 params(("room_id" = Uuid, Path, description = "room id")),
147153 request_body = BulkDeleteCmd,
148154 responses(
@@ -168,6 +174,7 @@
168174 put,
169175 path = "/chat/rooms/{room_id}/messages/{message_id}/pin",
170176 tag = "chat",
177 description = "置顶房间消息或取消置顶,并同步房间实时事件。",
171178 params(MessagePath),
172179 request_body = PinCmd,
173180 responses(
@@ -194,6 +201,7 @@
194201 get,
195202 path = "/chat/rooms/{room_id}/pins",
196203 tag = "chat",
204 description = "返回房间内当前置顶且未删除的消息列表。",
197205 params(("room_id" = Uuid, Path, description = "room id")),
198206 responses(
199207 (status = 200, description = "pinned messages", body = AppResponseData<export::pagination::Page<MessageDto>>),
@@ -215,6 +223,7 @@
215223 post,
216224 path = "/chat/rooms/{room_id}/messages/{message_id}/forward",
217225 tag = "chat",
226 description = "将源房间消息转发到目标房间,并按发送消息权限执行校验。",
218227 params(MessagePath),
219228 request_body = ForwardMessageCmd,
220229 responses(
@@ -242,6 +251,7 @@
242251 get,
243252 path = "/chat/rooms/{room_id}/messages/{message_id}/history",
244253 tag = "chat",
254 description = "读取指定消息历次编辑保存的内容快照。",
245255 params(MessagePath),
246256 responses(
247257 (status = 200, description = "edit history", body = AppResponseData<Vec<MessageEditDto>>),
Modified lib/chat/src/handlers/presence.rs lib/chat/src/handlers/presence.rs +3 −0 View lib/chat/src/handlers/presence.rs
@@ -12,6 +12,7 @@
1212 put,
1313 path = "/chat/presence",
1414 tag = "chat",
15 description = "更新当前用户的在线状态、离开状态或隐身状态。",
1516 request_body = SetPresenceCmd,
1617 responses(
1718 (status = 200, description = "presence updated", body = AppResponseData<PresenceDto>),
@@ -33,6 +34,7 @@
3334 get,
3435 path = "/chat/users/{user_id}/presence",
3536 tag = "chat",
37 description = "读取指定用户的在线状态;仅在可见关系成立时返回。",
3638 params(("user_id" = Uuid, Path, description = "user id")),
3739 responses(
3840 (status = 200, description = "presence", body = AppResponseData<PresenceDto>),
@@ -53,6 +55,7 @@
5355 get,
5456 path = "/chat/spaces/{space_name}/presences",
5557 tag = "chat",
58 description = "返回指定空间活跃成员及其在线状态。",
5659 params(("space_name" = String, Path, description = "space name")),
5760 responses(
5861 (status = 200, description = "space presences", body = AppResponseData<Vec<PresenceDto>>),
Modified lib/chat/src/handlers/reactions.rs lib/chat/src/handlers/reactions.rs +3 −0 View lib/chat/src/handlers/reactions.rs
@@ -12,6 +12,7 @@
1212 put,
1313 path = "/chat/rooms/{room_id}/messages/{message_id}/reactions/@me",
1414 tag = "chat",
15 description = "为消息添加当前用户的表情回应,并返回聚合结果。",
1516 params(
1617 ("room_id" = Uuid, Path, description = "room id"),
1718 ("message_id" = Uuid, Path, description = "message id")
@@ -39,6 +40,7 @@
3940 delete,
4041 path = "/chat/rooms/{room_id}/messages/{message_id}/reactions/@me",
4142 tag = "chat",
43 description = "撤回当前用户在消息上指定的表情回应。",
4244 params(
4345 ("room_id" = Uuid, Path, description = "room id"),
4446 ("message_id" = Uuid, Path, description = "message id")
@@ -68,6 +70,7 @@
6870 get,
6971 path = "/chat/rooms/{room_id}/messages/{message_id}/reactions",
7072 tag = "chat",
73 description = "列出指定消息上全部用户的表情回应明细。",
7174 params(
7275 ("room_id" = Uuid, Path, description = "room id"),
7376 ("message_id" = Uuid, Path, description = "message id")
Modified lib/chat/src/handlers/read_state.rs lib/chat/src/handlers/read_state.rs +4 −0 View lib/chat/src/handlers/read_state.rs
@@ -12,6 +12,7 @@
1212 put,
1313 path = "/chat/rooms/{room_id}/read-state",
1414 tag = "chat",
15 description = "按消息 ID、序号或房间末尾消息更新当前用户的已读游标。",
1516 params(("room_id" = Uuid, Path, description = "room id")),
1617 request_body = MarkReadCmd,
1718 responses(
@@ -36,6 +37,7 @@
3637 get,
3738 path = "/chat/rooms/{room_id}/read-state",
3839 tag = "chat",
40 description = "读取当前用户在指定房间的已读位置与未读计数。",
3941 params(("room_id" = Uuid, Path, description = "room id")),
4042 responses(
4143 (status = 200, description = "read state", body = AppResponseData<ReadStateDto>),
@@ -57,6 +59,7 @@
5759 get,
5860 path = "/chat/spaces/{space_name}/read-states",
5961 tag = "chat",
62 description = "汇总当前用户在一个空间内可见房间的未读状态。",
6063 params(("space_name" = String, Path, description = "space name")),
6164 responses(
6265 (status = 200, description = "space read states", body = AppResponseData<SpaceReadStatePage>),
@@ -84,6 +87,7 @@
8487 put,
8588 path = "/chat/threads/{thread_id}/read-state",
8689 tag = "chat",
90 description = "更新当前用户在指定话题中的已读游标。",
8791 params(("thread_id" = Uuid, Path, description = "thread id")),
8892 request_body = MarkThreadReadCmd,
8993 responses(
Modified lib/chat/src/handlers/reminders.rs lib/chat/src/handlers/reminders.rs +4 −0 View lib/chat/src/handlers/reminders.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/chat/rooms/{room_id}/messages/{message_id}/reminders",
1414 tag = "chat",
15 description = "为指定消息创建未来时间的用户提醒。",
1516 params(
1617 ("room_id" = Uuid, Path, description = "room id"),
1718 ("message_id" = Uuid, Path, description = "message id")
@@ -42,6 +43,7 @@
4243 get,
4344 path = "/chat/reminders",
4445 tag = "chat",
46 description = "列出当前用户尚未执行的提醒计划。",
4547 responses(
4648 (status = 200, description = "pending reminders", body = AppResponseData<Vec<ReminderDto>>),
4749 (status = 401, description = "unauthorized", body = AppResponseData<NoData>),
@@ -61,6 +63,7 @@
6163 delete,
6264 path = "/chat/reminders/{reminder_id}",
6365 tag = "chat",
66 description = "取消当前用户的一条待执行提醒。",
6467 params(("reminder_id" = Uuid, Path, description = "reminder id")),
6568 responses(
6669 (status = 200, description = "reminder cancelled", body = AppResponseData<NoData>),
@@ -82,6 +85,7 @@
8285 patch,
8386 path = "/chat/reminders/{reminder_id}",
8487 tag = "chat",
88 description = "修改待执行提醒的时间或备注。",
8589 params(("reminder_id" = Uuid, Path)),
8690 request_body = UpdateReminderCmd,
8791 responses(
Modified lib/chat/src/handlers/room_admin.rs lib/chat/src/handlers/room_admin.rs +7 −0 View lib/chat/src/handlers/room_admin.rs
@@ -15,6 +15,7 @@
1515 get,
1616 path = "/chat/rooms/{room_id}/members/{user_id}",
1717 tag = "chat",
18 description = "读取指定房间成员的昵称、角色与加入信息。",
1819 params(("room_id" = Uuid, Path), ("user_id" = Uuid, Path)),
1920 responses(
2021 (status = 200, description = "room member", body = AppResponseData<RoomMemberDto>),
@@ -36,6 +37,7 @@
3637 patch,
3738 path = "/chat/rooms/{room_id}/members/{user_id}",
3839 tag = "chat",
40 description = "更新房间成员昵称或角色;管理员修改角色受层级限制。",
3941 params(("room_id" = Uuid, Path), ("user_id" = Uuid, Path)),
4042 request_body = UpdateRoomMemberCmd,
4143 responses(
@@ -60,6 +62,7 @@
6062 delete,
6163 path = "/chat/rooms/{room_id}/members/{user_id}",
6264 tag = "chat",
65 description = "将成员移出房间;调用者权限须高于目标且不能移除所有者。",
6366 params(("room_id" = Uuid, Path), ("user_id" = Uuid, Path)),
6467 responses(
6568 (status = 200, description = "member removed", body = AppResponseData<NoData>),
@@ -81,6 +84,7 @@
8184 get,
8285 path = "/chat/rooms/{room_id}/bans",
8386 tag = "chat",
87 description = "分页读取房间的成员封禁记录。",
8488 params(("room_id" = Uuid, Path), export::pagination::PageQuery),
8589 responses(
8690 (status = 200, description = "room bans", body = AppResponseData<export::pagination::Page<RoomBanDto>>),
@@ -102,6 +106,7 @@
102106 post,
103107 path = "/chat/rooms/{room_id}/bans",
104108 tag = "chat",
109 description = "封禁房间成员并立即终止其房间成员关系。",
105110 params(("room_id" = Uuid, Path)),
106111 request_body = BanRoomMemberCmd,
107112 responses(
@@ -126,6 +131,7 @@
126131 delete,
127132 path = "/chat/rooms/{room_id}/bans/{user_id}",
128133 tag = "chat",
134 description = "删除指定用户的房间封禁记录。",
129135 params(("room_id" = Uuid, Path), ("user_id" = Uuid, Path)),
130136 responses(
131137 (status = 200, description = "member unbanned", body = AppResponseData<NoData>),
@@ -152,6 +158,7 @@
152158 put,
153159 path = "/chat/rooms/{room_id}/owner",
154160 tag = "chat",
161 description = "由当前所有者把房间所有权转移给有效成员。",
155162 params(("room_id" = Uuid, Path)),
156163 request_body = TransferOwnerCmd,
157164 responses(
Modified lib/chat/src/handlers/rooms.rs lib/chat/src/handlers/rooms.rs +11 −0 View lib/chat/src/handlers/rooms.rs
@@ -15,6 +15,7 @@
1515 get,
1616 path = "/chat/spaces/{space_name}/rooms",
1717 tag = "chat",
18 description = "列出空间内可见频道,并附带未读、成员和偏好信息。",
1819 params(("space_name" = String, Path, description = "space name")),
1920 responses(
2021 (status = 200, description = "list rooms", body = AppResponseData<Vec<RoomBriefDto>>),
@@ -36,6 +37,7 @@
3637 get,
3738 path = "/chat/rooms/{room_id}",
3839 tag = "chat",
40 description = "读取单个房间的详情及当前用户未读数。",
3941 params(("room_id" = Uuid, Path, description = "room id")),
4042 responses(
4143 (status = 200, description = "room detail", body = AppResponseData<RoomBriefDto>),
@@ -57,6 +59,7 @@
5759 patch,
5860 path = "/chat/rooms/{room_id}",
5961 tag = "chat",
62 description = "更新房间名称、主题、隐私、限速或排序等属性。",
6063 params(("room_id" = Uuid, Path, description = "room id")),
6164 request_body = UpdateRoomCmd,
6265 responses(
@@ -81,6 +84,7 @@
8184 put,
8285 path = "/chat/rooms/{room_id}/members/@me",
8386 tag = "chat",
87 description = "让当前用户自助加入可访问的公开空间房间。",
8488 params(("room_id" = Uuid, Path, description = "room id")),
8589 responses(
8690 (status = 200, description = "joined", body = AppResponseData<NoData>),
@@ -102,6 +106,7 @@
102106 delete,
103107 path = "/chat/rooms/{room_id}/members/@me",
104108 tag = "chat",
109 description = "退出房间;所有者退出时按规则转移或停用房间。",
105110 params(("room_id" = Uuid, Path, description = "room id")),
106111 responses(
107112 (status = 200, description = "left", body = AppResponseData<NoData>),
@@ -123,6 +128,7 @@
123128 post,
124129 path = "/chat/rooms/{room_id}/members",
125130 tag = "chat",
131 description = "批量将用户加入房间,并按房间类型执行权限和人数限制。",
126132 params(("room_id" = Uuid, Path, description = "room id")),
127133 request_body = AddMembersCmd,
128134 responses(
@@ -148,6 +154,7 @@
148154 get,
149155 path = "/chat/rooms/{room_id}/members",
150156 tag = "chat",
157 description = "按加入时间分页读取房间成员。",
151158 params(("room_id" = Uuid, Path, description = "room id"), RoomMemberQuery),
152159 responses(
153160 (status = 200, description = "member list", body = AppResponseData<Vec<RoomMemberDto>>),
@@ -170,6 +177,7 @@
170177 post,
171178 path = "/chat/rooms/{room_id}/invites",
172179 tag = "chat",
180 description = "创建房间邀请并返回可分享的一次性接受码。",
173181 params(("room_id" = Uuid, Path, description = "room id")),
174182 request_body = CreateRoomInviteCmd,
175183 responses(
@@ -195,6 +203,7 @@
195203 post,
196204 path = "/chat/invites/accept",
197205 tag = "chat",
206 description = "凭邀请码验证邀请状态和受邀身份后加入房间。",
198207 request_body = AcceptRoomInviteCmd,
199208 responses(
200209 (status = 200, description = "joined via invite", body = AppResponseData<RoomBriefDto>),
@@ -219,6 +228,7 @@
219228 get,
220229 path = "/chat/rooms/{room_id}/invites",
221230 tag = "chat",
231 description = "列出房间已创建的邀请及其使用状态。",
222232 params(("room_id" = Uuid, Path)),
223233 responses(
224234 (status = 200, description = "room invites", body = AppResponseData<Vec<RoomInviteListItemDto>>),
@@ -239,6 +249,7 @@
239249 delete,
240250 path = "/chat/rooms/{room_id}/invites/{invite_id}",
241251 tag = "chat",
252 description = "撤销尚未接受且仍有效的房间邀请。",
242253 params(("room_id" = Uuid, Path), ("invite_id" = Uuid, Path)),
243254 responses(
244255 (status = 200, description = "invite revoked", body = AppResponseData<NoData>),
Modified lib/chat/src/handlers/search.rs lib/chat/src/handlers/search.rs +1 −0 View lib/chat/src/handlers/search.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/chat/spaces/{space_name}/messages/search",
1313 tag = "chat",
14 description = "在空间消息中执行全文检索,并按权限过滤结果。",
1415 params(("space_name" = String, Path, description = "space name"), SearchQuery),
1516 responses(
1617 (status = 200, description = "search results", body = AppResponseData<SearchPage>),
Modified lib/chat/src/handlers/settings.rs lib/chat/src/handlers/settings.rs +2 −0 View lib/chat/src/handlers/settings.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/chat/rooms/{room_id}/settings",
1414 tag = "chat",
15 description = "读取当前用户针对单个房间的通知与显示设置。",
1516 params(("room_id" = Uuid, Path, description = "room id")),
1617 responses(
1718 (status = 200, description = "room setting", body = AppResponseData<RoomSettingDto>),
@@ -33,6 +34,7 @@
3334 put,
3435 path = "/chat/rooms/{room_id}/settings",
3536 tag = "chat",
37 description = "更新当前用户的房间通知级别、收藏、隐藏或免打扰设置。",
3638 params(("room_id" = Uuid, Path, description = "room id")),
3739 request_body = UpdateRoomSettingCmd,
3840 responses(
Modified lib/chat/src/handlers/threads.rs lib/chat/src/handlers/threads.rs +7 −0 View lib/chat/src/handlers/threads.rs
@@ -14,6 +14,7 @@
1414 post,
1515 path = "/chat/rooms/{room_id}/messages/{message_id}/threads",
1616 tag = "chat",
17 description = "基于指定根消息创建房间话题;已存在时返回既有线程。",
1718 params(
1819 ("room_id" = Uuid, Path, description = "room id"),
1920 ("message_id" = Uuid, Path, description = "root message id")
@@ -42,6 +43,7 @@
4243 get,
4344 path = "/chat/rooms/{room_id}/threads",
4445 tag = "chat",
46 description = "分页列出房间话题,可按归档状态过滤。",
4547 params(("room_id" = Uuid, Path, description = "room id"), ListThreadQuery),
4648 responses(
4749 (status = 200, description = "thread page", body = AppResponseData<ThreadPage>),
@@ -64,6 +66,7 @@
6466 get,
6567 path = "/chat/threads",
6668 tag = "chat",
69 description = "列出当前用户参与的最近话题。",
6770 params(export::pagination::PageQuery),
6871 responses(
6972 (status = 200, description = "my threads", body = AppResponseData<export::pagination::Page<ThreadDto>>),
@@ -85,6 +88,7 @@
8588 get,
8689 path = "/chat/threads/{thread_id}",
8790 tag = "chat",
91 description = "读取指定话题的标题、回复计数和参与状态。",
8892 params(("thread_id" = Uuid, Path, description = "thread id")),
8993 responses(
9094 (status = 200, description = "thread detail", body = AppResponseData<ThreadDto>),
@@ -106,6 +110,7 @@
106110 patch,
107111 path = "/chat/threads/{thread_id}",
108112 tag = "chat",
113 description = "话题所有者或空间管理员重命名、归档或锁定话题。",
109114 params(("thread_id" = Uuid, Path, description = "thread id")),
110115 request_body = UpdateThreadCmd,
111116 responses(
@@ -130,6 +135,7 @@
130135 put,
131136 path = "/chat/threads/{thread_id}/members/@me",
132137 tag = "chat",
138 description = "让当前用户关注话题并设置通知级别。",
133139 params(("thread_id" = Uuid, Path, description = "thread id")),
134140 request_body = ThreadMemberCmd,
135141 responses(
@@ -154,6 +160,7 @@
154160 delete,
155161 path = "/chat/threads/{thread_id}/members/@me",
156162 tag = "chat",
163 description = "取消当前用户的话题关注并减少参与者计数。",
157164 params(("thread_id" = Uuid, Path, description = "thread id")),
158165 responses(
159166 (status = 200, description = "unfollowed", body = AppResponseData<NoData>),
Modified lib/chat/src/handlers/webhooks.rs lib/chat/src/handlers/webhooks.rs +5 −0 View lib/chat/src/handlers/webhooks.rs
@@ -13,6 +13,7 @@
1313 post,
1414 path = "/chat/rooms/{room_id}/webhooks",
1515 tag = "chat",
16 description = "空间管理员为房间创建 Webhook,并一次性返回调用令牌。",
1617 params(("room_id" = Uuid, Path, description = "room id")),
1718 request_body = CreateWebhookCmd,
1819 responses(
@@ -38,6 +39,7 @@
3839 get,
3940 path = "/chat/rooms/{room_id}/webhooks",
4041 tag = "chat",
42 description = "列出房间 Webhook 的元数据,但不返回令牌。",
4143 params(("room_id" = Uuid, Path, description = "room id"), export::pagination::PageQuery),
4244 responses(
4345 (status = 200, description = "webhook list", body = AppResponseData<export::pagination::Page<WebhookDto>>),
@@ -60,6 +62,7 @@
6062 delete,
6163 path = "/chat/rooms/{room_id}/webhooks/{webhook_id}",
6264 tag = "chat",
65 description = "删除房间下的指定 Webhook。",
6366 params(
6467 ("room_id" = Uuid, Path, description = "room id"),
6568 ("webhook_id" = Uuid, Path, description = "webhook id")
@@ -84,6 +87,7 @@
8487 post,
8588 path = "/chat/hooks/{token}",
8689 tag = "chat",
90 description = "凭路径中的 Webhook 令牌以创建者身份向房间发送消息。",
8791 params(("token" = String, Path, description = "webhook token")),
8892 request_body = WebhookPostCmd,
8993 responses(
@@ -106,6 +110,7 @@
106110 patch,
107111 path = "/chat/rooms/{room_id}/webhooks/{webhook_id}",
108112 tag = "chat",
113 description = "更新 Webhook 名称或启用状态。",
109114 params(("room_id" = Uuid, Path), ("webhook_id" = Uuid, Path)),
110115 request_body = UpdateWebhookCmd,
111116 responses(
Modified lib/chat/src/handlers/ws.rs lib/chat/src/handlers/ws.rs +1 −0 View lib/chat/src/handlers/ws.rs
@@ -19,6 +19,7 @@
1919 post,
2020 path = "/chat/ws/ticket",
2121 tag = "chat",
22 description = "签发短期 WebSocket 连接票据,用于建立聊天实时会话。",
2223 responses(
2324 (status = 200, description = "ws ticket issued", body = AppResponseData<WsTicketDto>),
2425 (status = 401, description = "unauthorized", body = AppResponseData<NoData>),
Modified lib/git/src/handler/analysis/code_activity.rs lib/git/src/handler/analysis/code_activity.rs +1 −0 View lib/git/src/handler/analysis/code_activity.rs
@@ -17,6 +17,7 @@
1717 get,
1818 path = "/repos/{space_name}/{repo_name}/analysis/code-activity",
1919 tag = "analysis",
20 description = "按作者汇总指定分支的提交、新增和删除活动。",
2021 params(crate::handler::RepoPath, CodeActivityQuery),
2122 responses(
2223 (status = 200, description = "code activity analysis", body = AppResponseData<CodeActivityDto>)
Modified lib/git/src/handler/analysis/contributors.rs lib/git/src/handler/analysis/contributors.rs +1 −0 View lib/git/src/handler/analysis/contributors.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/repos/{space_name}/{repo_name}/analysis/contributors",
1313 tag = "analysis",
14 description = "按提交数返回指定修订历史的贡献者及代码量统计。",
1415 params(crate::handler::RepoPath),
1516 responses(
1617 (status = 200, description = "contributor statistics", body = AppResponseData<Vec<ContributorStatDto>>)
Modified lib/git/src/handler/analysis/languages.rs lib/git/src/handler/analysis/languages.rs +1 −0 View lib/git/src/handler/analysis/languages.rs
@@ -11,6 +11,7 @@
1111 post,
1212 path = "/repos/{space_name}/{repo_name}/analysis/languages",
1313 tag = "analysis",
14 description = "重新扫描仓库树并持久化语言构成与主语言统计。",
1415 params(crate::handler::RepoPath),
1516 responses(
1617 (status = 200, description = "analyze languages", body = AppResponseData<Vec<LanguageStatDto>>)
Modified lib/git/src/handler/analysis/languages_read.rs lib/git/src/handler/analysis/languages_read.rs +1 −0 View lib/git/src/handler/analysis/languages_read.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/repos/{space_name}/{repo_name}/analysis/languages",
1313 tag = "analysis",
14 description = "读取最近一次已计算的仓库语言统计。",
1415 params(crate::handler::RepoPath),
1516 responses(
1617 (status = 200, description = "cached language analysis", body = AppResponseData<Vec<LanguageStatDto>>)
Modified lib/git/src/handler/archives/create.rs lib/git/src/handler/archives/create.rs +1 −0 View lib/git/src/handler/archives/create.rs
@@ -40,6 +40,7 @@
4040 post,
4141 path = "/repos/{space_name}/{repo_name}/archives",
4242 tag = "archives",
43 description = "为指定修订生成归档并上传存储,返回下载地址。",
4344 params(RepoPath),
4445 request_body = ArchiveCreateCmd,
4546 responses(
Modified lib/git/src/handler/archives/create_bundle.rs lib/git/src/handler/archives/create_bundle.rs +1 −0 View lib/git/src/handler/archives/create_bundle.rs
@@ -11,6 +11,7 @@
1111 post,
1212 path = "/repos/{space_name}/{repo_name}/archives/bundle",
1313 tag = "archives",
14 description = "将仓库全部引用打包为 Git bundle 并上传存储。",
1415 params(RepoPath),
1516 responses(
1617 (status = 200, description = "create git bundle", body = AppResponseData<ArchiveResultDto>)
Modified lib/git/src/handler/archives/download.rs lib/git/src/handler/archives/download.rs +1 −0 View lib/git/src/handler/archives/download.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/repos/{space_name}/{repo_name}/archives/{revision}",
1313 tag = "archives",
14 description = "查询已生成归档的元数据并换取短期下载地址。",
1415 params(
1516 RepoPathRev,
1617 ("format" = String, Query, description = "archive format"),
Modified lib/git/src/handler/blobs/content.rs lib/git/src/handler/blobs/content.rs +1 −0 View lib/git/src/handler/blobs/content.rs
@@ -18,6 +18,7 @@
1818 get,
1919 path = "/repos/{space_name}/{repo_name}/blobs/{oid}/content",
2020 tag = "blobs",
21 description = "读取 Blob 原始内容,超过配置上限时截断并标记。",
2122 params(BlobPath),
2223 responses(
2324 (status = 200, description = "blob content", body = AppResponseData<BlobContentDto>)
Modified lib/git/src/handler/blobs/list_lfs_pointers.rs lib/git/src/handler/blobs/list_lfs_pointers.rs +1 −0 View lib/git/src/handler/blobs/list_lfs_pointers.rs
@@ -24,6 +24,7 @@
2424 get,
2525 path = "/repos/{space_name}/{repo_name}/lfs-pointers",
2626 tag = "blobs",
27 description = "列出指定修订历史中可达的 LFS 指针对象。",
2728 params(
2829 RepoQuery,
2930 LfsPointerQuery,
Modified lib/git/src/handler/blobs/metadata.rs lib/git/src/handler/blobs/metadata.rs +1 −0 View lib/git/src/handler/blobs/metadata.rs
@@ -18,6 +18,7 @@
1818 get,
1919 path = "/repos/{space_name}/{repo_name}/blobs/{oid}/metadata",
2020 tag = "blobs",
21 description = "返回 Blob 对象大小、二进制判断及 LFS 指针信息。",
2122 params(BlobPath),
2223 responses(
2324 (status = 200, description = "blob metadata", body = AppResponseData<BlobMetaDto>)
Modified lib/git/src/handler/branches/create.rs lib/git/src/handler/branches/create.rs +1 −0 View lib/git/src/handler/branches/create.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/repos/{space_name}/{repo_name}/branches",
1414 tag = "branches",
15 description = "从指定起点创建新分支引用并更新分支元数据。",
1516 params(crate::handler::RepoPath),
1617 request_body = CreateBranchCmd,
1718 responses(
Modified lib/git/src/handler/branches/delete.rs lib/git/src/handler/branches/delete.rs +1 −0 View lib/git/src/handler/branches/delete.rs
@@ -23,6 +23,7 @@
2323 delete,
2424 path = "/repos/{space_name}/{repo_name}/branches/{name}",
2525 tag = "branches",
26 description = "删除分支引用并标记数据库记录;受保护分支会被拒绝。",
2627 params(BranchPath, DeleteBranchQuery),
2728 responses(
2829 (status = 200, description = "delete branch", body = AppResponseData<NoData>)
Modified lib/git/src/handler/branches/get.rs lib/git/src/handler/branches/get.rs +1 −0 View lib/git/src/handler/branches/get.rs
@@ -18,6 +18,7 @@
1818 get,
1919 path = "/repos/{space_name}/{repo_name}/branches/{name}",
2020 tag = "branches",
21 description = "读取单个分支的当前提交、保护状态和元数据。",
2122 params(BranchPath),
2223 responses(
2324 (status = 200, description = "get branch", body = AppResponseData<BranchDto>)
Modified lib/git/src/handler/branches/list.rs lib/git/src/handler/branches/list.rs +1 −0 View lib/git/src/handler/branches/list.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/repos/{space_name}/{repo_name}/branches",
1313 tag = "branches",
14 description = "列出 Git 分支并同步保护状态与数据库镜像后分页返回。",
1415 params(crate::handler::RepoPath, export::pagination::PageQuery),
1516 responses(
1617 (status = 200, description = "list branches", body = AppResponseData<export::pagination::Page<BranchDto>>)
Modified lib/git/src/handler/branches/rename.rs lib/git/src/handler/branches/rename.rs +1 −0 View lib/git/src/handler/branches/rename.rs
@@ -23,6 +23,7 @@
2323 patch,
2424 path = "/repos/{space_name}/{repo_name}/branches/{name}",
2525 tag = "branches",
26 description = "重命名分支引用并同步更新分支元数据记录。",
2627 params(BranchPath),
2728 request_body = RenameBranchCmd,
2829 responses(
Modified lib/git/src/handler/branches/set_default.rs lib/git/src/handler/branches/set_default.rs +1 −0 View lib/git/src/handler/branches/set_default.rs
@@ -17,6 +17,7 @@
1717 put,
1818 path = "/repos/{space_name}/{repo_name}/branches/{name}/default",
1919 tag = "branches",
20 description = "将指定分支设置为仓库默认分支,并同步 Git 与数据库。",
2021 params(BranchPath),
2122 responses(
2223 (status = 200, description = "set default branch", body = AppResponseData<NoData>)
Modified lib/git/src/handler/commits/get.rs lib/git/src/handler/commits/get.rs +1 −0 View lib/git/src/handler/commits/get.rs
@@ -18,6 +18,7 @@
1818 get,
1919 path = "/repos/{space_name}/{repo_name}/commits/{revision}",
2020 tag = "commits",
21 description = "读取任意修订表达式对应的单个提交详情。",
2122 params(CommitPath),
2223 responses(
2324 (status = 200, description = "get commit")
Modified lib/git/src/handler/commits/is_ancestor.rs lib/git/src/handler/commits/is_ancestor.rs +1 −0 View lib/git/src/handler/commits/is_ancestor.rs
@@ -22,6 +22,7 @@
2222 get,
2323 path = "/repos/{space_name}/{repo_name}/commits/ancestor",
2424 tag = "commits",
25 description = "判断一个修订是否位于另一个修订的提交历史中。",
2526 params(crate::handler::RepoPath, AncestorQuery),
2627 responses(
2728 (status = 200, description = "check commit ancestry", body = AppResponseData<IsAncestorResponse>)
Modified lib/git/src/handler/commits/list.rs lib/git/src/handler/commits/list.rs +1 −0 View lib/git/src/handler/commits/list.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/repos/{space_name}/{repo_name}/commits",
1313 tag = "commits",
14 description = "按修订、路径、时间窗和首父条件分页查询提交历史。",
1415 params(
1516 crate::handler::RepoPath,
1617 ("revision" = Option<String>, Query, description = "start revision"),
Modified lib/git/src/handler/commits/list_commit_statuses.rs lib/git/src/handler/commits/list_commit_statuses.rs +1 −0 View lib/git/src/handler/commits/list_commit_statuses.rs
@@ -18,6 +18,7 @@
1818 get,
1919 path = "/repos/{space_name}/{repo_name}/commit-statuses/{sha}",
2020 tag = "commits",
21 description = "按提交 SHA 读取全部状态检查记录及创建者。",
2122 params(StatusPath),
2223 responses(
2324 (status = 200, description = "list commit statuses", body = AppResponseData<Vec<CommitStatusDto>>)
Modified lib/git/src/handler/commits/rev_parse.rs lib/git/src/handler/commits/rev_parse.rs +1 −0 View lib/git/src/handler/commits/rev_parse.rs
@@ -17,6 +17,7 @@
1717 get,
1818 path = "/repos/{space_name}/{repo_name}/rev/{revision}",
1919 tag = "commits",
20 description = "将分支、标签、短 SHA 或相对修订表达式解析为对象 ID。",
2021 params(RevPath),
2122 responses(
2223 (status = 200, description = "parse revision", body = AppResponseData<String>)
Modified lib/git/src/handler/commits/set_commit_status.rs lib/git/src/handler/commits/set_commit_status.rs +1 −0 View lib/git/src/handler/commits/set_commit_status.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/repos/{space_name}/{repo_name}/commit-statuses",
1414 tag = "commits",
15 description = "为提交的指定 context 创建或更新 CI 状态。",
1516 params(crate::handler::RepoPath),
1617 request_body = SetCommitStatusCmd,
1718 responses(
Modified lib/git/src/handler/commits/stats.rs lib/git/src/handler/commits/stats.rs +1 −0 View lib/git/src/handler/commits/stats.rs
@@ -20,6 +20,7 @@
2020 get,
2121 path = "/repos/{space_name}/{repo_name}/commits/stats",
2222 tag = "commits",
23 description = "统计指定提交的文件变更与增删行数,可限定到单个路径。",
2324 params(crate::handler::RepoPath, StatsQuery),
2425 responses(
2526 (status = 200, description = "commit stats")
Modified lib/git/src/handler/commits/sync_commit.rs lib/git/src/handler/commits/sync_commit.rs +1 −0 View lib/git/src/handler/commits/sync_commit.rs
@@ -24,6 +24,7 @@
2424 post,
2525 path = "/repos/{space_name}/{repo_name}/commits/{revision}/sync",
2626 tag = "commits",
27 description = "将指定提交同步到平台提交元数据库,并按作者邮箱解析用户。",
2728 params(CommitPath),
2829 responses(
2930 (status = 200, description = "sync commit", body = AppResponseData<CommitSyncResponse>)
Modified lib/git/src/handler/conflicts/detail.rs lib/git/src/handler/conflicts/detail.rs +1 −0 View lib/git/src/handler/conflicts/detail.rs
@@ -18,6 +18,7 @@
1818 get,
1919 path = "/repos/{space_name}/{repo_name}/conflicts/detail",
2020 tag = "conflicts",
21 description = "读取指定冲突文件在合并检查中生成的冲突内容。",
2122 params(crate::handler::RepoPath, ConflictDetailQuery),
2223 responses(
2324 (status = 200, description = "conflict detail", body = AppResponseData<ConflictDetailDto>)
Modified lib/git/src/handler/conflicts/get_conflicts.rs lib/git/src/handler/conflicts/get_conflicts.rs +1 −0 View lib/git/src/handler/conflicts/get_conflicts.rs
@@ -19,6 +19,7 @@
1919 get,
2020 path = "/repos/{space_name}/{repo_name}/conflicts",
2121 tag = "conflicts",
22 description = "检测两个修订合并时是否冲突,并返回可快进标记。",
2223 params(crate::handler::RepoPath, GetConflictsQuery),
2324 responses(
2425 (status = 200, description = "merge conflict status", body = AppResponseData<MergeStatusDto>)
Modified lib/git/src/handler/content/caller_signature.rs lib/git/src/handler/content/caller_signature.rs +1 −0 View lib/git/src/handler/content/caller_signature.rs
@@ -19,6 +19,7 @@
1919 post,
2020 path = "/repos/utils/commit-signature",
2121 tag = "content",
22 description = "返回当前用户用于创建 Git 提交的姓名、邮箱和服务器时间。",
2223 request_body = CallerSignatureBody,
2324 responses(
2425 (status = 200, description = "caller git signature", body = AppResponseData<SignatureDto>)
Modified lib/git/src/handler/content/commit_object.rs lib/git/src/handler/content/commit_object.rs +1 −0 View lib/git/src/handler/content/commit_object.rs
@@ -22,6 +22,7 @@
2222 post,
2323 path = "/repos/{space_name}/{repo_name}/contents/commits",
2424 tag = "content",
25 description = "写入普通、合并或压缩提交对象并返回提交 ID,不移动引用。",
2526 params(RepoPath),
2627 request_body = CommitObjectBody,
2728 responses(
Modified lib/git/src/handler/content/write_blob.rs lib/git/src/handler/content/write_blob.rs +1 −0 View lib/git/src/handler/content/write_blob.rs
@@ -17,6 +17,7 @@
1717 post,
1818 path = "/repos/{space_name}/{repo_name}/contents/blobs",
1919 tag = "content",
20 description = "向 Git 对象库写入 Blob 并返回对象 ID,不移动引用。",
2021 params(RepoPath),
2122 request_body = WriteBlobBody,
2223 responses(
Modified lib/git/src/handler/content/write_tree_from_files.rs lib/git/src/handler/content/write_tree_from_files.rs +1 −0 View lib/git/src/handler/content/write_tree_from_files.rs
@@ -17,6 +17,7 @@
1717 post,
1818 path = "/repos/{space_name}/{repo_name}/contents/trees",
1919 tag = "content",
20 description = "由扁平文件列表递归构建 Tree 对象并返回根 Tree ID。",
2021 params(RepoPath),
2122 request_body = WriteTreeBody,
2223 responses(
Modified lib/git/src/handler/diffs/for_commit.rs lib/git/src/handler/diffs/for_commit.rs +1 −0 View lib/git/src/handler/diffs/for_commit.rs
@@ -18,6 +18,7 @@
1818 get,
1919 path = "/repos/{space_name}/{repo_name}/diff/for-commit/{commit}",
2020 tag = "diffs",
21 description = "按完整提交对象 ID 返回该提交相对父提交的变更路径列表。",
2122 params(CommitPath),
2223 responses(
2324 (status = 200, description = "changed paths for commit")
Modified lib/git/src/handler/diffs/get_diff.rs lib/git/src/handler/diffs/get_diff.rs +1 −0 View lib/git/src/handler/diffs/get_diff.rs
@@ -40,6 +40,7 @@
4040 get,
4141 path = "/repos/{space_name}/{repo_name}/diff",
4242 tag = "diffs",
43 description = "按 numstat、shortstat、files 或 tree 视图返回两个修订间的差异。",
4344 params(
4445 crate::handler::RepoPath,
4546 GetDiffQuery,
Modified lib/git/src/handler/diffs/range_diff.rs lib/git/src/handler/diffs/range_diff.rs +1 −0 View lib/git/src/handler/diffs/range_diff.rs
@@ -19,6 +19,7 @@
1919 get,
2020 path = "/repos/{space_name}/{repo_name}/diff/range",
2121 tag = "diffs",
22 description = "返回提交区间差异,并可用公共基线执行三点式比较。",
2223 params(crate::handler::RepoPath, RangeDiffQuery),
2324 responses(
2425 (status = 200, description = "range diff", body = AppResponseData<String>)
Modified lib/git/src/handler/diffs/raw.rs lib/git/src/handler/diffs/raw.rs +1 −0 View lib/git/src/handler/diffs/raw.rs
@@ -16,6 +16,7 @@
1616 get,
1717 path = "/repos/{space_name}/{repo_name}/diff/raw",
1818 tag = "diffs",
19 description = "返回两个修订之间的原始 unified diff 文本。",
1920 params(
2021 crate::handler::RepoPath,
2122 DiffBaseHeadQuery,
Modified lib/git/src/handler/hooks/execute_script.rs lib/git/src/handler/hooks/execute_script.rs +1 −0 View lib/git/src/handler/hooks/execute_script.rs
@@ -25,6 +25,7 @@
2525 post,
2626 path = "/repos/{space_name}/{repo_name}/hooks/{script}",
2727 tag = "hooks",
28 description = "以受控参数执行仓库 pre-receive 或 post-receive 脚本并回传结果。",
2829 params(HookScriptPath),
2930 request_body = HookExecBody,
3031 responses(
Modified lib/git/src/handler/html/badge.rs lib/git/src/handler/html/badge.rs +1 −0 View lib/git/src/handler/html/badge.rs
@@ -10,6 +10,7 @@
1010 get,
1111 path = "/repos/{space_name}/{repo_name}/html/badge",
1212 tag = "html",
13 description = "渲染仓库摘要徽章 HTML 片段。",
1314 operation_id = "render_badge",
1415 params(HtmlRepoPath),
1516 responses(
Modified lib/git/src/handler/html/blame.rs lib/git/src/handler/html/blame.rs +1 −0 View lib/git/src/handler/html/blame.rs
@@ -25,6 +25,7 @@
2525 get,
2626 path = "/repos/{space_name}/{repo_name}/html/blame",
2727 tag = "html",
28 description = "渲染文件逐行 blame HTML 视图片段。",
2829 operation_id = "render_blame",
2930 params(HtmlRepoPath, BlameQuery),
3031 responses(
Modified lib/git/src/handler/html/blob_content.rs lib/git/src/handler/html/blob_content.rs +1 −0 View lib/git/src/handler/html/blob_content.rs
@@ -23,6 +23,7 @@
2323 get,
2424 path = "/repos/{space_name}/{repo_name}/html/blob-content",
2525 tag = "html",
26 description = "渲染文件内容代码表、图片或二进制提示片段。",
2627 operation_id = "render_blob_content",
2728 params(HtmlRepoPath, BlobContentQuery),
2829 responses(
Modified lib/git/src/handler/html/blob_header.rs lib/git/src/handler/html/blob_header.rs +1 −0 View lib/git/src/handler/html/blob_header.rs
@@ -20,6 +20,7 @@
2020 get,
2121 path = "/repos/{space_name}/{repo_name}/html/blob-header",
2222 tag = "html",
23 description = "渲染文件页头的 Raw、Blame 和 History 操作链接。",
2324 operation_id = "render_blob_header",
2425 params(HtmlRepoPath, BlobHeaderQuery),
2526 responses(
Modified lib/git/src/handler/html/breadcrumbs.rs lib/git/src/handler/html/breadcrumbs.rs +1 −0 View lib/git/src/handler/html/breadcrumbs.rs
@@ -20,6 +20,7 @@
2020 get,
2121 path = "/repos/{space_name}/{repo_name}/html/breadcrumbs",
2222 tag = "html",
23 description = "渲染目录路径面包屑 HTML 片段。",
2324 operation_id = "render_breadcrumbs",
2425 params(HtmlRepoPath, BreadcrumbsQuery),
2526 responses(
Modified lib/git/src/handler/html/clone_buttons.rs lib/git/src/handler/html/clone_buttons.rs +1 −0 View lib/git/src/handler/html/clone_buttons.rs
@@ -10,6 +10,7 @@
1010 get,
1111 path = "/repos/{space_name}/{repo_name}/html/clone-buttons",
1212 tag = "html",
13 description = "渲染 HTTPS 与 SSH 克隆地址及复制按钮片段。",
1314 operation_id = "render_clone_buttons",
1415 params(HtmlRepoPath),
1516 responses(
Modified lib/git/src/handler/html/commit_diff.rs lib/git/src/handler/html/commit_diff.rs +1 −0 View lib/git/src/handler/html/commit_diff.rs
@@ -23,6 +23,7 @@
2323 get,
2424 path = "/repos/{space_name}/{repo_name}/html/commit-diff",
2525 tag = "html",
26 description = "渲染单个提交相对首父的差异 HTML 片段。",
2627 operation_id = "render_commit_diff",
2728 params(HtmlRepoPath, CommitDiffQuery),
2829 responses(
Modified lib/git/src/handler/html/commits.rs lib/git/src/handler/html/commits.rs +1 −0 View lib/git/src/handler/html/commits.rs
@@ -30,6 +30,7 @@
3030 get,
3131 path = "/repos/{space_name}/{repo_name}/html/commits",
3232 tag = "html",
33 description = "渲染带分页操作的提交历史列表片段。",
3334 operation_id = "render_commits",
3435 params(HtmlRepoPath, CommitsQuery),
3536 responses(
Modified lib/git/src/handler/html/header.rs lib/git/src/handler/html/header.rs +1 −0 View lib/git/src/handler/html/header.rs
@@ -10,6 +10,7 @@
1010 get,
1111 path = "/repos/{space_name}/{repo_name}/html/header",
1212 tag = "html",
13 description = "渲染仓库标题、可见性和归档状态头部片段。",
1314 operation_id = "render_header",
1415 params(HtmlRepoPath),
1516 responses(
Modified lib/git/src/handler/html/languages.rs lib/git/src/handler/html/languages.rs +1 −0 View lib/git/src/handler/html/languages.rs
@@ -10,6 +10,7 @@
1010 get,
1111 path = "/repos/{space_name}/{repo_name}/html/languages",
1212 tag = "html",
13 description = "渲染语言占比色条;缺少统计时按需触发计算。",
1314 operation_id = "render_languages",
1415 params(HtmlRepoPath),
1516 responses(
Modified lib/git/src/handler/html/last_commit.rs lib/git/src/handler/html/last_commit.rs +1 −0 View lib/git/src/handler/html/last_commit.rs
@@ -24,6 +24,7 @@
2424 get,
2525 path = "/repos/{space_name}/{repo_name}/html/last-commit",
2626 tag = "html",
27 description = "渲染目录最近一次提交摘要行。",
2728 operation_id = "render_last_commit",
2829 params(HtmlRepoPath, LastCommitQuery),
2930 responses(
Modified lib/git/src/handler/html/quickstart.rs lib/git/src/handler/html/quickstart.rs +1 −0 View lib/git/src/handler/html/quickstart.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/repos/{space_name}/{repo_name}/html/quickstart",
1414 tag = "html",
15 description = "渲染空仓库或已初始化仓库的快速上手指引。",
1516 operation_id = "render_quickstart",
1617 params(HtmlRepoPath),
1718 responses(
Modified lib/git/src/handler/html/readme.rs lib/git/src/handler/html/readme.rs +1 −0 View lib/git/src/handler/html/readme.rs
@@ -36,6 +36,7 @@
3636 get,
3737 path = "/repos/{space_name}/{repo_name}/html/readme",
3838 tag = "html",
39 description = "查找目录中的 README 并渲染为 HTML 片段。",
3940 operation_id = "render_readme",
4041 params(HtmlRepoPath, ReadmeQuery),
4142 responses(
Modified lib/git/src/handler/html/refs_dropdown.rs lib/git/src/handler/html/refs_dropdown.rs +1 −0 View lib/git/src/handler/html/refs_dropdown.rs
@@ -17,6 +17,7 @@
1717 get,
1818 path = "/repos/{space_name}/{repo_name}/html/refs-dropdown",
1919 tag = "html",
20 description = "渲染分支与标签切换下拉框片段。",
2021 operation_id = "render_refs_dropdown",
2122 params(HtmlRepoPath, RefsDropdownQuery),
2223 responses(
Modified lib/git/src/handler/html/refs_summary.rs lib/git/src/handler/html/refs_summary.rs +1 −0 View lib/git/src/handler/html/refs_summary.rs
@@ -10,6 +10,7 @@
1010 get,
1111 path = "/repos/{space_name}/{repo_name}/html/refs-summary",
1212 tag = "html",
13 description = "渲染分支与标签数量摘要片段。",
1314 operation_id = "render_refs_summary",
1415 params(HtmlRepoPath),
1516 responses(
Modified lib/git/src/handler/html/star_button.rs lib/git/src/handler/html/star_button.rs +1 −0 View lib/git/src/handler/html/star_button.rs
@@ -10,6 +10,7 @@
1010 get,
1111 path = "/repos/{space_name}/{repo_name}/html/star-button",
1212 tag = "html",
13 description = "渲染当前用户视角的加星按钮与星数片段。",
1314 operation_id = "render_star_button",
1415 params(HtmlRepoPath),
1516 responses(
Modified lib/git/src/handler/html/tree.rs lib/git/src/handler/html/tree.rs +1 −0 View lib/git/src/handler/html/tree.rs
@@ -28,6 +28,7 @@
2828 get,
2929 path = "/repos/{space_name}/{repo_name}/html/tree",
3030 tag = "html",
31 description = "渲染目录列表表格及每个条目的最近提交信息。",
3132 operation_id = "render_tree",
3233 params(HtmlRepoPath, TreeQuery),
3334 responses(
Modified lib/git/src/handler/html/tree_row.rs lib/git/src/handler/html/tree_row.rs +1 −0 View lib/git/src/handler/html/tree_row.rs
@@ -25,6 +25,7 @@
2525 get,
2626 path = "/repos/{space_name}/{repo_name}/html/tree-row",
2727 tag = "html",
28 description = "渲染目录列表中单个条目的 HTML 行片段。",
2829 operation_id = "render_tree_row",
2930 params(HtmlRepoPath, TreeRowQuery),
3031 responses(
Modified lib/git/src/handler/html/watch_button.rs lib/git/src/handler/html/watch_button.rs +1 −0 View lib/git/src/handler/html/watch_button.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/repos/{space_name}/{repo_name}/html/watch-button",
1313 tag = "html",
14 description = "渲染关注按钮、当前模式和关注者人数片段。",
1415 operation_id = "render_watch_button",
1516 params(HtmlRepoPath),
1617 responses(
Modified lib/git/src/handler/lfs/cleanup_unreferenced.rs lib/git/src/handler/lfs/cleanup_unreferenced.rs +1 −0 View lib/git/src/handler/lfs/cleanup_unreferenced.rs
@@ -15,6 +15,7 @@
1515 post,
1616 path = "/repos/{space_name}/{repo_name}/lfs/cleanup",
1717 tag = "lfs",
18 description = "清理 LFS 数据库中失引用记录与存储中的未引用对象。",
1819 params(RepoPath),
1920 responses(
2021 (status = 200, description = "cleanup unreferenced lfs objects", body = AppResponseData<LfsCleanupResponse>)
Modified lib/git/src/handler/lfs/list_locks.rs lib/git/src/handler/lfs/list_locks.rs +1 −0 View lib/git/src/handler/lfs/list_locks.rs
@@ -19,6 +19,7 @@
1919 get,
2020 path = "/repos/{space_name}/{repo_name}/lfs/locks",
2121 tag = "lfs",
22 description = "按创建时间游标分页读取仓库 LFS 文件锁。",
2223 params(RepoPath, LfsListLocksQuery),
2324 responses(
2425 (status = 200, description = "list lfs locks", body = AppResponseData<LfsLockListResponse>)
Modified lib/git/src/handler/lfs/lock.rs lib/git/src/handler/lfs/lock.rs +1 −0 View lib/git/src/handler/lfs/lock.rs
@@ -19,6 +19,7 @@
1919 post,
2020 path = "/repos/{space_name}/{repo_name}/lfs/locks",
2121 tag = "lfs",
22 description = "为启用 LFS 的仓库路径创建文件锁。",
2223 params(RepoPath),
2324 request_body = LfsLockBody,
2425 responses(
Modified lib/git/src/handler/lfs/unlock.rs lib/git/src/handler/lfs/unlock.rs +1 −0 View lib/git/src/handler/lfs/unlock.rs
@@ -17,6 +17,7 @@
1717 delete,
1818 path = "/repos/{space_name}/{repo_name}/lfs/locks",
1919 tag = "lfs",
20 description = "按路径释放 LFS 文件锁;管理员可用 force 越权释放。",
2021 params(RepoPath, LfsUnlockPathQuery),
2122 responses(
2223 (status = 200, description = "remove lfs lock by path", body = AppResponseData<NoData>)
Modified lib/git/src/handler/lfs/unlock_by_id.rs lib/git/src/handler/lfs/unlock_by_id.rs +1 −0 View lib/git/src/handler/lfs/unlock_by_id.rs
@@ -23,6 +23,7 @@
2323 delete,
2424 path = "/repos/{space_name}/{repo_name}/lfs/locks/{lock_id}",
2525 tag = "lfs",
26 description = "按锁 ID 释放 LFS 文件锁,规则与按路径解锁一致。",
2627 params(LfsLockIdPath, LfsUnlockQuery),
2728 responses(
2829 (status = 200, description = "remove lfs lock by id", body = AppResponseData<NoData>)
Modified lib/git/src/handler/lfs/verify_locks.rs lib/git/src/handler/lfs/verify_locks.rs +1 −0 View lib/git/src/handler/lfs/verify_locks.rs
@@ -17,6 +17,7 @@
1717 post,
1818 path = "/repos/{space_name}/{repo_name}/lfs/locks/verify",
1919 tag = "lfs",
20 description = "返回当前用户的 LFS 锁并区分他人持有的锁。",
2021 params(RepoPath, LfsVerifyLocksQuery),
2122 responses(
2223 (status = 200, description = "verify lfs locks", body = AppResponseData<LfsVerifyLocksResponse>)
Modified lib/git/src/handler/maintenance/fsck.rs lib/git/src/handler/maintenance/fsck.rs +1 −0 View lib/git/src/handler/maintenance/fsck.rs
@@ -11,6 +11,7 @@
1111 post,
1212 path = "/repos/{space_name}/{repo_name}/maintenance/fsck",
1313 tag = "maintenance",
14 description = "执行 Git fsck 完整性检查并汇总悬空与损坏情况。",
1415 params(RepoPath),
1516 responses(
1617 (status = 200, description = "repository fsck", body = AppResponseData<FsckDto>)
Modified lib/git/src/handler/maintenance/prune.rs lib/git/src/handler/maintenance/prune.rs +1 −0 View lib/git/src/handler/maintenance/prune.rs
@@ -11,6 +11,7 @@
1111 post,
1212 path = "/repos/{space_name}/{repo_name}/maintenance/prune",
1313 tag = "maintenance",
14 description = "清理仓库中不可达的松散对象并返回对象数量统计。",
1415 params(RepoPath),
1516 responses(
1617 (status = 200, description = "repository prune", body = AppResponseData<PruneResultDto>)
Modified lib/git/src/handler/packs/ingest.rs lib/git/src/handler/packs/ingest.rs +1 −0 View lib/git/src/handler/packs/ingest.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/repos/{space_name}/{repo_name}/packs/ingest",
1414 tag = "packs",
15 description = "接收 packfile 二进制内容并索引到仓库对象库。",
1516 params(RepoPath),
1617 request_body = String,
1718 responses(
Modified lib/git/src/handler/packs/repack.rs lib/git/src/handler/packs/repack.rs +1 −0 View lib/git/src/handler/packs/repack.rs
@@ -10,6 +10,7 @@
1010 post,
1111 path = "/repos/{space_name}/{repo_name}/packs/repack",
1212 tag = "packs",
13 description = "对仓库执行全量重打包并删除冗余 pack。",
1314 params(RepoPath),
1415 responses(
1516 (status = 200, description = "repack repository", body = AppResponseData<NoData>)
Modified lib/git/src/handler/packs/stats.rs lib/git/src/handler/packs/stats.rs +1 −0 View lib/git/src/handler/packs/stats.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/repos/{space_name}/{repo_name}/packs/stats",
1313 tag = "packs",
14 description = "返回仓库松散对象数量与体积统计。",
1415 params(RepoPath),
1516 responses(
1617 (status = 200, description = "pack statistics", body = AppResponseData<PackStatsDto>)
Modified lib/git/src/handler/patches/apply.rs lib/git/src/handler/patches/apply.rs +1 −0 View lib/git/src/handler/patches/apply.rs
@@ -18,6 +18,7 @@
1818 post,
1919 path = "/repos/{space_name}/{repo_name}/patch/apply",
2020 tag = "patches",
21 description = "预演补丁在指定基线上能否应用,不修改仓库。",
2122 params(crate::handler::RepoPath),
2223 request_body = PatchApplyBody,
2324 responses(
Modified lib/git/src/handler/patches/generate.rs lib/git/src/handler/patches/generate.rs +1 −0 View lib/git/src/handler/patches/generate.rs
@@ -17,6 +17,7 @@
1717 get,
1818 path = "/repos/{space_name}/{repo_name}/patch/generate",
1919 tag = "patches",
20 description = "基于两个修订生成可保存的补丁内容。",
2021 params(crate::handler::RepoPath, PatchGenerateQuery),
2122 responses(
2223 (status = 200, description = "generate patch", body = AppResponseData<PatchDto>)
Modified lib/git/src/handler/patches/parse.rs lib/git/src/handler/patches/parse.rs +1 −0 View lib/git/src/handler/patches/parse.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/repos/utils/patch/parse",
1414 tag = "patches",
15 description = "解析补丁文本并统计涉及文件与增删行数。",
1516 request_body = String,
1617 responses(
1718 (status = 200, description = "parse patch", body = AppResponseData<ParsedPatchDto>)
Modified lib/git/src/handler/pipelines/cancel.rs lib/git/src/handler/pipelines/cancel.rs +1 −0 View lib/git/src/handler/pipelines/cancel.rs
@@ -16,6 +16,7 @@
1616 post,
1717 path = "/repos/_/pipelines/cancel",
1818 tag = "pipelines",
19 description = "按作业 ID 将未完成流水线标记为请求取消。",
1920 request_body = PipelineCancelBody,
2021 responses(
2122 (status = 200, description = "cancel pipeline job", body = AppResponseData<NoData>)
Modified lib/git/src/handler/pipelines/get_run.rs lib/git/src/handler/pipelines/get_run.rs +1 −0 View lib/git/src/handler/pipelines/get_run.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/repos/{space_name}/{repo_name}/pipelines/{job_id}",
1414 tag = "pipelines",
15 description = "读取指定流水线运行详情;其他仓库的任务按不存在处理。",
1516 params(
1617 ("space_name" = String, Path),
1718 ("repo_name" = String, Path),
Modified lib/git/src/handler/pipelines/list_runs.rs lib/git/src/handler/pipelines/list_runs.rs +1 −0 View lib/git/src/handler/pipelines/list_runs.rs
@@ -23,6 +23,7 @@
2323 get,
2424 path = "/repos/{space_name}/{repo_name}/pipelines",
2525 tag = "pipelines",
26 description = "按提交、分支和状态分页读取仓库流水线运行记录。",
2627 params(RepoPath, ListRunsQuery),
2728 responses(
2829 (status = 200, description = "list pipeline runs", body = AppResponseData<Vec<PipelineRunDto>>)
Modified lib/git/src/handler/pipelines/report_run.rs lib/git/src/handler/pipelines/report_run.rs +1 −0 View lib/git/src/handler/pipelines/report_run.rs
@@ -21,6 +21,7 @@
2121 post,
2222 path = "/repos/_/pipelines/{job_id}/report",
2323 tag = "pipelines",
24 description = "供流水线执行器回报运行状态和起止时间。",
2425 params(("job_id" = String, Path)),
2526 request_body = PipelineReportBody,
2627 responses(
Modified lib/git/src/handler/pipelines/schedule.rs lib/git/src/handler/pipelines/schedule.rs +1 −0 View lib/git/src/handler/pipelines/schedule.rs
@@ -22,6 +22,7 @@
2222 post,
2323 path = "/repos/{space_name}/{repo_name}/pipelines/schedule",
2424 tag = "pipelines",
25 description = "根据作业定义登记排队中的流水线运行记录。",
2526 params(RepoPath, PipelineScheduleQuery),
2627 request_body = PipelineScheduleBody,
2728 responses(
Modified lib/git/src/handler/pipelines/trigger.rs lib/git/src/handler/pipelines/trigger.rs +1 −0 View lib/git/src/handler/pipelines/trigger.rs
@@ -17,6 +17,7 @@
1717 post,
1818 path = "/repos/{space_name}/{repo_name}/pipelines/trigger",
1919 tag = "pipelines",
20 description = "为指定提交与分支创建排队中的流水线运行记录。",
2021 params(RepoPath, PipelineTriggerQuery),
2122 responses(
2223 (status = 200, description = "trigger pipeline", body = AppResponseData<TriggerResultDto>)
Modified lib/git/src/handler/refs/branches.rs lib/git/src/handler/refs/branches.rs +1 −0 View lib/git/src/handler/refs/branches.rs
@@ -19,6 +19,7 @@
1919 get,
2020 path = "/repos/{space_name}/{repo_name}/refs/branches",
2121 tag = "refs",
22 description = "返回分支引用摘要及保护标记,供内部 Git 流程分页使用。",
2223 params(crate::handler::RepoPath, RefsBranchesQuery),
2324 responses(
2425 (status = 200, description = "list branch refs", body = AppResponseData<Vec<BranchInfoDto>>)
Modified lib/git/src/handler/refs/delete.rs lib/git/src/handler/refs/delete.rs +1 −0 View lib/git/src/handler/refs/delete.rs
@@ -17,6 +17,7 @@
1717 delete,
1818 path = "/repos/{space_name}/{repo_name}/refs/{name}",
1919 tag = "refs",
20 description = "删除完全限定的 Git 引用;受保护分支或标签会被拒绝。",
2021 params(RefPath),
2122 responses(
2223 (status = 200, description = "delete ref", body = AppResponseData<NoData>)
Modified lib/git/src/handler/refs/filtered.rs lib/git/src/handler/refs/filtered.rs +1 −0 View lib/git/src/handler/refs/filtered.rs
@@ -16,6 +16,7 @@
1616 get,
1717 path = "/repos/{space_name}/{repo_name}/refs/filtered",
1818 tag = "refs",
19 description = "按通配模式过滤并返回匹配的 Git 引用。",
1920 params(crate::handler::RepoPath, RefsFilteredQuery),
2021 responses(
2122 (status = 200, description = "list refs by pattern")
Modified lib/git/src/handler/refs/get.rs lib/git/src/handler/refs/get.rs +1 −0 View lib/git/src/handler/refs/get.rs
@@ -18,6 +18,7 @@
1818 get,
1919 path = "/repos/{space_name}/{repo_name}/refs/{name}",
2020 tag = "refs",
21 description = "按引用名称读取单个 Git 引用。",
2122 params(RefPath),
2223 responses(
2324 (status = 200, description = "get ref")
Modified lib/git/src/handler/refs/head.rs lib/git/src/handler/refs/head.rs +1 −0 View lib/git/src/handler/refs/head.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/repos/{space_name}/{repo_name}/refs/head",
1313 tag = "refs",
14 description = "读取 HEAD 所指向的默认分支及其目标提交。",
1415 params(crate::handler::RepoPath),
1516 responses(
1617 (status = 200, description = "get head ref", body = AppResponseData<HeadInfoDto>)
Modified lib/git/src/handler/refs/is_object_in_ref.rs lib/git/src/handler/refs/is_object_in_ref.rs +1 −0 View lib/git/src/handler/refs/is_object_in_ref.rs
@@ -22,6 +22,7 @@
2222 get,
2323 path = "/repos/{space_name}/{repo_name}/refs/contains",
2424 tag = "refs",
25 description = "判断指定完整对象 ID 是否被某个同名引用直接指向。",
2526 params(crate::handler::RepoPath, ContainsQuery),
2627 responses(
2728 (status = 200, description = "check object in ref", body = AppResponseData<IsObjectInRefResponse>)
Modified lib/git/src/handler/refs/list.rs lib/git/src/handler/refs/list.rs +1 −0 View lib/git/src/handler/refs/list.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/repos/{space_name}/{repo_name}/refs",
1313 tag = "refs",
14 description = "列出仓库内部使用的全部 Git 引用。",
1415 params(crate::handler::RepoPath),
1516 responses(
1617 (status = 200, description = "list refs")
Modified lib/git/src/handler/refs/resolve.rs lib/git/src/handler/refs/resolve.rs +1 −0 View lib/git/src/handler/refs/resolve.rs
@@ -17,6 +17,7 @@
1717 get,
1818 path = "/repos/{space_name}/{repo_name}/refs/{name}/resolve",
1919 tag = "refs",
20 description = "将引用名或修订表达式解析为完整对象 ID。",
2021 params(RefPath),
2122 responses(
2223 (status = 200, description = "resolve ref", body = AppResponseData<String>)
Modified lib/git/src/handler/refs/update.rs lib/git/src/handler/refs/update.rs +1 −0 View lib/git/src/handler/refs/update.rs
@@ -26,6 +26,7 @@
2626 patch,
2727 path = "/repos/{space_name}/{repo_name}/refs/{name}",
2828 tag = "refs",
29 description = "更新完全限定引用的目标对象,可选 expected_oid 提供 CAS 语义。",
2930 params(RefPath),
3031 request_body = RefUpdateBody,
3132 responses(
Modified lib/git/src/handler/remotes/add.rs lib/git/src/handler/remotes/add.rs +1 −0 View lib/git/src/handler/remotes/add.rs
@@ -23,6 +23,7 @@
2323 put,
2424 path = "/repos/{space_name}/{repo_name}/remotes/{name}",
2525 tag = "remotes",
26 description = "新增或幂等更新远程地址,并校验 URL 协议与内网访问限制。",
2627 params(RemotePath),
2728 request_body = RemoteAddBody,
2829 responses(
Modified lib/git/src/handler/remotes/clone_import.rs lib/git/src/handler/remotes/clone_import.rs +1 −0 View lib/git/src/handler/remotes/clone_import.rs
@@ -19,6 +19,7 @@
1919 post,
2020 path = "/repos/{space_name}/{repo_name}/remotes/import",
2121 tag = "remotes",
22 description = "以镜像抓取方式将外部仓库的全部引用导入现有仓库。",
2223 params(RepoPath),
2324 request_body = RemoteImportBody,
2425 responses(
Modified lib/git/src/handler/remotes/fetch.rs lib/git/src/handler/remotes/fetch.rs +1 −0 View lib/git/src/handler/remotes/fetch.rs
@@ -19,6 +19,7 @@
1919 post,
2020 path = "/repos/{space_name}/{repo_name}/remotes/fetch",
2121 tag = "remotes",
22 description = "从指定远程抓取引用并修剪已删除的远端分支。",
2223 params(RepoPath),
2324 request_body = RemoteFetchBody,
2425 responses(
Modified lib/git/src/handler/remotes/list.rs lib/git/src/handler/remotes/list.rs +1 −0 View lib/git/src/handler/remotes/list.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/repos/{space_name}/{repo_name}/remotes",
1414 tag = "remotes",
15 description = "列出仓库远程及其 fetch 与 push 地址。",
1516 params(RepoPath),
1617 responses(
1718 (status = 200, description = "configured remotes", body = AppResponseData<Vec<RemoteDto>>)
Modified lib/git/src/handler/remotes/push.rs lib/git/src/handler/remotes/push.rs +1 −0 View lib/git/src/handler/remotes/push.rs
@@ -21,6 +21,7 @@
2121 post,
2222 path = "/repos/{space_name}/{repo_name}/remotes/push",
2323 tag = "remotes",
24 description = "推送指定 refspec 到远程,并返回成功与被拒绝的引用。",
2425 params(RepoPath),
2526 request_body = RemotePushBody,
2627 responses(
Modified lib/git/src/handler/remotes/remove.rs lib/git/src/handler/remotes/remove.rs +1 −0 View lib/git/src/handler/remotes/remove.rs
@@ -17,6 +17,7 @@
1717 delete,
1818 path = "/repos/{space_name}/{repo_name}/remotes/{name}",
1919 tag = "remotes",
20 description = "删除仓库配置的指定远程。",
2021 params(RemotePath),
2122 responses(
2223 (status = 200, description = "remove remote", body = AppResponseData<NoData>)
Modified lib/git/src/handler/repos/archive.rs lib/git/src/handler/repos/archive.rs +2 −0 View lib/git/src/handler/repos/archive.rs
@@ -11,6 +11,7 @@
1111 post,
1212 path = "/repos/{space_name}/{repo_name}/archive",
1313 tag = "repos",
14 description = "将仓库标记为归档状态,禁止继续作为常规写入目标。",
1415 params(RepoPath),
1516 responses(
1617 (status = 200, description = "archive repo", body = AppResponseData<RepoDto>)
@@ -33,6 +34,7 @@
3334 post,
3435 path = "/repos/{space_name}/{repo_name}/unarchive",
3536 tag = "repos",
37 description = "清除仓库的归档状态,使仓库恢复为可常规使用。",
3638 params(RepoPath),
3739 responses(
3840 (status = 200, description = "unarchive repo", body = AppResponseData<RepoDto>)
Modified lib/git/src/handler/repos/create.rs lib/git/src/handler/repos/create.rs +1 −0 View lib/git/src/handler/repos/create.rs
@@ -18,6 +18,7 @@
1818 post,
1919 path = "/repos/{space_name}",
2020 tag = "repos",
21 description = "在指定空间下创建仓库记录并初始化裸库和初始提交;仅空间所有者可操作。",
2122 params(SpacePath),
2223 request_body = CreateRepoCmd,
2324 responses(
Modified lib/git/src/handler/repos/get.rs lib/git/src/handler/repos/get.rs +1 −0 View lib/git/src/handler/repos/get.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/repos/{space_name}/{repo_name}",
1313 tag = "repos",
14 description = "读取仓库详情,并在已登录时附带当前用户的加星和关注状态。",
1415 params(RepoPath),
1516 responses(
1617 (status = 200, description = "get repo", body = AppResponseData<RepoDto>)
Modified lib/git/src/handler/repos/list.rs lib/git/src/handler/repos/list.rs +1 −0 View lib/git/src/handler/repos/list.rs
@@ -15,6 +15,7 @@
1515 get,
1616 path = "/repos/{space_name}",
1717 tag = "repos",
18 description = "分页列出空间中当前调用者可见的仓库,并支持名称、时间或星数排序。",
1819 params(SpacePath, export::pagination::PageQuery),
1920 responses(
2021 (status = 200, description = "list repos", body = AppResponseData<export::pagination::Page<RepoSummaryDto>>)
Modified lib/git/src/handler/repos/update.rs lib/git/src/handler/repos/update.rs +1 −0 View lib/git/src/handler/repos/update.rs
@@ -12,6 +12,7 @@
1212 patch,
1313 path = "/repos/{space_name}/{repo_name}",
1414 tag = "repos",
15 description = "更新仓库描述、主页、可见性、LFS 和默认分支;仅空间所有者可操作。",
1516 params(RepoPath),
1617 request_body = UpdateRepoCmd,
1718 responses(
Modified lib/git/src/handler/signatures/verify_commit.rs lib/git/src/handler/signatures/verify_commit.rs +1 −0 View lib/git/src/handler/signatures/verify_commit.rs
@@ -18,6 +18,7 @@
1818 get,
1919 path = "/repos/{space_name}/{repo_name}/signatures/commit/{sha}",
2020 tag = "signatures",
21 description = "验证提交 GPG 签名并返回签名者、密钥和验证结果。",
2122 params(CommitShaPath),
2223 responses(
2324 (status = 200, description = "verify commit signature", body = AppResponseData<VerifyResultDto>)
Modified lib/git/src/handler/signatures/verify_tag.rs lib/git/src/handler/signatures/verify_tag.rs +1 −0 View lib/git/src/handler/signatures/verify_tag.rs
@@ -18,6 +18,7 @@
1818 get,
1919 path = "/repos/{space_name}/{repo_name}/signatures/tag/{name}",
2020 tag = "signatures",
21 description = "验证附注标签的 GPG 签名并返回签名结果。",
2122 params(TagNamePath),
2223 responses(
2324 (status = 200, description = "verify tag signature", body = AppResponseData<VerifyResultDto>)
Modified lib/git/src/handler/submodules/list.rs lib/git/src/handler/submodules/list.rs +1 −0 View lib/git/src/handler/submodules/list.rs
@@ -16,6 +16,7 @@
1616 get,
1717 path = "/repos/{space_name}/{repo_name}/submodules",
1818 tag = "submodules",
19 description = "读取指定修订根树中的子模块条目,并合并 URL、分支和记录的提交。",
1920 params(
2021 crate::handler::RepoPath,
2122 SubmoduleListQuery,
Modified lib/git/src/handler/submodules/resolve.rs lib/git/src/handler/submodules/resolve.rs +1 −0 View lib/git/src/handler/submodules/resolve.rs
@@ -16,6 +16,7 @@
1616 get,
1717 path = "/repos/{space_name}/{repo_name}/submodules/resolve",
1818 tag = "submodules",
19 description = "解析指定修订下子模块路径记录的 Gitlink 提交 ID。",
1920 params(
2021 crate::handler::RepoPath,
2122 SubmoduleResolveQuery,
Modified lib/git/src/handler/tags/create.rs lib/git/src/handler/tags/create.rs +1 −0 View lib/git/src/handler/tags/create.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/repos/{space_name}/{repo_name}/tags",
1414 tag = "tags",
15 description = "在指定目标上创建附注或轻量标签,并登记标签元数据。",
1516 params(crate::handler::RepoPath),
1617 request_body = CreateTagCmd,
1718 responses(
Modified lib/git/src/handler/tags/delete.rs lib/git/src/handler/tags/delete.rs +1 −0 View lib/git/src/handler/tags/delete.rs
@@ -17,6 +17,7 @@
1717 delete,
1818 path = "/repos/{space_name}/{repo_name}/tags/{name}",
1919 tag = "tags",
20 description = "删除标签引用和数据库记录;受保护标签会被拒绝。",
2021 params(TagPath),
2122 responses(
2223 (status = 200, description = "delete tag", body = AppResponseData<NoData>)
Modified lib/git/src/handler/tags/get.rs lib/git/src/handler/tags/get.rs +1 −0 View lib/git/src/handler/tags/get.rs
@@ -18,6 +18,7 @@
1818 get,
1919 path = "/repos/{space_name}/{repo_name}/tags/{name}",
2020 tag = "tags",
21 description = "读取单个标签详情及其指向的标签或提交对象。",
2122 params(TagPath),
2223 responses(
2324 (status = 200, description = "get tag", body = AppResponseData<TagDto>)
Modified lib/git/src/handler/tags/list.rs lib/git/src/handler/tags/list.rs +1 −0 View lib/git/src/handler/tags/list.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/repos/{space_name}/{repo_name}/tags",
1313 tag = "tags",
14 description = "分页列出仓库标签及其类型、目标提交和打标签信息。",
1415 params(crate::handler::RepoPath, export::pagination::PageQuery),
1516 responses(
1617 (status = 200, description = "list tags", body = AppResponseData<export::pagination::Page<TagDto>>)
Modified lib/git/src/handler/trees/read.rs lib/git/src/handler/trees/read.rs +1 −0 View lib/git/src/handler/trees/read.rs
@@ -35,6 +35,7 @@
3535 get,
3636 path = "/repos/{space_name}/{repo_name}/tree/{revision}",
3737 tag = "trees",
38 description = "读取修订下的目录树,并支持递归、符号链接解析和更新时间视图。",
3839 params(
3940 crate::handler::RepoPathRev,
4041 GetTreeQuery,
Modified lib/git/src/handler/blame.rs lib/git/src/handler/blame.rs +1 −0 View lib/git/src/handler/blame.rs
@@ -21,6 +21,7 @@
2121 get,
2222 path = "/repos/{space_name}/{repo_name}/blame",
2323 tag = "blame",
24 description = "返回文件逐行 blame 区间,可限定连续行范围。",
2425 params(
2526 crate::handler::RepoPath,
2627 BlameQuery,
Modified lib/git/src/handler/graphql.rs lib/git/src/handler/graphql.rs +2 −0 View lib/git/src/handler/graphql.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/graphql",
1414 tag = "graphql",
15 description = "执行仓库只读 GraphQL 查询,并解析器内施加仓库读权限。",
1516 request_body = String,
1617 responses(
1718 (status = 200, description = "graphql execution result")
@@ -32,6 +33,7 @@
3233 get,
3334 path = "/graphql",
3435 tag = "graphql",
36 description = "通过固定内省查询探活 GraphQL 服务。",
3537 responses(
3638 (status = 200, description = "graphql execution result")
3739 )
Modified lib/git/src/handler/licenses.rs lib/git/src/handler/licenses.rs +3 −0 View lib/git/src/handler/licenses.rs
@@ -23,6 +23,7 @@
2323 get,
2424 path = "/licenses",
2525 tag = "licenses",
26 description = "分页列出系统登记的许可证。",
2627 params(LicenseListQuery),
2728 responses(
2829 (status = 200, description = "list licenses", body = AppResponseData<Vec<LicenseDto>>)
@@ -51,6 +52,7 @@
5152 get,
5253 path = "/licenses/{name}",
5354 tag = "licenses",
55 description = "按名称读取许可证全文与登记信息。",
5456 params(LicenseNamePath),
5557 responses(
5658 (status = 200, description = "get license", body = AppResponseData<LicenseDto>)
@@ -71,6 +73,7 @@
7173 put,
7274 path = "/licenses/{name}",
7375 tag = "licenses",
76 description = "由内部服务登记或更新许可证定义。",
7477 params(LicenseNamePath),
7578 request_body = UpsertLicenseCmd,
7679 responses(
Modified lib/git/src/handler/path_log.rs lib/git/src/handler/path_log.rs +1 −0 View lib/git/src/handler/path_log.rs
@@ -17,6 +17,7 @@
1717 get,
1818 path = "/repos/{space_name}/{repo_name}/path-log",
1919 tag = "logs",
20 description = "返回目录中每个条目的最近一次提交摘要。",
2021 params(
2122 crate::handler::RepoPath,
2223 PathLogQuery,
Modified lib/git/src/handler/stars.rs lib/git/src/handler/stars.rs +3 −0 View lib/git/src/handler/stars.rs
@@ -25,6 +25,7 @@
2525 put,
2626 path = "/repos/{space_name}/{repo_name}/star",
2727 tag = "repos",
28 description = "为仓库加星并返回加星后的总星数。",
2829 params(RepoPath),
2930 responses(
3031 (status = 200, description = "star repo", body = AppResponseData<RepoStarResp>)
@@ -54,6 +55,7 @@
5455 delete,
5556 path = "/repos/{space_name}/{repo_name}/star",
5657 tag = "repos",
58 description = "取消当前用户对仓库的加星并返回最新星数。",
5759 params(RepoPath),
5860 responses(
5961 (status = 200, description = "unstar repo", body = AppResponseData<RepoStarResp>)
@@ -83,6 +85,7 @@
8385 get,
8486 path = "/repos/{space_name}/{repo_name}/stargazers",
8587 tag = "repos",
88 description = "分页列出最近为仓库加星的用户。",
8689 params(RepoPath, StarQuery),
8790 responses(
8891 (status = 200, description = "list stargazers", body = AppResponseData<Vec<StargazerDto>>)
Modified lib/git/src/handler/topics.rs lib/git/src/handler/topics.rs +7 −0 View lib/git/src/handler/topics.rs
@@ -37,6 +37,7 @@
3737 post,
3838 path = "/topics",
3939 tag = "topics",
40 description = "创建全局标签;同名时幂等返回已有标签。",
4041 request_body = CreateTopicCmd,
4142 responses(
4243 (status = 200, description = "create topic", body = AppResponseData<TopicDto>)
@@ -57,6 +58,7 @@
5758 get,
5859 path = "/topics",
5960 tag = "topics",
61 description = "分页列出系统全部标签。",
6062 params(TopicListQuery),
6163 responses(
6264 (status = 200, description = "list topics", body = AppResponseData<Vec<TopicDto>>)
@@ -82,6 +84,7 @@
8284 get,
8385 path = "/topics/{name}",
8486 tag = "topics",
87 description = "按名称读取单个标签。",
8588 params(TopicNamePath),
8689 responses(
8790 (status = 200, description = "get topic", body = AppResponseData<TopicDto>)
@@ -102,6 +105,7 @@
102105 get,
103106 path = "/topics/{name}/repos",
104107 tag = "topics",
108 description = "分页列出关联某标签的仓库记录。",
105109 params(TopicNamePath, TopicListQuery),
106110 responses(
107111 (status = 200, description = "repos using topic", body = AppResponseData<Vec<TopicRepoDto>>)
@@ -128,6 +132,7 @@
128132 put,
129133 path = "/repos/{space_name}/{repo_name}/topics/{topic_name}",
130134 tag = "repos",
135 description = "为仓库绑定标签,并在标签不存在时自动创建。",
131136 params(RepoTopicPath),
132137 responses(
133138 (status = 200, description = "add topic to repo", body = AppResponseData<TopicDto>)
@@ -156,6 +161,7 @@
156161 delete,
157162 path = "/repos/{space_name}/{repo_name}/topics/{topic_name}",
158163 tag = "repos",
164 description = "解除仓库与指定标签的关联,但保留标签本身。",
159165 params(RepoTopicPath),
160166 responses(
161167 (status = 200, description = "remove topic from repo", body = AppResponseData<NoData>)
@@ -184,6 +190,7 @@
184190 get,
185191 path = "/repos/{space_name}/{repo_name}/topics",
186192 tag = "repos",
193 description = "列出仓库当前绑定的标签。",
187194 params(RepoPath),
188195 responses(
189196 (status = 200, description = "list repo topics", body = AppResponseData<Vec<TopicDto>>)
Modified lib/git/src/handler/watches.rs lib/git/src/handler/watches.rs +2 −0 View lib/git/src/handler/watches.rs
@@ -22,6 +22,7 @@
2222 put,
2323 path = "/repos/{space_name}/{repo_name}/watch",
2424 tag = "repos",
25 description = "设置或更新当前用户对仓库的关注、不关注或忽略模式。",
2526 params(RepoPath),
2627 request_body = UpsertWatchCmd,
2728 responses(
@@ -53,6 +54,7 @@
5354 get,
5455 path = "/repos/{space_name}/{repo_name}/watchers",
5556 tag = "repos",
57 description = "分页列出仓库关注者,并可按关注模式过滤。",
5658 params(RepoPath, WatchQuery),
5759 responses(
5860 (status = 200, description = "list watchers", body = AppResponseData<Vec<WatcherDto>>)
Modified lib/git/src/handler/whitelists.rs lib/git/src/handler/whitelists.rs +6 −0 View lib/git/src/handler/whitelists.rs
@@ -48,6 +48,7 @@
4848 post,
4949 path = "/repos/{space_name}/{repo_name}/branch-protection/{policy_id}/whitelists",
5050 tag = "branch_protection",
51 description = "为分支保护策略添加用户或群组白名单。",
5152 params(BranchPolicyPath),
5253 request_body = AddBranchWhitelistCmd,
5354 responses(
@@ -78,6 +79,7 @@
7879 delete,
7980 path = "/repos/{space_name}/{repo_name}/branch-protection/{policy_id}/whitelists/{whitelist_id}",
8081 tag = "branch_protection",
82 description = "删除指定分支保护策略下的白名单条目。",
8183 params(BranchWhitelistPath),
8284 responses(
8385 (status = 200, description = "remove branch whitelist", body = AppResponseData<NoData>)
@@ -106,6 +108,7 @@
106108 get,
107109 path = "/repos/{space_name}/{repo_name}/branch-protection/{policy_id}/whitelists",
108110 tag = "branch_protection",
111 description = "列出分支保护策略关联的用户与群组白名单。",
109112 params(BranchPolicyPath),
110113 responses(
111114 (status = 200, description = "list branch whitelists", body = AppResponseData<Vec<BranchWhitelistDto>>)
@@ -134,6 +137,7 @@
134137 post,
135138 path = "/repos/{space_name}/{repo_name}/tag-protection/{policy_id}/whitelists",
136139 tag = "tag_protection",
140 description = "为标签保护策略添加用户白名单。",
137141 params(TagPolicyPath),
138142 request_body = AddTagWhitelistCmd,
139143 responses(
@@ -164,6 +168,7 @@
164168 delete,
165169 path = "/repos/{space_name}/{repo_name}/tag-protection/{policy_id}/whitelists/{user_id}",
166170 tag = "tag_protection",
171 description = "移除标签保护策略中的指定用户白名单。",
167172 params(TagWhitelistPath),
168173 responses(
169174 (status = 200, description = "remove tag whitelist", body = AppResponseData<export::rest::NoData>)
@@ -192,6 +197,7 @@
192197 get,
193198 path = "/repos/{space_name}/{repo_name}/tag-protection/{policy_id}/whitelists",
194199 tag = "tag_protection",
200 description = "列出标签保护策略关联的用户白名单。",
195201 params(TagPolicyPath),
196202 responses(
197203 (status = 200, description = "list tag whitelists", body = AppResponseData<Vec<TagWhitelistDto>>)
Modified lib/issues/src/handlers/boards/create_board.rs lib/issues/src/handlers/boards/create_board.rs +1 −0 View lib/issues/src/handlers/boards/create_board.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/issues/{space_name}/boards",
1414 tag = "issues",
15 description = "在空间内创建议题看板,并同步创建其目录树节点。",
1516 params(SpaceNamePath),
1617 request_body = CreateBoardCmd,
1718 responses(
Modified lib/issues/src/handlers/boards/delete_board.rs lib/issues/src/handlers/boards/delete_board.rs +1 −0 View lib/issues/src/handlers/boards/delete_board.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/issues/{space_name}/boards/{board_id}",
1313 tag = "issues",
14 description = "删除看板并级联清除其议题、评论、事件、依赖、里程碑和目录节点。",
1415 params(BoardPath),
1516 responses(
1617 (status = 200, description = "delete board", body = AppResponseData<NoData>),
Modified lib/issues/src/handlers/boards/get_board.rs lib/issues/src/handlers/boards/get_board.rs +1 −0 View lib/issues/src/handlers/boards/get_board.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/issues/{space_name}/boards/{board_id}",
1313 tag = "issues",
14 description = "读取指定看板的详情及当前议题完成统计。",
1415 params(BoardPath),
1516 responses(
1617 (status = 200, description = "get board", body = AppResponseData<BoardDto>),
Modified lib/issues/src/handlers/boards/list_boards.rs lib/issues/src/handlers/boards/list_boards.rs +1 −0 View lib/issues/src/handlers/boards/list_boards.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/issues/{space_name}/boards",
1414 tag = "issues",
15 description = "分页列出调用者可见的看板,并统计开放和已关闭议题数量。",
1516 params(SpaceNamePath, ListBoardQuery),
1617 responses(
1718 (status = 200, description = "list boards", body = AppResponseData<BoardPage>),
Modified lib/issues/src/handlers/boards/update_board.rs lib/issues/src/handlers/boards/update_board.rs +1 −0 View lib/issues/src/handlers/boards/update_board.rs
@@ -11,6 +11,7 @@
1111 patch,
1212 path = "/issues/{space_name}/boards/{board_id}",
1313 tag = "issues",
14 description = "更新看板名称、图标或描述,并同步目录节点元数据。",
1415 params(BoardPath),
1516 request_body = UpdateBoardCmd,
1617 responses(
Modified lib/issues/src/handlers/comments/create_comment.rs lib/issues/src/handlers/comments/create_comment.rs +1 −0 View lib/issues/src/handlers/comments/create_comment.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/comments",
1414 tag = "issues",
15 description = "在议题下新增评论或回复,并处理提及与通知。",
1516 params(IssuePath),
1617 request_body = CreateCommentCmd,
1718 responses(
Modified lib/issues/src/handlers/comments/delete_comment.rs lib/issues/src/handlers/comments/delete_comment.rs +1 −0 View lib/issues/src/handlers/comments/delete_comment.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/comments/{comment_id}",
1313 tag = "issues",
14 description = "删除评论并将直接回复提升为顶级评论。",
1415 params(CommentPath),
1516 responses(
1617 (status = 200, description = "delete comment", body = AppResponseData<NoData>),
Modified lib/issues/src/handlers/comments/get_comment.rs lib/issues/src/handlers/comments/get_comment.rs +1 −0 View lib/issues/src/handlers/comments/get_comment.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/comments/{comment_id}",
1313 tag = "issues",
14 description = "读取指定议题下单条评论的详情。",
1415 params(CommentPath),
1516 responses(
1617 (status = 200, description = "get comment", body = AppResponseData<CommentDto>),
Modified lib/issues/src/handlers/comments/list_comments.rs lib/issues/src/handlers/comments/list_comments.rs +1 −0 View lib/issues/src/handlers/comments/list_comments.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/comments",
1414 tag = "issues",
15 description = "分页列出议题评论,可按父评论过滤并调整排序。",
1516 params(IssuePath, ListCommentQuery),
1617 responses(
1718 (status = 200, description = "list comments", body = AppResponseData<CommentPage>),
Modified lib/issues/src/handlers/comments/list_comments_tree.rs lib/issues/src/handlers/comments/list_comments_tree.rs +1 −0 View lib/issues/src/handlers/comments/list_comments_tree.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/comments/tree",
1414 tag = "issues",
15 description = "一次性返回议题评论的完整嵌套树。",
1516 params(IssuePath),
1617 responses(
1718 (status = 200, description = "nested comment tree", body = AppResponseData<Vec<CommentTreeNode>>),
Modified lib/issues/src/handlers/comments/update_comment.rs lib/issues/src/handlers/comments/update_comment.rs +1 −0 View lib/issues/src/handlers/comments/update_comment.rs
@@ -11,6 +11,7 @@
1111 patch,
1212 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/comments/{comment_id}",
1313 tag = "issues",
14 description = "编辑评论正文,并记录编辑历史与更新事件。",
1415 params(CommentPath),
1516 request_body = UpdateCommentCmd,
1617 responses(
Modified lib/issues/src/handlers/content_history/list_content_history.rs lib/issues/src/handlers/content_history/list_content_history.rs +1 −0 View lib/issues/src/handlers/content_history/list_content_history.rs
@@ -13,6 +13,7 @@
1313 get,
1414 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/history",
1515 tag = "issues",
16 description = "分页读取议题正文或评论的修改前后历史记录。",
1617 params(ContentHistoryPath, ListContentHistoryQuery),
1718 responses(
1819 (status = 200, description = "list content history", body = AppResponseData<ContentHistoryPage>),
Modified lib/issues/src/handlers/dependencies/create_dependency.rs lib/issues/src/handlers/dependencies/create_dependency.rs +1 −0 View lib/issues/src/handlers/dependencies/create_dependency.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/dependencies",
1414 tag = "issues",
15 description = "为议题创建指向同看板另一议题的依赖关系。",
1516 params(IssuePath),
1617 request_body = CreateDependencyCmd,
1718 responses(
Modified lib/issues/src/handlers/dependencies/delete_dependency.rs lib/issues/src/handlers/dependencies/delete_dependency.rs +1 −0 View lib/issues/src/handlers/dependencies/delete_dependency.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/dependencies/{dep_id}",
1313 tag = "issues",
14 description = "按关系记录 ID 删除议题依赖。",
1415 params(DependencyPath),
1516 responses(
1617 (status = 200, description = "delete issue dependency", body = AppResponseData<NoData>),
Modified lib/issues/src/handlers/dependencies/list_dependencies.rs lib/issues/src/handlers/dependencies/list_dependencies.rs +1 −0 View lib/issues/src/handlers/dependencies/list_dependencies.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/dependencies",
1414 tag = "issues",
15 description = "列出当前议题依赖的其他议题。",
1516 params(IssuePath),
1617 responses(
1718 (status = 200, description = "list issue dependencies", body = AppResponseData<Vec<DependencyDto>>),
Modified lib/issues/src/handlers/dependencies/list_dependents.rs lib/issues/src/handlers/dependencies/list_dependents.rs +1 −0 View lib/issues/src/handlers/dependencies/list_dependents.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/dependents",
1414 tag = "issues",
15 description = "列出依赖当前议题的其他议题。",
1516 params(IssuePath),
1617 responses(
1718 (status = 200, description = "issues depending on this one", body = AppResponseData<Vec<DependencyDto>>),
Modified lib/issues/src/handlers/events/list_events.rs lib/issues/src/handlers/events/list_events.rs +1 −0 View lib/issues/src/handlers/events/list_events.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/events",
1313 tag = "issues",
14 description = "按时间倒序读取议题的创建、编辑、状态和关联活动事件。",
1415 params(EventPath, ListEventQuery),
1516 responses(
1617 (status = 200, description = "list issue events", body = AppResponseData<EventPage>),
Modified lib/issues/src/handlers/issue_users/list_issue_users.rs lib/issues/src/handlers/issue_users/list_issue_users.rs +1 −0 View lib/issues/src/handlers/issue_users/list_issue_users.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/users",
1414 tag = "issues",
15 description = "分页列出议题的已读用户及对应阅读状态。",
1516 params(IssuePath, ListIssueUserQuery),
1617 responses(
1718 (status = 200, description = "list issue user states", body = AppResponseData<IssueUserPage>),
Modified lib/issues/src/handlers/issue_users/mark_issue_read.rs lib/issues/src/handlers/issue_users/mark_issue_read.rs +1 −0 View lib/issues/src/handlers/issue_users/mark_issue_read.rs
@@ -17,6 +17,7 @@
1717 put,
1818 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/read-state",
1919 tag = "issues",
20 description = "更新当前用户对议题的已读或未读状态。",
2021 params(IssuePath),
2122 request_body = MarkIssueReadCmd,
2223 responses(
Modified lib/issues/src/handlers/issues/bulk_issues.rs lib/issues/src/handlers/issues/bulk_issues.rs +1 −0 View lib/issues/src/handlers/issues/bulk_issues.rs
@@ -13,6 +13,7 @@
1313 post,
1414 path = "/issues/{space_name}/boards/{board_id}/issues/bulk",
1515 tag = "issues",
16 description = "批量关闭或重新打开最多 100 个有权处理的议题。",
1617 params(BoardPath),
1718 request_body = BulkIssuesCmd,
1819 responses(
Modified lib/issues/src/handlers/issues/close_issue.rs lib/issues/src/handlers/issues/close_issue.rs +1 −0 View lib/issues/src/handlers/issues/close_issue.rs
@@ -11,6 +11,7 @@
1111 post,
1212 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/close",
1313 tag = "issues",
14 description = "将议题标记为已关闭;重复关闭时保持幂等。",
1415 params(IssuePath),
1516 responses(
1617 (status = 200, description = "close issue", body = AppResponseData<IssueDto>),
Modified lib/issues/src/handlers/issues/create_issue.rs lib/issues/src/handlers/issues/create_issue.rs +1 −0 View lib/issues/src/handlers/issues/create_issue.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/issues/{space_name}/boards/{board_id}/issues",
1414 tag = "issues",
15 description = "在看板下创建议题,分配编号与标签、指派成员并处理 @提及通知。",
1516 params(BoardPath),
1617 request_body = CreateIssueCmd,
1718 responses(
Modified lib/issues/src/handlers/issues/delete_issue.rs lib/issues/src/handlers/issues/delete_issue.rs +1 −0 View lib/issues/src/handlers/issues/delete_issue.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}",
1313 tag = "issues",
14 description = "删除议题并级联清除评论、标签、成员、依赖、工时和历史记录。",
1415 params(IssuePath),
1516 responses(
1617 (status = 200, description = "delete issue", body = AppResponseData<NoData>),
Modified lib/issues/src/handlers/issues/get_issue.rs lib/issues/src/handlers/issues/get_issue.rs +1 −0 View lib/issues/src/handlers/issues/get_issue.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}",
1313 tag = "issues",
14 description = "按议题 UUID 或看板内编号读取详情及当前用户关注状态。",
1415 params(IssuePath),
1516 responses(
1617 (status = 200, description = "get issue", body = AppResponseData<IssueDto>),
Modified lib/issues/src/handlers/issues/list_issues.rs lib/issues/src/handlers/issues/list_issues.rs +1 −0 View lib/issues/src/handlers/issues/list_issues.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/issues/{space_name}/boards/{board_id}/issues",
1414 tag = "issues",
15 description = "按状态、作者、里程碑、标签、指派人、优先级或关键字分页查询议题。",
1516 params(BoardPath, ListIssueQuery),
1617 responses(
1718 (status = 200, description = "list issues", body = AppResponseData<IssuePage>),
Modified lib/issues/src/handlers/issues/reopen_issue.rs lib/issues/src/handlers/issues/reopen_issue.rs +1 −0 View lib/issues/src/handlers/issues/reopen_issue.rs
@@ -11,6 +11,7 @@
1111 post,
1212 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/reopen",
1313 tag = "issues",
14 description = "重新打开已关闭议题;议题已开启时保持幂等。",
1415 params(IssuePath),
1516 responses(
1617 (status = 200, description = "reopen issue", body = AppResponseData<IssueDto>),
Modified lib/issues/src/handlers/issues/update_issue.rs lib/issues/src/handlers/issues/update_issue.rs +1 −0 View lib/issues/src/handlers/issues/update_issue.rs
@@ -11,6 +11,7 @@
1111 patch,
1212 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}",
1313 tag = "issues",
14 description = "由作者或管理员更新议题字段,并记录标题、正文和关联变化。",
1415 params(IssuePath),
1516 request_body = UpdateIssueCmd,
1617 responses(
Modified lib/issues/src/handlers/labels/bind_label.rs lib/issues/src/handlers/labels/bind_label.rs +1 −0 View lib/issues/src/handlers/labels/bind_label.rs
@@ -11,6 +11,7 @@
1111 post,
1212 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/labels/{label_id}",
1313 tag = "issues",
14 description = "将看板标签绑定到议题,并在重复绑定时返回冲突。",
1415 params(IssueLabelPath),
1516 responses(
1617 (status = 200, description = "bind label to issue", body = AppResponseData<NoData>),
Modified lib/issues/src/handlers/labels/create_label.rs lib/issues/src/handlers/labels/create_label.rs +1 −0 View lib/issues/src/handlers/labels/create_label.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/issues/{space_name}/boards/{board_id}/labels",
1414 tag = "issues",
15 description = "在看板内创建具有名称和颜色的议题标签。",
1516 params(BoardPath),
1617 request_body = CreateLabelCmd,
1718 responses(
Modified lib/issues/src/handlers/labels/delete_label.rs lib/issues/src/handlers/labels/delete_label.rs +1 −0 View lib/issues/src/handlers/labels/delete_label.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/issues/{space_name}/boards/{board_id}/labels/{label_id}",
1313 tag = "issues",
14 description = "删除看板标签并移除它与全部议题的绑定。",
1415 params(LabelPath),
1516 responses(
1617 (status = 200, description = "delete label", body = AppResponseData<NoData>),
Modified lib/issues/src/handlers/labels/get_label.rs lib/issues/src/handlers/labels/get_label.rs +1 −0 View lib/issues/src/handlers/labels/get_label.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/issues/{space_name}/boards/{board_id}/labels/{label_id}",
1313 tag = "issues",
14 description = "读取看板内指定标签的定义与互斥设置。",
1415 params(LabelPath),
1516 responses(
1617 (status = 200, description = "get label", body = AppResponseData<LabelDto>),
Modified lib/issues/src/handlers/labels/list_labels.rs lib/issues/src/handlers/labels/list_labels.rs +1 −0 View lib/issues/src/handlers/labels/list_labels.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/issues/{space_name}/boards/{board_id}/labels",
1414 tag = "issues",
15 description = "分页列出看板标签,可按名称与归档状态过滤。",
1516 params(BoardPath, ListLabelQuery),
1617 responses(
1718 (status = 200, description = "list labels", body = AppResponseData<LabelPage>),
Modified lib/issues/src/handlers/labels/list_labels_for_issue.rs lib/issues/src/handlers/labels/list_labels_for_issue.rs +1 −0 View lib/issues/src/handlers/labels/list_labels_for_issue.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/labels",
1414 tag = "issues",
15 description = "列出议题当前绑定的标签。",
1516 params(IssuePath),
1617 responses(
1718 (status = 200, description = "list labels for issue", body = AppResponseData<Vec<LabelDto>>),
Modified lib/issues/src/handlers/labels/unbind_label.rs lib/issues/src/handlers/labels/unbind_label.rs +1 −0 View lib/issues/src/handlers/labels/unbind_label.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/labels/{label_id}",
1313 tag = "issues",
14 description = "解除议题与指定标签的绑定。",
1415 params(IssueLabelPath),
1516 responses(
1617 (status = 200, description = "unbind label from issue", body = AppResponseData<NoData>),
Modified lib/issues/src/handlers/labels/update_label.rs lib/issues/src/handlers/labels/update_label.rs +1 −0 View lib/issues/src/handlers/labels/update_label.rs
@@ -11,6 +11,7 @@
1111 patch,
1212 path = "/issues/{space_name}/boards/{board_id}/labels/{label_id}",
1313 tag = "issues",
14 description = "更新标签名称、颜色、描述、互斥属性或归档状态。",
1415 params(LabelPath),
1516 request_body = UpdateLabelCmd,
1617 responses(
Modified lib/issues/src/handlers/members/create_member.rs lib/issues/src/handlers/members/create_member.rs +1 −0 View lib/issues/src/handlers/members/create_member.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/members",
1414 tag = "issues",
15 description = "将空间成员添加为议题的指派人、提及者或参与者。",
1516 params(IssuePath),
1617 request_body = CreateIssueMemberCmd,
1718 responses(
Modified lib/issues/src/handlers/members/delete_member.rs lib/issues/src/handlers/members/delete_member.rs +1 −0 View lib/issues/src/handlers/members/delete_member.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/members/{member_id}",
1313 tag = "issues",
14 description = "按成员记录 ID 移除议题的某个成员角色。",
1415 params(IssueMemberPath),
1516 responses(
1617 (status = 200, description = "delete issue member", body = AppResponseData<NoData>),
Modified lib/issues/src/handlers/members/list_members.rs lib/issues/src/handlers/members/list_members.rs +1 −0 View lib/issues/src/handlers/members/list_members.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/members",
1414 tag = "issues",
15 description = "分页列出议题成员,可按指派、提及或参与角色过滤。",
1516 params(IssuePath, ListIssueMemberQuery),
1617 responses(
1718 (status = 200, description = "list issue members", body = AppResponseData<IssueMemberPage>),
Modified lib/issues/src/handlers/milestones/create_milestone.rs lib/issues/src/handlers/milestones/create_milestone.rs +1 −0 View lib/issues/src/handlers/milestones/create_milestone.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/issues/{space_name}/boards/{board_id}/milestones",
1414 tag = "issues",
15 description = "在看板内创建里程碑及可选描述与截止时间。",
1516 params(BoardPath),
1617 request_body = CreateMilestoneCmd,
1718 responses(
Modified lib/issues/src/handlers/milestones/delete_milestone.rs lib/issues/src/handlers/milestones/delete_milestone.rs +1 −0 View lib/issues/src/handlers/milestones/delete_milestone.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/issues/{space_name}/boards/{board_id}/milestones/{milestone_id}",
1313 tag = "issues",
14 description = "删除里程碑并解除议题关联,但不删除议题。",
1415 params(MilestonePath),
1516 responses(
1617 (status = 200, description = "delete milestone", body = AppResponseData<NoData>),
Modified lib/issues/src/handlers/milestones/get_milestone.rs lib/issues/src/handlers/milestones/get_milestone.rs +1 −0 View lib/issues/src/handlers/milestones/get_milestone.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/issues/{space_name}/boards/{board_id}/milestones/{milestone_id}",
1313 tag = "issues",
14 description = "读取指定里程碑详情及当前议题完成情况。",
1415 params(MilestonePath),
1516 responses(
1617 (status = 200, description = "get milestone", body = AppResponseData<MilestoneDto>),
Modified lib/issues/src/handlers/milestones/list_milestones.rs lib/issues/src/handlers/milestones/list_milestones.rs +1 −0 View lib/issues/src/handlers/milestones/list_milestones.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/issues/{space_name}/boards/{board_id}/milestones",
1414 tag = "issues",
15 description = "分页列出看板里程碑及其议题完成统计。",
1516 params(BoardPath, ListMilestoneQuery),
1617 responses(
1718 (status = 200, description = "list milestones", body = AppResponseData<MilestonePage>),
Modified lib/issues/src/handlers/milestones/update_milestone.rs lib/issues/src/handlers/milestones/update_milestone.rs +1 −0 View lib/issues/src/handlers/milestones/update_milestone.rs
@@ -11,6 +11,7 @@
1111 patch,
1212 path = "/issues/{space_name}/boards/{board_id}/milestones/{milestone_id}",
1313 tag = "issues",
14 description = "更新里程碑名称、描述、截止时间或开启状态。",
1415 params(MilestonePath),
1516 request_body = UpdateMilestoneCmd,
1617 responses(
Modified lib/issues/src/handlers/pins/create_pin.rs lib/issues/src/handlers/pins/create_pin.rs +1 −0 View lib/issues/src/handlers/pins/create_pin.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/issues/{space_name}/boards/{board_id}/pins",
1414 tag = "issues",
15 description = "将议题置顶到看板并设置展示顺序。",
1516 params(BoardPath),
1617 request_body = CreatePinCmd,
1718 responses(
Modified lib/issues/src/handlers/pins/delete_pin.rs lib/issues/src/handlers/pins/delete_pin.rs +1 −0 View lib/issues/src/handlers/pins/delete_pin.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/issues/{space_name}/boards/{board_id}/pins/{pin_id}",
1313 tag = "issues",
14 description = "取消指定置顶记录但保留议题本身。",
1415 params(PinPath),
1516 responses(
1617 (status = 200, description = "delete pin", body = AppResponseData<NoData>),
Modified lib/issues/src/handlers/pins/list_pins.rs lib/issues/src/handlers/pins/list_pins.rs +1 −0 View lib/issues/src/handlers/pins/list_pins.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/issues/{space_name}/boards/{board_id}/pins",
1414 tag = "issues",
15 description = "按置顶顺序读取看板当前置顶的议题。",
1516 params(BoardPath),
1617 responses(
1718 (status = 200, description = "list pinned issues", body = AppResponseData<Vec<PinDto>>),
Modified lib/issues/src/handlers/pins/update_pin.rs lib/issues/src/handlers/pins/update_pin.rs +1 −0 View lib/issues/src/handlers/pins/update_pin.rs
@@ -12,6 +12,7 @@
1212 patch,
1313 path = "/issues/{space_name}/boards/{board_id}/pins/{pin_id}",
1414 tag = "issues",
15 description = "调整看板置顶记录的排序位置。",
1516 params(PinPath),
1617 request_body = UpdatePinCmd,
1718 responses(
Modified lib/issues/src/handlers/reactions/add_comment_reaction.rs lib/issues/src/handlers/reactions/add_comment_reaction.rs +1 −0 View lib/issues/src/handlers/reactions/add_comment_reaction.rs
@@ -11,6 +11,7 @@
1111 put,
1212 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/comments/{comment_id}/reactions/@me",
1313 tag = "issues",
14 description = "为评论添加当前用户的表情回应。",
1415 params(CommentReactionPath),
1516 request_body = CreateReactionCmd,
1617 responses(
Modified lib/issues/src/handlers/reactions/add_reaction.rs lib/issues/src/handlers/reactions/add_reaction.rs +1 −0 View lib/issues/src/handlers/reactions/add_reaction.rs
@@ -12,6 +12,7 @@
1212 put,
1313 path = "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/reactions/@me",
1414 tag = "issues",
15 description = "为议题添加当前用户的表情回应。",
1516 params(IssuePath),
1617 request_body = CreateReactionCmd,
1718 responses(
Modified lib/space/src/handlers/accept_invite.rs lib/space/src/handlers/accept_invite.rs +1 −0 View lib/space/src/handlers/accept_invite.rs
@@ -11,6 +11,7 @@
1111 post,
1212 path = "/spaces/invites/accept",
1313 tag = "space",
14 description = "验证邀请码与受邀身份后加入空间并授予邀请群组。",
1415 request_body = AcceptInviteCmd,
1516 responses(
1617 (status = 200, description = "invite accepted", body = AppResponseData<NoData>),
Modified lib/space/src/handlers/add_member.rs lib/space/src/handlers/add_member.rs +1 −0 View lib/space/src/handlers/add_member.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/spaces/{space_name}/members",
1414 tag = "space",
15 description = "管理员将有效用户加入空间,必要时恢复其既有成员身份。",
1516 params(SpaceNamePath),
1617 request_body = AddMemberCmd,
1718 responses(
Modified lib/space/src/handlers/assign_group.rs lib/space/src/handlers/assign_group.rs +1 −0 View lib/space/src/handlers/assign_group.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/spaces/{space_name}/members/{user_id}/groups",
1414 tag = "space",
15 description = "管理员将空间成员分配到指定群组。",
1516 params(MemberPath),
1617 request_body = AssignGroupCmd,
1718 responses(
Modified lib/space/src/handlers/ban_user.rs lib/space/src/handlers/ban_user.rs +1 −0 View lib/space/src/handlers/ban_user.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/spaces/{space_name}/bans",
1414 tag = "space",
15 description = "封禁用户并可设置原因、期限与例外权限。",
1516 params(SpaceNamePath),
1617 request_body = BanUserCmd,
1718 responses(
Modified lib/space/src/handlers/create_dir_node.rs lib/space/src/handlers/create_dir_node.rs +1 −0 View lib/space/src/handlers/create_dir_node.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/spaces/{space_name}/dir",
1414 tag = "space",
15 description = "在空间目录树中创建目录节点。",
1516 params(SpaceNamePath),
1617 request_body = CreateDirCmd,
1718 responses(
Modified lib/space/src/handlers/create_group.rs lib/space/src/handlers/create_group.rs +1 −0 View lib/space/src/handlers/create_group.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/spaces/{space_name}/groups",
1414 tag = "space",
15 description = "创建空间群组并为其授予合法权限集合。",
1516 params(SpaceNamePath),
1617 request_body = CreateGroupCmd,
1718 responses(
Modified lib/space/src/handlers/create_invite.rs lib/space/src/handlers/create_invite.rs +1 −0 View lib/space/src/handlers/create_invite.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/spaces/{space_name}/invites",
1414 tag = "space",
15 description = "创建空间邀请并发送邮件,但不返回接受码。",
1516 params(SpaceNamePath),
1617 request_body = CreateInviteCmd,
1718 responses(
Modified lib/space/src/handlers/create_join_rule.rs lib/space/src/handlers/create_join_rule.rs +1 −0 View lib/space/src/handlers/create_join_rule.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/spaces/{space_name}/join-rules",
1414 tag = "space",
15 description = "创建根据议题事件自动授予群组成员身份的规则。",
1516 params(SpaceNamePath),
1617 request_body = CreateJoinRuleCmd,
1718 responses(
Modified lib/space/src/handlers/create_room.rs lib/space/src/handlers/create_room.rs +1 −0 View lib/space/src/handlers/create_room.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/chat/spaces/{space_name}/rooms",
1414 tag = "chat",
15 description = "在空间下创建聊天频道;公开频道会自动加入全部活跃成员。",
1516 params(SpaceNamePath),
1617 request_body = CreateRoomCmd,
1718 responses(
Modified lib/space/src/handlers/create_space.rs lib/space/src/handlers/create_space.rs +1 −0 View lib/space/src/handlers/create_space.rs
@@ -11,6 +11,7 @@
1111 post,
1212 path = "/spaces",
1313 tag = "space",
14 description = "创建空间并受每日配额限制;创建者自动成为拥有者。",
1415 request_body = CreateSpaceCmd,
1516 responses(
1617 (status = 200, description = "space created", body = AppResponseData<SpaceDto>),
Modified lib/space/src/handlers/delete_group.rs lib/space/src/handlers/delete_group.rs +1 −0 View lib/space/src/handlers/delete_group.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/spaces/{space_name}/groups/{group_id}",
1313 tag = "space",
14 description = "删除群组并清除成员分配和群组权限记录。",
1415 params(GroupPath),
1516 responses(
1617 (status = 200, description = "group deleted", body = AppResponseData<NoData>),
Modified lib/space/src/handlers/delete_join_rule.rs lib/space/src/handlers/delete_join_rule.rs +1 −0 View lib/space/src/handlers/delete_join_rule.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/spaces/{space_name}/join-rules/{rule_id}",
1313 tag = "space",
14 description = "删除指定的空间自动入群规则。",
1415 params(JoinRulePath),
1516 responses(
1617 (status = 200, description = "join rule deleted", body = AppResponseData<NoData>),
Modified lib/space/src/handlers/delete_room.rs lib/space/src/handlers/delete_room.rs +1 −0 View lib/space/src/handlers/delete_room.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/chat/rooms/{room_id}",
1313 tag = "chat",
14 description = "软删除聊天频道并停止其对外可见。",
1415 params(
1516 ("room_id" = Uuid, Path, description = "room id")
1617 ),
Modified lib/space/src/handlers/delete_space.rs lib/space/src/handlers/delete_space.rs +1 −0 View lib/space/src/handlers/delete_space.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/spaces/{space_name}",
1313 tag = "space",
14 description = "由拥有者软删除空间并停止其对外可见。",
1415 params(SpaceNamePath),
1516 responses(
1617 (status = 200, description = "space deleted", body = AppResponseData<NoData>),
Modified lib/space/src/handlers/delete_space_image.rs lib/space/src/handlers/delete_space_image.rs +1 −0 View lib/space/src/handlers/delete_space_image.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/spaces/{space_name}/images/{kind}",
1313 tag = "space",
14 description = "删除空间指定类型图片并清空对应元数据。",
1415 params(SpaceImageKindPath),
1516 responses(
1617 (status = 200, description = "space image deleted", body = AppResponseData<NoData>),
Modified lib/space/src/handlers/get_ban.rs lib/space/src/handlers/get_ban.rs +1 −0 View lib/space/src/handlers/get_ban.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/spaces/{space_name}/bans/{user_id}",
1414 tag = "space",
15 description = "读取指定用户在空间中的封禁详情。",
1516 params(MemberPath),
1617 responses(
1718 (status = 200, description = "get ban", body = AppResponseData<BanDto>),
Modified lib/space/src/handlers/get_group.rs lib/space/src/handlers/get_group.rs +1 −0 View lib/space/src/handlers/get_group.rs
@@ -19,6 +19,7 @@
1919 get,
2020 path = "/spaces/{space_name}/groups/{group_id}",
2121 tag = "space",
22 description = "读取群组详情,并按空间可见性规则控制访问。",
2223 params(GroupPath),
2324 responses(
2425 (status = 200, description = "get group", body = AppResponseData<GroupDto>),
Modified lib/space/src/handlers/get_member.rs lib/space/src/handlers/get_member.rs +1 −0 View lib/space/src/handlers/get_member.rs
@@ -20,6 +20,7 @@
2020 get,
2121 path = "/spaces/{space_name}/members/{user_id}",
2222 tag = "space",
23 description = "读取指定成员详情;成员可查自己,查他人需成员管理权限。",
2324 params(MemberPath),
2425 responses(
2526 (status = 200, description = "get member", body = AppResponseData<MemberDto>),
Modified lib/space/src/handlers/get_space.rs lib/space/src/handlers/get_space.rs +1 −0 View lib/space/src/handlers/get_space.rs
@@ -10,6 +10,7 @@
1010 get,
1111 path = "/spaces/{space_name}",
1212 tag = "space",
13 description = "按名称读取空间公开信息,私有空间仅向有效成员展示。",
1314 params(SpaceNamePath),
1415 responses(
1516 (status = 200, description = "get space", body = AppResponseData<SpaceDto>),
Modified lib/space/src/handlers/get_space_dir_tree.rs lib/space/src/handlers/get_space_dir_tree.rs +1 −0 View lib/space/src/handlers/get_space_dir_tree.rs
@@ -18,6 +18,7 @@
1818 get,
1919 path = "/spaces/{space_name}/dir",
2020 tag = "space",
21 description = "按用户与群组覆写权限返回目录树或指定层级的子树。",
2122 params(SpaceNamePath, DirTreeQuery),
2223 responses(
2324 (status = 200, description = "get space dir tree", body = AppResponseData<Vec<DirNodeDto>>),
Modified lib/space/src/handlers/get_space_image.rs lib/space/src/handlers/get_space_image.rs +1 −0 View lib/space/src/handlers/get_space_image.rs
@@ -10,6 +10,7 @@
1010 get,
1111 path = "/spaces/{space_name}/images/{kind}",
1212 tag = "space",
13 description = "读取空间指定类型图片的元数据与访问地址。",
1314 params(SpaceImageKindPath),
1415 responses(
1516 (status = 200, description = "get space image", body = AppResponseData<Option<SpaceImageDto>>),
Modified lib/space/src/handlers/join_group_self.rs lib/space/src/handlers/join_group_self.rs +1 −0 View lib/space/src/handlers/join_group_self.rs
@@ -11,6 +11,7 @@
1111 post,
1212 path = "/spaces/{space_name}/groups/{group_id}/join",
1313 tag = "space",
14 description = "在服务端允许时,当前有效成员自助加入群组。",
1415 params(GroupPath),
1516 responses(
1617 (status = 200, description = "joined group", body = AppResponseData<NoData>),
Modified lib/space/src/handlers/leave_group_self.rs lib/space/src/handlers/leave_group_self.rs +1 −0 View lib/space/src/handlers/leave_group_self.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/spaces/{space_name}/groups/{group_id}/join",
1313 tag = "space",
14 description = "当前用户自助退出指定群组成员关系。",
1415 params(GroupPath),
1516 responses(
1617 (status = 200, description = "left group", body = AppResponseData<NoData>),
Modified lib/space/src/handlers/list_bans.rs lib/space/src/handlers/list_bans.rs +1 −0 View lib/space/src/handlers/list_bans.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/spaces/{space_name}/bans",
1414 tag = "space",
15 description = "分页列出空间全部封禁记录,需要封禁管理权限。",
1516 params(SpaceNamePath, PageQuery),
1617 responses(
1718 (status = 200, description = "list space bans", body = AppResponseData<BanPage>),
Modified lib/space/src/handlers/list_dir_group_overwrites.rs lib/space/src/handlers/list_dir_group_overwrites.rs +1 −0 View lib/space/src/handlers/list_dir_group_overwrites.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/spaces/{space_name}/dir/{dir_id}/overwrites/groups",
1313 tag = "space",
14 description = "列出目录节点上的群组权限覆写。",
1415 params(DirPath),
1516 responses(
1617 (status = 200, description = "list dir group overwrites", body = AppResponseData<Vec<GroupOverwriteDto>>),
Modified lib/space/src/handlers/list_dir_user_overwrites.rs lib/space/src/handlers/list_dir_user_overwrites.rs +1 −0 View lib/space/src/handlers/list_dir_user_overwrites.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/spaces/{space_name}/dir/{dir_id}/overwrites/users",
1313 tag = "space",
14 description = "列出目录节点上的用户权限覆写。",
1415 params(DirPath),
1516 responses(
1617 (status = 200, description = "list dir user overwrites", body = AppResponseData<Vec<UserOverwriteDto>>),
Modified lib/space/src/handlers/list_groups.rs lib/space/src/handlers/list_groups.rs +1 −0 View lib/space/src/handlers/list_groups.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/spaces/{space_name}/groups",
1414 tag = "space",
15 description = "分页列出空间群组及权限;需要角色管理权限。",
1516 params(SpaceNamePath, PageQuery),
1617 responses(
1718 (status = 200, description = "list space groups", body = AppResponseData<GroupPage>),
Modified lib/space/src/handlers/list_invites.rs lib/space/src/handlers/list_invites.rs +1 −0 View lib/space/src/handlers/list_invites.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/spaces/{space_name}/invites",
1414 tag = "space",
15 description = "分页列出空间邀请及使用状态,不暴露邀请码。",
1516 params(SpaceNamePath, PageQuery),
1617 responses(
1718 (status = 200, description = "list space invites", body = AppResponseData<InvitePage>),
Modified lib/space/src/handlers/list_join_rules.rs lib/space/src/handlers/list_join_rules.rs +1 −0 View lib/space/src/handlers/list_join_rules.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/spaces/{space_name}/join-rules",
1414 tag = "space",
15 description = "列出空间的自动入群规则。",
1516 params(SpaceNamePath),
1617 responses(
1718 (status = 200, description = "list space join rules", body = AppResponseData<Vec<JoinRuleDto>>),
Modified lib/space/src/handlers/list_members.rs lib/space/src/handlers/list_members.rs +1 −0 View lib/space/src/handlers/list_members.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/spaces/{space_name}/members",
1414 tag = "space",
15 description = "分页列出空间成员及状态,需要成员管理权限。",
1516 params(SpaceNamePath, PageQuery),
1617 responses(
1718 (status = 200, description = "list space members", body = AppResponseData<MemberPage>),
Modified lib/space/src/handlers/list_spaces.rs lib/space/src/handlers/list_spaces.rs +1 −0 View lib/space/src/handlers/list_spaces.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/spaces",
1313 tag = "space",
14 description = "分页列出当前用户拥有且仍激活的空间。",
1415 params(PageQuery),
1516 responses(
1617 (status = 200, description = "list owned spaces", body = AppResponseData<SpacePage>),
Modified lib/space/src/handlers/move_dir_node.rs lib/space/src/handlers/move_dir_node.rs +1 −0 View lib/space/src/handlers/move_dir_node.rs
@@ -11,6 +11,7 @@
1111 patch,
1212 path = "/spaces/{space_name}/dir/{dir_id}/position",
1313 tag = "space",
14 description = "移动目录节点并防止父链自引用形成环。",
1415 params(DirPath),
1516 request_body = MoveDirCmd,
1617 responses(
Modified lib/space/src/handlers/remove_dir_group_overwrite.rs lib/space/src/handlers/remove_dir_group_overwrite.rs +1 −0 View lib/space/src/handlers/remove_dir_group_overwrite.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/spaces/{space_name}/dir/{dir_id}/overwrites/groups/{group_id}",
1313 tag = "space",
14 description = "移除目录节点的指定群组权限覆写。",
1415 params(DirGroupPath),
1516 responses(
1617 (status = 200, description = "remove dir group overwrite", body = AppResponseData<NoData>),
Modified lib/space/src/handlers/remove_dir_user_overwrite.rs lib/space/src/handlers/remove_dir_user_overwrite.rs +1 −0 View lib/space/src/handlers/remove_dir_user_overwrite.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/spaces/{space_name}/dir/{dir_id}/overwrites/users/{user_id}",
1313 tag = "space",
14 description = "移除目录节点的指定用户权限覆写。",
1415 params(DirUserPath),
1516 responses(
1617 (status = 200, description = "remove dir user overwrite", body = AppResponseData<NoData>),
Modified lib/space/src/handlers/remove_member.rs lib/space/src/handlers/remove_member.rs +1 −0 View lib/space/src/handlers/remove_member.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/spaces/{space_name}/members/{user_id}",
1313 tag = "space",
14 description = "管理员将成员移出空间并清除其群组分配。",
1415 params(MemberPath),
1516 responses(
1617 (status = 200, description = "member removed", body = AppResponseData<NoData>),
Modified lib/space/src/handlers/repair_dir_parents.rs lib/space/src/handlers/repair_dir_parents.rs +1 −0 View lib/space/src/handlers/repair_dir_parents.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/spaces/{space_name}/dir/repair-parents",
1414 tag = "space",
15 description = "拥有者修复目录树中的悬空父引用和循环结构。",
1516 params(SpaceNamePath),
1617 responses(
1718 (status = 200, description = "repair dir parents", body = AppResponseData<RepairDirResp>),
Modified lib/space/src/handlers/revoke_invite.rs lib/space/src/handlers/revoke_invite.rs +1 −0 View lib/space/src/handlers/revoke_invite.rs
@@ -20,6 +20,7 @@
2020 delete,
2121 path = "/spaces/{space_name}/invites/{invite_id}",
2222 tag = "space",
23 description = "撤销尚未使用的空间邀请。",
2324 params(InvitePath),
2425 responses(
2526 (status = 200, description = "invite revoked", body = AppResponseData<InviteDto>),
Modified lib/space/src/handlers/self_member.rs lib/space/src/handlers/self_member.rs +2 −0 View lib/space/src/handlers/self_member.rs
@@ -11,6 +11,7 @@
1111 patch,
1212 path = "/spaces/{space_name}/members/@me",
1313 tag = "space",
14 description = "更新当前用户自己在空间内的资料与通知设置。",
1415 params(("space_name" = String, Path)),
1516 request_body = UpdateMemberCmd,
1617 responses(
@@ -37,6 +38,7 @@
3738 delete,
3839 path = "/spaces/{space_name}/members/@me",
3940 tag = "space",
41 description = "当前用户退出空间并清除其群组分配;拥有者不能直接退出。",
4042 params(("space_name" = String, Path)),
4143 responses(
4244 (status = 200, description = "left the space", body = AppResponseData<NoData>),
Modified lib/space/src/handlers/set_dir_group_overwrite.rs lib/space/src/handlers/set_dir_group_overwrite.rs +1 −0 View lib/space/src/handlers/set_dir_group_overwrite.rs
@@ -21,6 +21,7 @@
2121 put,
2222 path = "/spaces/{space_name}/dir/{dir_id}/overwrites/groups/{group_id}",
2323 tag = "space",
24 description = "设置目录节点针对群组的允许与拒绝权限位。",
2425 params(DirGroupPath),
2526 request_body = SetOverwriteCmd,
2627 responses(
Modified lib/space/src/handlers/set_dir_user_overwrite.rs lib/space/src/handlers/set_dir_user_overwrite.rs +1 −0 View lib/space/src/handlers/set_dir_user_overwrite.rs
@@ -21,6 +21,7 @@
2121 put,
2222 path = "/spaces/{space_name}/dir/{dir_id}/overwrites/users/{user_id}",
2323 tag = "space",
24 description = "设置目录节点针对用户的允许与拒绝权限位。",
2425 params(DirUserPath),
2526 request_body = SetOverwriteCmd,
2627 responses(
Modified lib/space/src/handlers/unassign_group.rs lib/space/src/handlers/unassign_group.rs +1 −0 View lib/space/src/handlers/unassign_group.rs
@@ -20,6 +20,7 @@
2020 delete,
2121 path = "/spaces/{space_name}/members/{user_id}/groups/{group_id}",
2222 tag = "space",
23 description = "管理员移除成员的群组分配,未分配时幂等成功。",
2324 params(MemberGroupPath),
2425 responses(
2526 (status = 200, description = "group unassigned", body = AppResponseData<NoData>),
Modified lib/space/src/handlers/unban_user.rs lib/space/src/handlers/unban_user.rs +1 −0 View lib/space/src/handlers/unban_user.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/spaces/{space_name}/bans/{user_id}",
1313 tag = "space",
14 description = "删除封禁记录以恢复用户访问空间的能力。",
1415 params(MemberPath),
1516 responses(
1617 (status = 200, description = "user unbanned", body = AppResponseData<NoData>),
Modified lib/space/src/handlers/update_ban.rs lib/space/src/handlers/update_ban.rs +1 −0 View lib/space/src/handlers/update_ban.rs
@@ -12,6 +12,7 @@
1212 patch,
1313 path = "/spaces/{space_name}/bans/{user_id}",
1414 tag = "space",
15 description = "更新封禁原因、过期时间或例外权限设置。",
1516 params(MemberPath),
1617 request_body = UpdateBanCmd,
1718 responses(
Modified lib/space/src/handlers/update_dir_node.rs lib/space/src/handlers/update_dir_node.rs +1 −0 View lib/space/src/handlers/update_dir_node.rs
@@ -11,6 +11,7 @@
1111 patch,
1212 path = "/spaces/{space_name}/dir/{dir_id}",
1313 tag = "space",
14 description = "重命名空间目录节点。",
1415 params(DirPath),
1516 request_body = UpdateDirCmd,
1617 responses(
Modified lib/space/src/handlers/update_group.rs lib/space/src/handlers/update_group.rs +1 −0 View lib/space/src/handlers/update_group.rs
@@ -12,6 +12,7 @@
1212 patch,
1313 path = "/spaces/{space_name}/groups/{group_id}",
1414 tag = "space",
15 description = "更新群组名称、图标、排序或整体权限集合。",
1516 params(GroupPath),
1617 request_body = UpdateGroupCmd,
1718 responses(
Modified lib/space/src/handlers/update_join_rule.rs lib/space/src/handlers/update_join_rule.rs +1 −0 View lib/space/src/handlers/update_join_rule.rs
@@ -11,6 +11,7 @@
1111 patch,
1212 path = "/spaces/{space_name}/join-rules/{rule_id}",
1313 tag = "space",
14 description = "更新自动入群规则的启用状态或匹配条件。",
1415 params(JoinRulePath),
1516 request_body = UpdateJoinRuleCmd,
1617 responses(
Modified lib/space/src/handlers/update_member.rs lib/space/src/handlers/update_member.rs +1 −0 View lib/space/src/handlers/update_member.rs
@@ -12,6 +12,7 @@
1212 patch,
1313 path = "/spaces/{space_name}/members/{user_id}",
1414 tag = "space",
15 description = "更新空间成员资料与通知设置;修改他人需成员管理权限。",
1516 params(MemberPath),
1617 request_body = UpdateMemberCmd,
1718 responses(
Modified lib/space/src/handlers/update_space.rs lib/space/src/handlers/update_space.rs +1 −0 View lib/space/src/handlers/update_space.rs
@@ -11,6 +11,7 @@
1111 patch,
1212 path = "/spaces/{space_name}",
1313 tag = "space",
14 description = "由拥有者更新空间名称、描述、隐私与加入邀请策略。",
1415 params(SpaceNamePath),
1516 request_body = UpdateSpaceCmd,
1617 responses(
Modified lib/space/src/handlers/upload_space_image.rs lib/space/src/handlers/upload_space_image.rs +1 −0 View lib/space/src/handlers/upload_space_image.rs
@@ -11,6 +11,7 @@
1111 put,
1212 path = "/spaces/{space_name}/images/{kind}",
1313 tag = "space",
14 description = "上传空间头像、横幅、邀请图或嵌入图并更新空间元数据。",
1415 params(SpaceImageKindPath),
1516 request_body = UploadSpaceImageCmd,
1617 responses(
Modified lib/user/src/handlers/add_email.rs lib/user/src/handlers/add_email.rs +1 −0 View lib/user/src/handlers/add_email.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/me/emails",
1414 tag = "user",
15 description = "添加待验证邮箱并发送验证码,不立即改变账号登录标识。",
1516 request_body = AddEmailCmd,
1617 responses(
1718 (status = 200, description = "add email address", body = AppResponseData<AddEmailResp>),
Modified lib/user/src/handlers/create_meme.rs lib/user/src/handlers/create_meme.rs +1 −0 View lib/user/src/handlers/create_meme.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/me/memes",
1414 tag = "user",
15 description = "创建当前用户唯一的 meme 名称条目。",
1516 request_body = UpsertMemeCmd,
1617 responses(
1718 (status = 200, description = "meme created", body = AppResponseData<MemeDto>),
Modified lib/user/src/handlers/delete_avatar.rs lib/user/src/handlers/delete_avatar.rs +1 −0 View lib/user/src/handlers/delete_avatar.rs
@@ -10,6 +10,7 @@
1010 delete,
1111 path = "/me/avatar",
1212 tag = "user",
13 description = "清空当前用户头像并尽力删除存储对象。",
1314 responses(
1415 (status = 200, description = "avatar deleted", body = AppResponseData<NoData>),
1516 (status = 401, description = "authentication required", body = AppResponseData<NoData>)
Modified lib/user/src/handlers/delete_email.rs lib/user/src/handlers/delete_email.rs +1 −0 View lib/user/src/handlers/delete_email.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/me/emails/{email_id}",
1313 tag = "user",
14 description = "软删除当前用户的非主激活邮箱。",
1415 params(
1516 ("email_id" = Uuid, Path, description = "email id")
1617 ),
Modified lib/user/src/handlers/delete_meme.rs lib/user/src/handlers/delete_meme.rs +1 −0 View lib/user/src/handlers/delete_meme.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/me/memes/{meme_id}",
1313 tag = "user",
14 description = "物理删除当前用户的指定 meme 条目。",
1415 params(
1516 ("meme_id" = Uuid, Path, description = "meme id")
1617 ),
Modified lib/user/src/handlers/delete_push_subscription.rs lib/user/src/handlers/delete_push_subscription.rs +1 −0 View lib/user/src/handlers/delete_push_subscription.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/me/push-subscriptions/{push_id}",
1313 tag = "user",
14 description = "删除当前用户的指定推送订阅。",
1415 params(
1516 ("push_id" = Uuid, Path, description = "push subscription id")
1617 ),
Modified lib/user/src/handlers/get_avatar.rs lib/user/src/handlers/get_avatar.rs +1 −0 View lib/user/src/handlers/get_avatar.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/me/avatar",
1313 tag = "user",
14 description = "读取当前用户头像元数据;未设置时返回空数据。",
1415 responses(
1516 (status = 200, description = "current avatar", body = AppResponseData<Option<AvatarDto>>),
1617 (status = 404, description = "resource not found", body = AppResponseData<NoData>),
Modified lib/user/src/handlers/get_profile_detail.rs lib/user/src/handlers/get_profile_detail.rs +1 −0 View lib/user/src/handlers/get_profile_detail.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/users/{user_id}/profile-detail",
1313 tag = "user",
14 description = "按资料可见性与字段开关读取用户公开资料详情。",
1415 params(
1516 ("user_id" = Uuid, Path, description = "target user id")
1617 ),
Modified lib/user/src/handlers/get_session.rs lib/user/src/handlers/get_session.rs +1 −0 View lib/user/src/handlers/get_session.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/me/sessions/{session_id}",
1414 tag = "user",
15 description = "读取当前用户指定会话的详情。",
1516 params(("session_id" = Uuid, Path)),
1617 responses(
1718 (status = 200, description = "session detail", body = AppResponseData<SessionDto>),
Modified lib/user/src/handlers/get_user_avatar.rs lib/user/src/handlers/get_user_avatar.rs +1 −0 View lib/user/src/handlers/get_user_avatar.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/users/{user_id}/avatar",
1414 tag = "users",
15 description = "按目标用户可见性规则以图片流返回头像。",
1516 params(("user_id" = Uuid, Path, description = "user id")),
1617 responses(
1718 (status = 200, description = "avatar image bytes", content_type = "image/*"),
Modified lib/user/src/handlers/list_emails.rs lib/user/src/handlers/list_emails.rs +1 −0 View lib/user/src/handlers/list_emails.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/me/emails",
1313 tag = "user",
14 description = "列出当前用户未删除的邮箱及激活和主邮箱状态。",
1415 responses(
1516 (status = 200, description = "list user emails", body = AppResponseData<Vec<EmailDto>>),
1617 (status = 404, description = "resource not found", body = AppResponseData<NoData>),
Modified lib/user/src/handlers/list_memes.rs lib/user/src/handlers/list_memes.rs +1 −0 View lib/user/src/handlers/list_memes.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/me/memes",
1313 tag = "user",
14 description = "按创建时间返回当前用户的 meme 收藏。",
1415 params(
1516 ListLimitQuery,
1617 ),
Modified lib/user/src/handlers/list_push_subscriptions.rs lib/user/src/handlers/list_push_subscriptions.rs +1 −0 View lib/user/src/handlers/list_push_subscriptions.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/me/push-subscriptions",
1414 tag = "user",
15 description = "分页列出当前用户的浏览器推送订阅,不返回密钥。",
1516 params(PageQuery),
1617 responses(
1718 (status = 200, description = "list push subscriptions", body = AppResponseData<Vec<PushSubscriptionDto>>),
Modified lib/user/src/handlers/list_saved_messages.rs lib/user/src/handlers/list_saved_messages.rs +1 −0 View lib/user/src/handlers/list_saved_messages.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/me/messages/saved",
1414 tag = "user",
15 description = "分页列出当前用户收藏的消息引用。",
1516 params(PageQuery),
1617 responses(
1718 (status = 200, description = "list saved messages", body = AppResponseData<Vec<SavedMessageDto>>),
Modified lib/user/src/handlers/list_sessions.rs lib/user/src/handlers/list_sessions.rs +1 −0 View lib/user/src/handlers/list_sessions.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/me/sessions",
1313 tag = "user",
14 description = "分页列出当前用户的登录会话,并标识当前会话。",
1415 params(
1516 ListSessionsQuery,
1617 ),
Modified lib/user/src/handlers/my_reports.rs lib/user/src/handlers/my_reports.rs +1 −0 View lib/user/src/handlers/my_reports.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/me/reports",
1414 tag = "user",
15 description = "分页列出当前用户提交的举报及处理结果。",
1516 params(PageQuery),
1617 responses(
1718 (status = 200, description = "my filed reports", body = AppResponseData<Vec<UserReportDto>>),
Modified lib/user/src/handlers/my_spaces.rs lib/user/src/handlers/my_spaces.rs +1 −0 View lib/user/src/handlers/my_spaces.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/me/spaces",
1414 tag = "user",
15 description = "列出当前用户激活成员身份的空间及有效权限。",
1516 params(PageQuery),
1617 responses(
1718 (status = 200, description = "my spaces", body = AppResponseData<Vec<MySpaceDto>>),
Modified lib/user/src/handlers/my_suspensions.rs lib/user/src/handlers/my_suspensions.rs +1 −0 View lib/user/src/handlers/my_suspensions.rs
@@ -11,6 +11,7 @@
1111 get,
1212 path = "/me/suspensions",
1313 tag = "user",
14 description = "查看当前用户的处罚历史,可仅筛选仍生效记录。",
1415 params(
1516 IncludeRevokedQuery,
1617 ),
Modified lib/user/src/handlers/recent_mentions.rs lib/user/src/handlers/recent_mentions.rs +1 −0 View lib/user/src/handlers/recent_mentions.rs
@@ -12,6 +12,7 @@
1212 get,
1313 path = "/me/recent-mentions",
1414 tag = "user",
15 description = "返回最近提及当前用户的消息引用。",
1516 params(
1617 ListLimitQuery,
1718 ),
Modified lib/user/src/handlers/revoke_all_sessions.rs lib/user/src/handlers/revoke_all_sessions.rs +1 −0 View lib/user/src/handlers/revoke_all_sessions.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/me/sessions",
1313 tag = "user",
14 description = "撤销当前用户全部有效会话,包括当前设备。",
1415 responses(
1516 (status = 200, description = "all sessions revoked", body = AppResponseData<CountResp>),
1617 (status = 401, description = "authentication required", body = AppResponseData<NoData>)
Modified lib/user/src/handlers/revoke_session.rs lib/user/src/handlers/revoke_session.rs +1 −0 View lib/user/src/handlers/revoke_session.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/me/sessions/{session_id}",
1313 tag = "user",
14 description = "撤销单个会话令牌,使对应设备需要重新登录。",
1415 params(
1516 ("session_id" = Uuid, Path, description = "session id")
1617 ),
Modified lib/user/src/handlers/save_message.rs lib/user/src/handlers/save_message.rs +1 −0 View lib/user/src/handlers/save_message.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/me/messages/saved",
1414 tag = "user",
15 description = "收藏指定消息,已收藏时幂等返回。",
1516 request_body = SaveMessageCmd,
1617 responses(
1718 (status = 200, description = "save message", body = AppResponseData<SavedMessageDto>),
Modified lib/user/src/handlers/set_primary_email.rs lib/user/src/handlers/set_primary_email.rs +1 −0 View lib/user/src/handlers/set_primary_email.rs
@@ -12,6 +12,7 @@
1212 patch,
1313 path = "/me/emails/{email_id}/primary",
1414 tag = "user",
15 description = "将一个已激活邮箱设为主邮箱,并清除其他主标记。",
1516 params(
1617 ("email_id" = Uuid, Path, description = "email id")
1718 ),
Modified lib/user/src/handlers/unsave_message.rs lib/user/src/handlers/unsave_message.rs +1 −0 View lib/user/src/handlers/unsave_message.rs
@@ -11,6 +11,7 @@
1111 delete,
1212 path = "/me/messages/saved/{message_id}",
1313 tag = "user",
14 description = "删除当前用户对指定消息的全部收藏记录。",
1415 params(
1516 ("message_id" = Uuid, Path, description = "message id")
1617 ),
Modified lib/user/src/handlers/update_meme.rs lib/user/src/handlers/update_meme.rs +1 −0 View lib/user/src/handlers/update_meme.rs
@@ -13,6 +13,7 @@
1313 put,
1414 path = "/me/memes/{meme_id}",
1515 tag = "user",
16 description = "全量更新当前用户指定 meme 条目的元数据。",
1617 params(("meme_id" = Uuid, Path)),
1718 request_body = UpsertMemeCmd,
1819 responses(
Modified lib/user/src/handlers/upload_avatar.rs lib/user/src/handlers/upload_avatar.rs +1 −0 View lib/user/src/handlers/upload_avatar.rs
@@ -14,6 +14,7 @@
1414 put,
1515 path = "/me/avatar",
1616 tag = "user",
17 description = "上传原始图片字节作为当前用户头像。",
1718 request_body(
1819 content = Vec<u8>,
1920 description = "raw image bytes (image/jpeg, image/png, image/webp, image/gif)",
Modified lib/user/src/handlers/upsert_push_subscription.rs lib/user/src/handlers/upsert_push_subscription.rs +1 −0 View lib/user/src/handlers/upsert_push_subscription.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/me/push-subscriptions",
1414 tag = "user",
15 description = "按 endpoint 注册或更新浏览器推送订阅。",
1516 request_body = UpsertPushCmd,
1617 responses(
1718 (status = 200, description = "upsert push subscription", body = AppResponseData<PushSubscriptionDto>),
Modified lib/user/src/handlers/verify_add_email.rs lib/user/src/handlers/verify_add_email.rs +1 −0 View lib/user/src/handlers/verify_add_email.rs
@@ -12,6 +12,7 @@
1212 post,
1313 path = "/me/emails/verify",
1414 tag = "user",
15 description = "校验验证码并激活当前用户新增的邮箱地址。",
1516 request_body = VerifyAddEmailCmd,
1617 responses(
1718 (status = 200, description = "verify added email address", body = AppResponseData<EmailDto>),
Modified openapi.json openapi.json View openapi.json
Diff too large to display.