Package com.networknt.schema
Interface OutputFormat<T>
- Type Parameters:
T
- the result type
- All Known Implementing Classes:
OutputFormat.Boolean
,OutputFormat.Default
,OutputFormat.Flag
,OutputFormat.Hierarchical
,OutputFormat.List
,OutputFormat.Result
public interface OutputFormat<T>
Formats the validation results.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
The Boolean output format.static class
The Default output format.static class
The Flag output format.static class
The Hierarchical output format.static class
The List output format.static class
The Result output format. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OutputFormat.Boolean
The Boolean output format.static final OutputFormat.Default
The Default output format.static final OutputFormat.Flag
The Flag output format.static final OutputFormat.Hierarchical
The Hierarchical output format.static final OutputFormat.List
The List output format.static final OutputFormat.Result
The Result output format. -
Method Summary
Modifier and TypeMethodDescriptiondefault void
customize
(ExecutionContext executionContext, ValidationContext validationContext) Customize the execution context before validation.format
(JsonSchema jsonSchema, Set<ValidationMessage> validationMessages, ExecutionContext executionContext, ValidationContext validationContext) Formats the validation results.
-
Field Details
-
DEFAULT
The Default output format. -
BOOLEAN
The Boolean output format. -
FLAG
The Flag output format. -
LIST
The List output format. -
HIERARCHICAL
The Hierarchical output format. -
RESULT
The Result output format.This is currently not exposed to consumers.
-
-
Method Details
-
customize
Customize the execution context before validation.The validation context should only be used for reference as it is shared.
- Parameters:
executionContext
- the execution contextvalidationContext
- the validation context for reference
-
format
T format(JsonSchema jsonSchema, Set<ValidationMessage> validationMessages, ExecutionContext executionContext, ValidationContext validationContext) Formats the validation results.- Parameters:
jsonSchema
- the schemavalidationMessages
- the validation messagesexecutionContext
- the execution contextvalidationContext
- the validation context- Returns:
- the result
-