{
    "$schema": "http://json-schema.org/draft-04/schema",
    "type": "object",
    "properties": {
        "$schema": {
            "type": "string",
            "description": "URL to a schema file"
        },
        "version": {
            "type": "object",
            "properties": {
                "full": {
                    "type": "string",
                    "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$"
                },
                "major": {
                    "type": "integer",
                    "minimum": 0
                },
                "minor": {
                    "type": "integer",
                    "minimum": 0
                },
                "revision": {
                    "type": "integer",
                    "minimum": 0
                },
                "build": {
                    "type": "integer",
                    "minimum": 0
                }
            },
            "required": ["full", "major", "minor", "revision", "build"]
        },
        "dependencyFiles": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Path to the file with the framework directory as base path.",
                        "minLength": 1
                    },
                    "type": {
                        "type": "string",
                        "enum": ["JavaScript", "EsModule"],
                        "description": "Type of the framework asset. JavaScript and EsModule are supported."
                    },
                    "description": {
                        "type": "string",
                        "description": "A long description of this file."
                    }
                },
                "required": ["name", "type", "description"]
            }
        },
        "events": {
            "type": "array",
            "description": "A list of events assoziated to the framework.",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Internal name of the event."
                    },
                    "displayName": {
                        "type": "string",
                        "description": "Name which should be presented the user."
                    },
                    "description": {
                        "type": "string",
                        "description": "A long description of this event."
                    },
                    "category": {
                        "type": "string",
                        "enum": ["Framework"],
                        "description": ""
                    },
                    "allowsPreventDefault": {
                        "type": "boolean",
                        "description": "The event can have the option preventDefault."
                    }
                },
                "required": ["name", "displayName", "description"]
            }
        },
        "dataTypes": {
            "type": "array",
            "description": "List of custom data types",
            "items": {
                "type": "object",
                "properties": {
                    "schema": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Path to the schema describing the datatype."
                    }
                },
                "required": ["schema"]
            }
        },
        "languages": {
            "type": "object",
            "description": "List of language files delivered by the framework core.",
            "additionalProperties": {
                "description": "Key is the language and region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US'). Value is the file path or array of paths.",
                "oneOf": [
                    {
                        "type": "string",
                        "description": "Key is the language and region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US'). Value is the file path."
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "description": "List of localization files. If some keys are referenced in multiple files, the last file will win."
                        }
                    }
                ]
            }
        }
    },
    "required": ["version", "dependencyFiles", "events", "dataTypes"]
}
