diff --git a/schemas/note.schema.json b/schemas/note.schema.json index de90ca3..5dc1342 100644 --- a/schemas/note.schema.json +++ b/schemas/note.schema.json @@ -1,39 +1,45 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "mindnet_note", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "mindnet note payload", "type": "object", - "description": "Note-Payload (Qdrant). Erweitert um fulltext/hash_raw_body für verlustfreien Export.", - - "required": ["note_id", "title", "type", "status", "created", "path"], - "properties": { - "note_id": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "status": { "type": "string" }, - "created": { "type": "string" }, - "updated": { "type": "string" }, + "note_id": { "type": "string" }, + "title": { "type": ["string","null"] }, + "type": { "type": ["string","null"] }, + "status": { "type": ["string","null"] }, + "created": { "type": ["string","null"] }, + "updated": { "type": ["string","null"] }, + "path": { "type": ["string","null"] }, + "tags": { "type": ["array","null"], "items": { "type": "string" } }, + "area": { "type": ["string","null"] }, + "project": { "type": ["string","null"] }, + "source": { "type": ["string","null"] }, + "lang": { "type": ["string","null"] }, + "slug": { "type": ["string","null"] }, + "aliases": { "type": ["array","null"], "items": { "type": "string" } }, - "tags": { "type": "array", "items": { "type": "string" } }, - "area": { "type": "string" }, - "project": { "type": "string" }, - "priority": { "type": "number" }, - "effort_min": { "type": "number" }, - "due": { "type": "string" }, - "people": { "type": "array", "items": { "type": "string" } }, - "aliases": { "type": "array", "items": { "type": "string" } }, - "lang": { "type": "string" }, + "fulltext": { "type": ["string","null"] }, + "references": { "type": ["array","null"], "items": { "type": "string" } }, - "path": { "type": "string" }, + "hash_fulltext": { "type": ["string","null"], "pattern": "^[a-f0-9]{64}$" }, + "hash_signature": { "type": ["string","null"] }, - "references": { "type": "array", "items": { "type": "string" } }, - "depends_on": { "type": "array", "items": { "type": "string" } }, - "assigned_to": { "type": "array", "items": { "type": "string" } }, + "hash_body": { "type": ["string","null"], "pattern": "^[a-f0-9]{64}$" }, + "hash_frontmatter": { "type": ["string","null"], "pattern": "^[a-f0-9]{64}$" }, + "hash_full": { "type": ["string","null"], "pattern": "^[a-f0-9]{64}$" }, - "hash_fulltext":{ "type": "string" }, - "hash_raw_body":{ "type": "string" }, - "fulltext": { "type": "string" } + "hashes": { + "type": ["object","null"], + "description": "Mapping: :: -> sha256 hex", + "patternProperties": { + "^(body|frontmatter|full):(parsed|raw):(canonical|none)$": { + "type": "string", + "pattern": "^[a-f0-9]{64}$" + } + }, + "additionalProperties": false + } }, - + "required": ["note_id"], "additionalProperties": true }