Newer
Older
{
"$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",

Ben Eltschig
committed
"required": ["name"],
"properties": {
"name": {
"type": "string"
},
"words": {
"type": "array",
"items": {"$ref":"#/definitions/word"}

Ben Eltschig
committed
},
"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"}

Ben Eltschig
committed
]
},
"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",

Ben Eltschig
committed
"type": "object",

Ben Eltschig
committed
"properties": {

Ben Eltschig
committed
"type": "string"
},
"items": {
"anyOf": [
{"type": "string"},
{"$ref":"#/definitions/wordRef"}
]
}

Ben Eltschig
committed
"relevance": {
"type": "number"
},
"description": {
"type": "string"
}
},
"additionalProperties": false
}
},
"type": "object",

Ben Eltschig
committed
"required": ["topics","modules"],
"macros": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},

Ben Eltschig
committed
"topics": {

Ben Eltschig
committed
"items": {"$ref":"#/definitions/topic"}
},
"modules": {
"type": "array",
"items": {"$ref": "#/definitions/module"}