{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "",
    "type": "object",
    "properties": {
        "webservice": {
            "type": "object",
            "properties": {
                "urlStem": {
                    "type": "string",
                    "minLength": 1
                },
                "token": {
                    "type": "string",
                    "minLength": 1
                },
                "lrs": {
                    "type": "object",
                    "properties": {
                        "endpoint": {
                            "type": "string",
                            "minLength": 1
                        },
                        "key": {
                            "type": "string",
                            "minLength": 1
                        },
                        "secret": {
                            "type": "string",
                            "minLength": 1
                        },
                        "token": {
                            "type": "string",
                            "minLength": 1
                        },
                        "version": {
                            "type": "string",
                            "minLength": 1
                        },
                        "contextID": {
                            "type": "string",
                            "minLength": 1
                        },
                        "contextGroup": {
                            "type": "string",
                            "minLength": 1
                        },
                        "contextParent": {
                            "type": "string",
                            "minLength": 1
                        },
                        "contextCategory": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    "required": [
                        "endpoint",
                        "key",
                        "secret",
                        "token",
                        "version",
                        "contextID",
                        "contextGroup",
                        "contextParent",
                        "contextCategory"
                    ]
                },
                "shadowdb": {
                    "type": "object",
                    "properties": {
                        "endpoint": {
                            "type": "string",
                            "minLength": 1
                        },
                        "token": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    "required": [
                        "endpoint",
                        "token"
                    ]
                }
            },
            "required": [
                "urlStem",
                "token",
                "lrs",
                "shadowdb"
            ]
        },
        "defaultuser": {
            "type": "string"
        },
        "currentVersion": {
            "type": "string",
            "minLength": 1
        },
        "newIfWithinDays": {
            "type": "string",
            "minLength": 1
        },
        "setup": {
            "type": "object",
            "properties": {
                "title": {
                    "type": "string",
                    "minLength": 1
                },
                "secondaryNav": {
                    "type": "array",
                    "_uniqueItems": true,
                    "minItems": 1,
                    "items": {
                        "required": [
                            "label",
                            "link"
                        ],
                        "properties": {
                            "label": {
                                "type": "string",
                                "minLength": 1
                            },
                            "link": {
                                "type": "string",
                                "minLength": 1
                            }
                        }
                    }
                },
                "interface": {
                    "type": "object",
                    "properties": {
                        "periodLabel": {
                            "type": "string",
                            "minLength": 1
                        },
                        "showDateOnPeriod": {
                            "type": "boolean"
                        },
                        "timelineStyle": {
                            "type": "number"
                        },
                        "cardStyle": {
                            "type": "number"
                        }
                    },
                    "required": [
                        "periodLabel",
                        "showDateOnPeriod",
                        "timelineStyle",
                        "cardStyle"
                    ]
                },
                "startEvent": {
                    "type": "string",
                    "minLength": 1
                }
            },
            "required": [
                "title",
                "secondaryNav",
                "interface",
                "startEvent"
            ]
        },
        "contentTypes": {
            "type": "array",
            "_uniqueItems": true,
            "minItems": 1,
            "items": {
                "required": [
                    "label",
                    "icon"
                ],
                "properties": {
                    "label": {
                        "type": "string",
                        "minLength": 1
                    },
                    "icon": {
                        "type": "string",
                        "minLength": 1
                    }
                }
            }
        },
        "structure": {
            "type": "array",
            "_uniqueItems": true,
            "minItems": 1,
            "items": {
                "required": [
                    "version",
                    "startDate",
                    "introduction",
                    "instructions"
                ],
                "properties": {
                    "version": {
                        "type": "string",
                        "minLength": 1
                    },
                    "startDate": {
                        "type": "string",
                        "minLength": 1
                    },
                    "introduction": {
                        "type": "string"
                    },
                    "instructions": {
                        "type": "string"
                    },
                    "data": {
                        "type": "array",
                        "_uniqueItems": true,
                        "minItems": 1,
                        "items": {
                            "required": [
                                "period",
                                "category",
                                "startDay",
                                "endDay"
                            ],
                            "properties": {
                                "period": {
                                    "type": "string",
                                    "minLength": 1
                                },
                                "category": {
                                    "type": "string",
                                    "minLength": 1
                                },
                                "title": {
                                    "type": "string"
                                },
                                "startDay": {
                                    "type": "string",
                                    "minLength": 1
                                },
                                "endDay": {
                                    "type": "string",
                                    "minLength": 1
                                },
                                "summary": {
                                    "type": "string"
                                },
                                "topics": {
                                    "type": "array",
                                    "_uniqueItems": true,
                                    "minItems": 1,
                                    "items": {
                                        "required": [
                                            "title",
                                            "summary"
                                        ],
                                        "properties": {
                                            "title": {
                                                "type": "string",
                                                "minLength": 1
                                            },
                                            "summary": {
                                                "type": "string"
                                            },
                                            "content": {
                                                "type": "array",
                                                "minLength": 1
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "content": {
            "type": "array",
            "_uniqueItems": true,
            "minItems": 1,
            "items": {
                "required": [
                    "active",
                    "dateAdded",
                    "dateUpdated",
                    "id",
                    "title",
                    "contentLink",
                    "summary",
                    "duration",
                    "contentType",
                    "requireConfirm"
                ],
                "properties": {
                    "active": {
                        "type": "boolean"
                    },
                    "dateAdded": {
                        "type": "string",
                        "minLength": 1
                    },
                    "dateUpdated": {
                        "type": "string",
                        "minLength": 1
                    },
                    "id": {
                        "type": "number"
                    },
                    "title": {
                        "type": "string",
                        "minLength": 1
                    },
                    "contentLink": {
                        "type": "string",
                        "minLength": 1
                    },
                    "lmsID": {
                        "type": "number"
                    },
                    "summary": {
                        "type": "string",
                        "minLength": 1
                    },
                    "duration": {
                        "type": "string",
                        "minLength": 1
                    },
                    "contentType": {
                        "type": "number"
                    },
                    "isRequired": {},
                    "requireConfirm": {
                        "type": "boolean"
                    }
                }
            }
        }
    },
    "required": [
        "webservice",
        "defaultuser",
        "currentVersion",
        "newIfWithinDays",
        "setup",
        "contentTypes",
        "structure",
        "content"
    ]
}