POST /v1/json-schema-validateValidate JSON against a JSON Schema
Validation Utils lf-validation-utils
Checks whether some JSON data follows all the rules set out in a schema. Validates JSON data against a provided JSON Schema. Returns validation errors and path details.
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
schema | object | Yes | JSON Schema |
data | string | Yes | Data to validate |
Response Schema
valid (boolean): Whether data matches schema
errors (array): Validation error details
cURL Example
curl -X POST 'https://lf-validation-utils.laminarforge.dev/v1/json-schema-validate' -H 'Authorization: Bearer lf_YourApiKey' -H 'Content-Type: application/json' -d '{"schema":{"type":"object"},"data":"{}"}'Python Example
import requests
url = 'https://lf-validation-utils.laminarforge.dev/v1/json-schema-validate'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
data = {'schema': {'type': 'object'}, 'data': '{}'}
response = requests.post(url, headers=headers, json=data)
print(response.json())