Learn how to use the XML Schema Validator to validate XML files on the Digibee iPaaS. The Documentation Portal provides configuration parameters of this component below.
Validator V2 (JSON Schema) validates JSON content based on a JSON Schema.
JSON Schema is a market standard language for annotating and validating JSON documents that acts as a "contract" that must be followed by the component. For more information about it, refer to the official JSON documentation.
Take a look at the configuration parameters of the component:
- Schema Draft version: Schema Draft version. Supported versions: v4, v6, v7, v2019-09 and v2020-12.
- Detect Draft version: if this option is active, the Schema Draft version will be based on the version inserted in the JSON Schema parameter.
- Simplify validation results: if this option is active, validation errors will be shown in a simplified way; otherwise, they will be displayed in a detailed way.
- Fail on Error: if the option is active, the execution of the pipeline with error will be interrupted. Otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.
If Validator V2 successfully validates the JSON content, it outputs the JSON configured in the JSON Payload parameter.
In case of error, the component outputs a JSON content with the following structure by default:
"message": "$.code: string found, integer expected"
"message": "$.field: is missing but it is required"
The "validation" array contains an JSON object for each validation performed. Each JSON object has the following properties:
- type: the type of the applied validation.
- code: internal validation code.
- path: path where the validated property is configured on the JSON content.
- schemaPath: path where the validated property is configured on the JSON Schema.
- arguments: data of the analyzed property during validation.
- details: additional validation details.
- message: message of the validation error found.
If the Simplify validation results parameter is active, the “validation” array will contain only error messages, like this:
"$.code: string found, integer expected",
"$.field: is missing but it is required"