aiflow-math-ink-06-intermediate / contracts /aiflow_p_formula_v1.schema.json
cwLeeDev's picture
Add fail-closed real P formula data contract
52585d7 verified
Raw
History Blame Contribute Delete
1.9 kB
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://aiflow.local/schemas/p-formula-v1.json",
"title": "AIFlow Math Ink 0.6 P Formula Record",
"type": "object",
"required": [
"formula_id",
"origin_id",
"writer_id",
"device_id",
"source_id",
"split",
"canvas_width",
"canvas_height",
"rights_track",
"commercial_training_allowed",
"symbols"
],
"properties": {
"formula_id": {"type": "string", "minLength": 1},
"origin_id": {"type": "string", "minLength": 1},
"writer_id": {"type": "string", "minLength": 1},
"device_id": {"type": "string", "minLength": 1},
"source_id": {"type": "string", "minLength": 1},
"split": {"enum": ["training", "validation", "test"]},
"canvas_width": {"type": "number", "exclusiveMinimum": 0},
"canvas_height": {"type": "number", "exclusiveMinimum": 0},
"rights_track": {"const": "P"},
"commercial_training_allowed": {"const": true},
"symbols": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": ["token", "strokes"],
"properties": {
"token": {"type": "string", "minLength": 1},
"strokes": {
"type": "array",
"minItems": 1,
"items": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": ["x", "y"],
"properties": {
"x": {"type": "number"},
"y": {"type": "number"},
"t": {"type": ["number", "null"]},
"pressure": {"type": ["number", "null"]}
},
"additionalProperties": true
}
}
}
},
"additionalProperties": true
}
}
},
"additionalProperties": true
}