{
    "$schema": "http://json-schema.org/draft-06/schema#",
    "title": "Geniventure Tutorial Authoring",
    "description": "Geniventure's tutorial authoring document",
    "type": "object",
    "properties": {
        "levels": {
            "description": "Configuration for the levels that comprise the application",
            "type": "array",
            "items": {
                "description": "Each entry corresponds to a level",
                "type": "object",
                "properties": {
                    "missions": {
                        "description": "Configuration for the missions that comprise the level",
                        "type": "array",
                        "items": {
                            "description": "Each entry corresponds to a mission",
                            "type": "object",
                            "properties": {
                                "challenges": {
                                    "description": "The list of challenges provided by this mission",
                                    "type": "array",
                                    "items": {
                                        "description": "Each entry corresponds to a challenge",
                                        "type": "object",
                                        "properties": {
                                            "steps": {
                                                "description": "The list of tutorial steps for this challenge",
                                                "type": "array",
                                                "items": {
                                                    "description": "A tutorial step",
                                                    "type": "object",
                                                    "properties": {
                                                        "element": {
                                                            "description": "The css class of the element being highlighted",
                                                            "type": "string"
                                                        },
                                                        "text": {
                                                            "description": "The main header text to show on the popup",
                                                            "type": "string"
                                                        },
                                                        "longText": {
                                                            "description": "Descriptive text to always show on the popup",
                                                            "type": "string"
                                                        },
                                                        "more": {
                                                            "description": "The additional supportive text of the tutorial displayed on clicking More",
                                                            "type": "string"
                                                        },
                                                        "pulseElement": {
                                                            "description": "The element to highlight with a css pulse (if different from the main element",
                                                            "type": "string"
                                                        },
                                                        "location": {
                                                            "description": "A specific location on screen for the popup",
                                                            "type": "string",
                                                            "pattern": "(top-left|top-center|top-right|middle-left|middle-center|middle-right|bottom-left|bottom-center|bottom-right)"
                                                        }
                                                    },
                                                    "required": [
                                                        "element",
                                                        "text"
                                                    ],
                                                    "additionalProperties": false
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}