Summary
Validates data against a schema.
Description
Performs data validation, given a JSON schema and form data.
Route
POST /json-forms/validate-data
Roles
admin
other
readonly
apiread
operator
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
jsonSchema |
object |
yes |
JSON Schema to validate data against |
data |
object |
yes |
JSON object to validate |
Copied to Clipboard
{
"jsonSchema": null,
"data": null
}
Copied to Clipboard
{
"type": "object",
"properties": {
"jsonSchema": {
"title": "jsonSchema",
"$ref": "metaSchema",
"examples": [
{
"title": "example",
"description": "",
"type": "object",
"required": [],
"properties": {
"text1": {
"type": "string",
"title": "Text 1",
"description": ""
}
}
}
]
},
"data": {
"title": "data",
"$ref": "formDocument#/definitions/formData",
"examples": [
{
"text1": "Hello World!"
}
]
}
},
"required": [
"jsonSchema",
"data"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
validation |
object |
results from the form validation |
Copied to Clipboard
{
"status": 200,
"validation": {
"valid": true,
"errors": [
"irure enim",
"dolor",
"nostrud in reprehenderit",
"do sit esse proident",
"irure ut"
]
},
"message": "Form data is valid."
}