{
    "$id": "https://gros.liacs.nl/schema/visualization-site/visualizations.json",
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "title": "Available visualizations on visualization site",
    "$ref": "#/$defs/visualizations",
    "$defs": {
        "visualizations": {
            "type": "object",
            "properties": {
                "groups": {
                    "type": "array",
                    "items": {"$ref": "#/$defs/group"}
                }
            }
        },
        "group": {
            "type": "object",
            "description": "Group of visualizations to be shown together in the hub.",
            "properties": {
                "id": {
                    "type": "string",
                    "description": "Identifier of the group."
                },
                "items": {
                    "type": "array",
                    "items": {"$ref": "#/$defs/visualization"}
                }
            }
        },
        "visualization": {
            "type": "object",
            "description": "Visualization available in the hub.",
            "properties": {
                "id": {
                    "type": "string",
                    "description": "Identifier of the visualization."
                },
                "icon": {
                    "type": "array",
                    "minItems": 2,
                    "description": "FontAwesome specification for an icon that represents the visualization."
                },
                "url": {
                    "type": "string",
                    "description": "Mustache template for a URL to the visualization. Uses the ID in combination with `visualization_url` configuration if not provided."
                },
                "language_parameter": {
                    "type": "string",
                    "description": "Query string parameter key to use to add the currently selected language in the URL to the visualization."
                },
                "blog": {
                    "type": "object",
                    "description": "Reference to a blog post about the visualization.",
                    "properties": {
                        "fragment": {
                            "type": "string",
                            "description": "URL fragment for the blog post."
                        },
                        "language": {
                            "type": "string",
                            "description": "Language code for the language the blog post is written in."
                        }
                    }
                },
                "download": {
                    "type": "string",
                    "description": "Custom download URL for the visualization."
                },
                "nginx": {
                    "type": "boolean",
                    "description": "Whether the visualization is hosted by the proxy on the visualization site. This is `false` when the visualization is hosted on another site, such as the prediction site."
                },
                "index": {
                    "type": "boolean",
                    "description": "Whether to display the visualization as a block on the visualization site hub."
                },
                "repo": {
                    "type": "string",
                    "description": "Name of the repository where the code for the visualization is stored."
                },
                "videos": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "description": "JSON-LD specification of a video about the visualization.",
                        "properties": {
                            "@type": {
                                "type": "string",
                                "const": "VideoObject",
                                "description": "JSON-LD type of the video object."
                            },
                            "@id": {
                                "type": "string",
                                "format": "uri-reference",
                                "description": "Path to the video file."
                            },
                            "name": {
                                "type": "string",
                                "description": "Title of the video."
                            },
                            "thumbnail": {
                                "type": "string",
                                "format": "uri-reference",
                                "description": "Path to a thumbnail image of the video."
                            },
                            "duration": {
                                "type": "string",
                                "format": "duration",
                                "description": "Duration of the video."
                            },
                            "inLanguage": {
                                "type": "string",
                                "pattern": "^[a-zA-Z]{2,3}(-.*)?$",
                                "description": "Language that the video is available in."
                            },
                            "sameAs": {
                                "type": "string",
                                "format": "uri",
                                "description": "External location where the video is available."
                            }
                        }
                    }
                }
            }
        }
    }
}
