JSON Schema
Standard JSON schema is extended mainly for advanced validation use cases
errorMessage
"title": "Base Price"
"type": "number",
"errorMessage": {
"type": "Price needs to be numerical",
"required": "Missing price information"
}x-validation
"title": "Product",
"type": "object",
"x-validation": {
"validator-1": { //label for validator
"scope": { //either type or fields to apply validation
"type": "string",
"fields": ["data.name", "data.surname"]
},
"validator": "com.networknt.schema.MinLengthValidator", //validator class
"props": 3 //props used by the validator
}
}x-jmespath
x-jsoup
x-lazy
Last updated
