Skip to content

Creating and Modelling Validations

indrajra-ilimi edited this page Jan 8, 2019 · 9 revisions

Overview

OpenSABER validates any record that is inserted or updated in the Registry is validated. Each field in the incoming record is validated using JSON Schema mechanism. The validator we use supports draft 07 of the JSON Schema specificiation.

Modeling Schema

OpenSABER uses Everit Schema validator for validation. The schema file needs to be created and pre-deployed in the registry under src\main\resources. You can take a look at these examples pre-built into the registry for reference purposes and you may add your own.

The following reference sample schemas can be found here

  • Teacher
  • Person
  • Vehicle

To quickly understand these schema files in detail, we suggest you take a look at this README of Everit validator.

For more details, look at validation specification