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, SchemaContext schemaContext) Customize the execution context before validation.format(Schema jsonSchema, ExecutionContext executionContext, SchemaContext schemaContext) 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 schema context should only be used for reference as it is shared.
- Parameters:
executionContext- the execution contextschemaContext- the schema context for reference
-
format
Formats the validation results.- Parameters:
jsonSchema- the schemaexecutionContext- the execution contextschemaContext- the schema context- Returns:
- the result
-