diff --git a/schemas/chunk.schema.json b/schemas/chunk.schema.json new file mode 100644 index 0000000..0c49b10 --- /dev/null +++ b/schemas/chunk.schema.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mindnet_chunk", + "type": "object", + "required": ["id", "note_id", "chunk_index", "type", "path", "token_count", "lang"], + "properties": { + "id": {"type": "string"}, + "note_id": {"type": "string"}, + "note_title": {"type": "string"}, + "chunk_index": {"type": "integer"}, + "char_start": {"type": "integer"}, + "char_end": {"type": "integer"}, + "token_count": {"type": "integer"}, + "type": {"type": "string"}, + "area": {"type": "string"}, + "project": {"type": "string"}, + "tags": {"type": "array", "items": {"type": "string"}}, + "section_title": {"type": "string"}, + "section_path": {"type": "string"}, + "lang": {"type": "string"}, + "wikilinks": {"type": "array", "items": {"type": "string"}}, + "external_links": {"type": "array", "items": {"type": "string"}}, + "references": { + "type": "array", + "items": {"type": "object", "properties": { + "target_id": {"type": "string"}, + "kind": {"type": "string"} + }, "required": ["target_id", "kind"]} + }, + "neighbors": {"type": "object", "properties": { + "prev": {"type": ["string","null"]}, + "next": {"type": ["string","null"]} + }}, + "path": {"type": "string"}, + "created_at": {"type": "string"} + }, + "additionalProperties": true +}