{
    "definitions": {
        "LOM": {
            "$schema": "http://json-schema.org/draft-07/schema",
            "title": "Learning Object Metadata",
            "description": "is a data model to describe a learning object used to support learning",
            "type": "object",
            "properties": {
                "difficulty": {
                    "description": "difficulty level",
                    "type": "string"
                },
                "format": {
                    "description": "object format",
                    "type": "string"
                },
                "interactivity": {
                    "description": "interactivity level",
                    "type": "string"
                },
                "semantic": {
                    "description": "semantic level",
                    "type": "string"
                },
                "type": {
                    "description": "object type",
                    "type": "string"
                }
            },
            "required": [
                "difficulty",
                "format",
                "interactivity",
                "semantic",
                "type"
            ]
        },
        "bloom": {
            "$schema": "http://json-schema.org/draft-07/schema",
            "title": "Bloom taxonomy",
            "description": "Student knowledge model based on Bloom taxonomy",
            "type": "object",
            "properties": {
                "level": {
                    "enum": [
                        "beginner",
                        "middle",
                        "expert"
                    ]
                },
                "target": {
                    "enum": [
                        "knowledge",
                        "comprehension",
                        "application",
                        "analysis",
                        "synthesis",
                        "evaluation"
                    ]
                }
            },
            "required": [
                "level",
                "target"
            ]
        },
        "Section": {
            "$schema": "http://json-schema.org/draft-07/schema",
            "title": "Section of a Lesson",
            "description": "It is a section of a lesson from a Botbloq catalog course",
            "type": "object",
            "properties": {
                "id": {
                    "description": "Unique section identifier",
                    "type": "integer"
                },
                "Lessons": {
                    "description": "list of lessons",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Lesson"
                    },
                    "minItems": 1,
                    "_uniqueItems": true
                }
            },
            "required": [
                "id",
                "Lessons"
            ]
        },
        "Courses": {
            "$schema": "http://json-schema.org/draft-07/schema",
            "title": "Courses collection",
            "description": "It is a list of Botbloq catalog courses",
            "type": "object",
            "properties": {
                "id": {
                    "description": "Courses collection unique identifier",
                    "type": "integer"
                },
                "Courses": {
                    "description": "list of courses",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Course"
                    },
                    "minItems": 1,
                    "_uniqueItems": true
                }
            },
            "required": [
                "id",
                "Courses"
            ]
        },
        "Lesson": {
            "$schema": "http://json-schema.org/draft-07/schema",
            "title": "Lesson of a course",
            "description": "It is a lesson from a Botbloq catalog course",
            "type": "object",
            "properties": {
                "id": {
                    "description": "Unique lesson identifier",
                    "type": "integer"
                },
                "resource": {
                    "LOM": {
                        "$ref": "#/definitions/LOM"
                    },
                    "bloom": {
                        "$ref": "#/definitions/bloom"
                    }
                }
            },
            "required": [
                "id",
                "resource"
            ]
        },
        "Course": {
            "$schema": "http://json-schema.org/draft-07/schema",
            "title": "Course of XXX",
            "description": "It is a course from Botbloq catalog",
            "type": "object",
            "properties": {
                "id": {
                    "description": "Unique course ID",
                    "type": "integer"
                },
                "name": {
                    "description": "Official name of the course",
                    "type": "string"
                },
                "content": {
                    "description": "Short explanation about course content",
                    "type": "string"
                },
                "objetives": {
                    "description": "Short explanation about course objetives",
                    "type": "string"
                },
                "bibliography": {
                    "description": "Course bibliography",
                    "type": "string"
                },
                "Sections": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Section"
                    },
                    "minItems": 1,
                    "_uniqueItems": true
                }
            },
            "required": [
                "id",
                "name",
                "content",
                "objetives",
                "bibliography",
                "Sections"
            ]
        }
    },
    "properties": {
        "LOM": {
            "$ref": "#/definitions/LOM"
        },
        "bloom": {
            "$ref": "#/definitions/bloom"
        },
        "Section": {
            "$ref": "#/definitions/Section"
        },
        "Courses": {
            "$ref": "#/definitions/Courses"
        },
        "Lesson": {
            "$ref": "#/definitions/Lesson"
        },
        "Course": {
            "$ref": "#/definitions/Course"
        }
    },
    "required": [
        "LOM",
        "bloom",
        "Section",
        "Courses",
        "Lesson",
        "Course"
    ]
}