{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "required": [
        "places"
    ],
    "properties": {
        "redirectOn": {
            "type": "object",
            "description": "Globally defined redirects for certain edge cases",
            "properties": {
                "unknownPlace": {
                    "type": "string",
                    "description": "This place is loaded whenever the requested place doesn't exist."
                }
            },
            "default": {},
            "additionalProperties": false
        },
        "places": {
            "type": "object",
            "format": "topic-map",
            "description": "The places for this flow. Keys (that is, place names) must be valid event topics.",
            "additionalProperties": {
                "type": "object",
                "properties": {
                    "patterns": {
                        "type": "array",
                        "description": "Non-empty list of URL patterns to route to this place. If omitted, the place name (prefixed with a slash) is used as the sole pattern.",
                        "minItems": 1,
                        "items": {
                            "type": "string"
                        }
                    },
                    "page": {
                        "type": "string",
                        "description": "The page to render for this place."
                    },
                    "redirectTo": {
                        "type": "string",
                        "description": "The place to redirect to when hitting this place."
                    },
                    "redirectToPath": {
                        "type": "string",
                        "description": "The path to redirect to when hitting this place, including the values for relevant place parameters."
                    },
                    "defaultParameters": {
                        "type": "object",
                        "default": {},
                        "additionalProperties": {
                            "type": [
                                "string",
                                "boolean",
                                "null"
                            ]
                        },
                        "description": "Default values for optional (query) parameters."
                    },
                    "targets": {
                        "type": "object",
                        "format": "topic-map",
                        "additionalProperties": {
                            "type": "string",
                            "format": "topic"
                        },
                        "description": "A map of symbolic targets to place-names reachable from this place."
                    }
                },
                "additionalProperties": false
            }
        }
    },
    "additionalProperties": false
}