Overview
We use JSON Schema to define the structure of extracted data.Rules
- Root must be an
objecttype - Allowed types:
string,number,integer,boolean,object,array - Primitive fields must be nullable:
"type": ["string", "null"] - Maximum nesting level: 3
- Array items: objects or primitives (
string,number,integer,boolean) - Enums: strings only, must include
null - Use
descriptionfields to provide context - Date values should use
"custom:type": "date"on string fields - Validation rules should be modeled as a boolean field with
beltic:validationand a siblingfield_ref
Unsupported Features
- Schema composition (
anyOf,oneOf,allOf) - Regular expressions
- Conditional validation
- Constant values
Examples
Basic Schema
With Nested Objects
With Arrays
With Enums
Validation Fields (Date Reference)
Date validations are configured on a boolean field, not on the date field itself. Use this pattern:- Source date field:
type: ["string", "null"]+"custom:type": "date" - Validation field:
type: ["boolean", "null"]+beltic:validation field_refmust point to a sibling date field name in the same scope
Validation Fields in Nested Objects/Arrays
field_ref is scope-relative:
- Inside an object, it references a field in that same object
- Inside an array item object, it references a field in each item