fix(GOV-009): 完成脚手架审查整改

This commit is contained in:
2026-08-13 18:30:57 +08:00
parent dcdf634457
commit 3a8120a33a
47 changed files with 752 additions and 101 deletions
@@ -1,8 +1,11 @@
import { ApiProperty } from '@nestjs/swagger';
/** API 总体健康只区分可服务与不可服务,依赖禁用不等同于故障。 */
export type HealthStatus = 'healthy' | 'unavailable';
/** 单项依赖额外允许 disabled,用于尚未启用但符合当前配置的组件。 */
export type DependencyStatus = HealthStatus | 'disabled';
/** 单项依赖健康契约只暴露安全摘要,不返回地址、账号或底层异常。 */
export class DependencyHealthDto {
@ApiProperty({ type: String, enum: ['healthy', 'unavailable', 'disabled'] })
status!: DependencyStatus;
@@ -11,6 +14,7 @@ export class DependencyHealthDto {
detail!: string;
}
/** 健康响应固定列出三类基础设施,便于运维区分故障和计划内禁用。 */
export class HealthDependenciesDto {
@ApiProperty({ type: () => DependencyHealthDto })
redis!: DependencyHealthDto;
@@ -22,6 +26,7 @@ export class HealthDependenciesDto {
rocketMq!: DependencyHealthDto;
}
/** API 健康端点的版本化 HTTP DTO,也是 OpenAPI 单向发布源。 */
export class HealthResponseDto {
@ApiProperty({ type: String, enum: ['healthy', 'unavailable'] })
status!: HealthStatus;