| { |
| "$schema": "https://json-schema.org/draft/2020-12/schema", |
| "$id": "https://huggingface.co/datasets/egobowwow/universal-annotations/resolve/v1.0.0/schemas/universal-annotation-adapter.schema.json", |
| "title": "Declarative Universal Annotation adapter", |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["schema_version", "adapter_id", "target_schema_id", "rules"], |
| "properties": { |
| "schema_version": {"const": "1.0.0"}, |
| "adapter_id": {"type": "string", "minLength": 1}, |
| "target_schema_id": {"type": "string", "minLength": 1}, |
| "rules": { |
| "type": "array", |
| "minItems": 1, |
| "items": { |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["target_field", "predicate_id", "subject_kind", "subject_id", "object_representation", "cardinality", "required"], |
| "properties": { |
| "target_field": {"type": "string", "minLength": 1}, |
| "predicate_id": {"type": "string", "minLength": 1}, |
| "subject_kind": {"type": ["string", "null"]}, |
| "subject_id": {"type": ["string", "null"]}, |
| "object_representation": {"enum": ["node_id", "node_concept", "concept", "value"]}, |
| "cardinality": {"enum": ["one", "many"]}, |
| "required": {"type": "boolean"} |
| } |
| } |
| } |
| } |
| } |
|
|