Package dev.harrel.jsonschema
Interface Evaluator
public interface Evaluator
Evaluator interface is the main abstraction for the keyword evaluation logic.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classResultclass represents evaluation outcome. -
Method Summary
Modifier and TypeMethodDescriptionevaluate(EvaluationContext ctx, JsonNode node) Evaluation logic for a specific keyword.default intgetOrder()Order ofEvaluatordetermines order of evaluators execution in scope of single schema location.
-
Method Details
-
evaluate
Evaluation logic for a specific keyword. Must not throw any exceptions, any possible evaluation failures should be reflected by returned object.- Parameters:
ctx- current evaluation contextnode- JSON node on which the evaluation should act upon- Returns:
- evaluation result
- See Also:
-
getOrder
default int getOrder()Order ofEvaluatordetermines order of evaluators execution in scope of single schema location. By default, evaluators are executed in order of their occurrence in JSON object. IfEvaluatoris required to be run before or after other evaluators, manipulating order value is the only way of achieving this behaviour.- Returns:
- order
-