Class JsonSchemaValidator
java.lang.Object
com.bonitasoft.processbuilder.validation.JsonSchemaValidator
Utility class serving as the entry point for JSON Schema validation.
It prepares the input, determines the target schema, and delegates the
schema loading and validation to
SchemaResolver.
This class uses SLF4J for logging all validation results and errors and is non-instantiable.
- Since:
- 1.0
- Author:
- Bonitasoft
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisJsonValidForType(String actionType, String optionType, Object jsonInput) Validates an input object against the schema corresponding to the given option type name.
-
Method Details
-
isJsonValidForType
Validates an input object against the schema corresponding to the given option type name. This method handles input serialization, determines the final schema name (based on action type), and delegates the core validation logic.- Parameters:
actionType- The action being performed (e.g., "DELETE", "INSERT", "UPDATE").optionType- The name of the schema to validate against (e.g., "Category", "Steps").jsonInput- The JSON content to validate (can be String, Map, or any serializable object).- Returns:
trueif validation is successful,falseotherwise (due to null inputs, serialization failure, or schema validation/loading errors).
-