Schema Validation
Overview
Validation Modes
Mode
Behavior
Creating a Validation Schema
Via REST API
# Create schema for the "users" namespace
curl -X PUT http://localhost:3000/api/v1/schemas/validation/users \
-H "Content-Type: application/json" \
-d '{
"mode": "strict",
"schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": ["id", "email"],
"properties": {
"id": { "type": "string" },
"email": { "type": "string", "format": "email" },
"name": { "type": "string" },
"age": { "type": "integer", "minimum": 0 }
},
"additionalProperties": false
}
}'Via Redis Protocol
Via SQL (PostgreSQL Protocol)
Querying Schemas
List All Schemas
Get Specific Schema
View Schema History
Dry-Run Validation
Updating a Schema
Changing the Mode
Removing Validation
Validation Errors
REST API (HTTP 400)
Redis Protocol
PostgreSQL Protocol
Gradual Migration Strategy
JSON Schema Reference
Nested Objects
Array Validation
Storage Details
Last updated
Was this helpful?