{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "Page",
    "properties": {
        "title": {
            "type": "string"
        },
        "description": {
            "type": "string"
        },
        "children": {
            "type": "array",
            "items": {
                "oneOf": [
                    {
                        "$ref": "#/definitions/stage"
                    },
                    {
                        "$ref": "#/definitions/teaser"
                    }
                ]
            }
        }
    },
    "additionalProperties": false,
    "required": [
        "title",
        "description",
        "children"
    ],
    "definitions": {
        "stage": {
            "title": "stage",
            "properties": {
                "type": {
                    "type": "string",
                    "enum": [
                        "stage"
                    ],
                    "default": "stage"
                },
                "props": {
                    "properties": {
                        "title": {
                            "type": "string"
                        },
                        "description": {
                            "type": "string"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "title",
                        "description"
                    ]
                }
            },
            "required": [
                "type",
                "props"
            ]
        },
        "teaser": {
            "title": "teaser",
            "properties": {
                "type": {
                    "type": "string",
                    "enum": [
                        "teaser"
                    ],
                    "default": "teaser"
                },
                "props": {
                    "properties": {
                        "children": {
                            "type": "array",
                            "items": {
                                "properties": {
                                    "title": {
                                        "type": "string"
                                    },
                                    "description": {
                                        "type": "string"
                                    },
                                    "reference": {
                                        "type": "string"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "title",
                                    "description",
                                    "reference"
                                ]
                            }
                        }
                    }
                }
            },
            "additionalProperties": false,
            "required": [
                "type",
                "props"
            ]
        }
    }
}