part #2
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
using Json.Schema;
|
||||
using StellaOps.Evidence.Models;
|
||||
using StellaOps.Evidence.Serialization;
|
||||
@@ -86,11 +85,3 @@ public sealed class EvidenceIndexValidator : IEvidenceIndexValidator
|
||||
return new ValidationResult(errors.Count == 0, errors);
|
||||
}
|
||||
}
|
||||
|
||||
public interface IEvidenceIndexValidator
|
||||
{
|
||||
ValidationResult Validate(EvidenceIndex index);
|
||||
}
|
||||
|
||||
public sealed record ValidationResult(bool IsValid, IReadOnlyList<ValidationError> Errors);
|
||||
public sealed record ValidationError(string Field, string Message);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
using StellaOps.Evidence.Models;
|
||||
|
||||
namespace StellaOps.Evidence.Validation;
|
||||
|
||||
public interface IEvidenceIndexValidator
|
||||
{
|
||||
ValidationResult Validate(EvidenceIndex index);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace StellaOps.Evidence.Validation;
|
||||
|
||||
public sealed record ValidationError(string Field, string Message);
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace StellaOps.Evidence.Validation;
|
||||
|
||||
public sealed record ValidationResult(bool IsValid, IReadOnlyList<ValidationError> Errors);
|
||||
Reference in New Issue
Block a user