The new JSON validation service enables a streamlined approach for the creation of new validators that can benefit from the Test Bed’s infrastructure for hosting and automatic service updates. Validation of content is driven by means of JSON Schema, allowing a flexible configuration for the validation of both syntax and business rules. The resulting validators offer the following key features:
- Validation by means of web user interface and SOAP API.
- Configurable validation types, each with its own set of validation artefacts.
- Support for multiple schemas that can be loaded locally or remotely and combined with various semantics.
- Support for user-provided extension schemas.
- Flexible theming to customise the validator’s interface for its target users.
- Use as standalone services or as validation steps in conformance tests (GITB TDL test cases) running on the Test Bed.
JSON validation guide
This guide explains the options to consider, the available solutions and offers step-by-step instructions to configure your validator. It serves both as a practical tutorial but also as a user guide and detailed reference of all available configuration options.
The new guide is available at https://www.itb.ec.europa.eu/docs/guides/latest/validatingJSON/.
Generic JSON validator
When using the validator, the user is prompted to provide the content to validate as a file upload, URI reference or by using the provided editor. To proceed with the validation, at least one JSON schema instance needs to be provided with the possibility of providing additional schemas that are combined based on the user’s preference (successful validation against all, any or at most one schema).
The validation results in an overview of validation failures that can also be inspected within the provided content. The report is also made available in XML format for post-processing and PDF.
This validator provides a useful tool in itself for but also a flexible building block for scenario-based conformance tests running in the Test Bed that call for the validation of JSON content.
For further information on the new validation service be sure to check out the new validation guide. Additional information and resources on the Test Bed itself can be found on its Joinup space with its value proposition being a good starting point. Finally, to remain updated of all the latest Test Bed news: