The Validate JSON Schema assertion validates JSON (JavaScript Object Notation) data against a JSON schema. Specifically, the assertion will:
- validate JSON data structure
- validate JSON data property types
- validate JSON data property values
You can specify the JSON Schema Version (v2 or v4) to verify the payload.
Sample Example
{
“type”: “object”,
“properties”: {
“name”: {
“type”: “string”
},
“email”: {
“type”: “string”
},
“company”: {
“type”: “string”
}
},
“required”: [
“name”,
“email”,
“company”
],
“additionalProperties”: false
}