Validate JSON against a JSON Schema
ai_json_schema_validateValidate JSON data against a JSON Schema and report all validation errors with instance and schema paths, keywords, messages, and parameters.
Instructions
Validate JSON data against a JSON Schema with Ajv, reporting every error (allErrors) with its instancePath (JSON Pointer), schemaPath, keyword, message and params. Draft 2020-12 is used when the schema's $schema says 2020-12 (2019-09 likewise), otherwise draft-07 (draft-04/06 schemas are checked as draft-07). Formats checked: date, time, date-time, email, hostname, ipv4, ipv6, uri, uri-reference, uuid, regex, json-pointer (other formats are ignored and listed). Data: inline "data" (any JSON value), "dataText" (JSON text) or "dataFile" (path or base64). Schema: inline "schema" (object or JSON text) or "schemaFile". Remote $ref URLs are never fetched. Runs locally.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | The JSON value to validate, inline (a string here is validated as a string; use dataText for JSON text). | |
| schema | No | The JSON Schema inline: an object (or JSON text). | |
| dataFile | No | Or: a JSON file (local path or base64). | |
| dataText | No | Or: the data as JSON text. | |
| maxErrors | No | Most errors to return (default 100). | |
| schemaFile | No | Or: a JSON Schema file (local path or base64). |