namespace OrpaonVision.Core.Validation; /// /// JSON Schema验证结果。 /// public sealed class JsonSchemaValidationResult { /// /// 是否验证通过。 /// public bool IsValid { get; init; } /// /// 验证错误列表。 /// public IReadOnlyList Errors { get; init; } = []; /// /// 警告列表。 /// public IReadOnlyList Warnings { get; init; } = []; /// /// 验证耗时(毫秒)。 /// public long ValidationTimeMs { get; init; } /// /// Schema版本。 /// public string SchemaVersion { get; init; } = string.Empty; /// /// 验证时间(UTC)。 /// public DateTime ValidatedAtUtc { get; init; } = DateTime.UtcNow; } /// /// JSON Schema验证错误。 /// public sealed class JsonSchemaValidationError { /// /// 错误代码。 /// public string Code { get; init; } = string.Empty; /// /// 错误消息。 /// public string Message { get; init; } = string.Empty; /// /// 错误路径。 /// public string Path { get; init; } = string.Empty; /// /// 错误严重程度。 /// public string Severity { get; init; } = string.Empty; /// /// 期望值。 /// public string? ExpectedValue { get; init; } /// /// 实际值。 /// public string? ActualValue { get; init; } /// /// 修复建议。 /// public string? Suggestion { get; init; } } /// /// JSON Schema验证警告。 /// public sealed class JsonSchemaValidationWarning { /// /// 警告代码。 /// public string Code { get; init; } = string.Empty; /// /// 警告消息。 /// public string Message { get; init; } = string.Empty; /// /// 警告路径。 /// public string Path { get; init; } = string.Empty; /// /// 警告级别。 /// public string Level { get; init; } = string.Empty; /// /// 建议操作。 /// public string? Recommendation { get; init; } }