{ "$schema": "http://json-schema.org/schema#", "definitions": { "word": { "type":"object", "required": ["word"], "properties": { "word": { "type": "string" }, "description": { "type": "string" }, "synonyms": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "topic": { "type": "object", "required": ["name"], "properties": { "name": { "type": "string" }, "words": { "type": "array", "items": {"$ref":"#/definitions/word"} }, "subtopics": { "type": "array", "items": {"$ref":"#/definitions/topic"} } }, "additionalProperties": false }, "module": { "type": "object", "required": ["name","words","defaultRelevance"], "properties": { "name": { "type": "string" }, "defaultRelevance": { "type": "number", "description": "the default relevance for words in this module" }, "words": { "type": "array", "items": { "anyOf": [ {"$ref":"#/definitions/wordRef"}, {"$ref":"#/definitions/wordRefs"} ] }, "description": "references to / definitions for all words in this module" } }, "additionalProperties": false }, "wordRef": { "description": "a definition or reference to a word as it appears in modules", "type":"object", "required": ["word"], "properties": { "word": { "type": "string" }, "description": { "type": "string" }, "synonyms": { "type": "array", "items": { "type": "string" } }, "relevance": { "type": "number" } }, "additionalProperties": false }, "wordRefs": { "description": "a reference to a bunch of already-defined words", "type": "object", "required": ["from", "words"], "properties": { "from": { "type": "string" }, "words": { "type": "array", "items": { "anyOf": [ {"type": "string"}, {"$ref":"#/definitions/wordRef"} ] } }, "relevance": { "type": "number" }, "description": { "type": "string" } }, "additionalProperties": false } }, "type": "object", "required": ["topics","modules"], "properties": { "macros": { "type": "object", "additionalProperties": { "type": "string" } }, "topics": { "type": "array", "items": {"$ref":"#/definitions/topic"} }, "modules": { "type": "array", "items": {"$ref": "#/definitions/module"} } }, "additionalProperties": false }