more audit work
This commit is contained in:
@@ -12,11 +12,11 @@ public static class RiskProfileSchemaProvider
|
||||
|
||||
private static string? _cachedSchemaText;
|
||||
private static string? _cachedETag;
|
||||
private static readonly Lazy<JsonSchema> Schema = new(() => JsonSchema.FromText(GetSchemaText()));
|
||||
|
||||
public static JsonSchema GetSchema()
|
||||
{
|
||||
var schemaText = GetSchemaText();
|
||||
return JsonSchema.FromText(schemaText);
|
||||
return Schema.Value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -25,6 +25,10 @@ public sealed class RiskProfileValidator
|
||||
}
|
||||
|
||||
using var document = JsonDocument.Parse(json);
|
||||
return _schema.Evaluate(document.RootElement);
|
||||
var options = new EvaluationOptions
|
||||
{
|
||||
OutputFormat = OutputFormat.List
|
||||
};
|
||||
return _schema.Evaluate(document.RootElement, options);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user