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 classThe Boolean output format.static classThe Default output format.static classThe Flag output format.static classThe Hierarchical output format.static classThe List output format.static classThe Result output format. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OutputFormat.BooleanThe Boolean output format.static final OutputFormat.DefaultThe Default output format.static final OutputFormat.FlagThe Flag output format.static final OutputFormat.HierarchicalThe Hierarchical output format.static final OutputFormat.ListThe List output format.static final OutputFormat.ResultThe Result output format. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidcustomize(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
-