{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
        "Pick<ViewNavigationGroup,\"title\"|\"hidden\"|\"child\"|\"defaultView\">": {
            "description": "From T, pick a set of properties whose keys are in the union K",
            "properties": {
                "child": {
                    "description": "Nested items for the group",
                    "items": {
                        "anyOf": [
                            {
                                "$ref": "#/definitions/ViewNavigationGroup"
                            },
                            {
                                "$ref": "#/definitions/ViewNavigationItem"
                            }
                        ]
                    },
                    "type": "array"
                },
                "defaultView": {
                    "description": "If specified this view will be default view for the group; if not, the first available view will be default view",
                    "type": "string"
                },
                "hidden": {
                    "description": "If true, the group will not be visible in navigation (but still accessible by direct link or drilldown)",
                    "type": "boolean"
                },
                "title": {
                    "description": "Displayed name for the grouup",
                    "type": "string"
                }
            },
            "required": [
                "child",
                "title"
            ],
            "type": "object"
        },
        "Pick<ViewNavigationItem,\"hidden\"|\"viewName\">": {
            "description": "From T, pick a set of properties whose keys are in the union K",
            "properties": {
                "hidden": {
                    "type": "boolean"
                },
                "viewName": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "ViewMetaWidgetLegacy": {
            "description": "Widget can be uniquely identified by numeric id",
            "properties": {
                "gridWidth": {
                    "description": "Currently unused",
                    "type": "number"
                },
                "position": {
                    "description": "Number used to order widget on the view; widgets with lesser `position` will be shown first",
                    "type": "number"
                },
                "widgetId": {
                    "description": "Reference to `id` property from *.widget.json file",
                    "type": "number"
                }
            },
            "required": [
                "position",
                "widgetId"
            ],
            "type": "object"
        },
        "ViewMetaWidgetNew": {
            "description": "Widget can be uniquely identified by string id",
            "properties": {
                "gridWidth": {
                    "description": "Currently unused",
                    "type": "number"
                },
                "position": {
                    "description": "Number used to order widget on the view; widgets with lesser `position` will be shown first",
                    "type": "number"
                },
                "widgetName": {
                    "description": "Reference to `name` property from *.widget.json file",
                    "type": "string"
                }
            },
            "required": [
                "position",
                "widgetName"
            ],
            "type": "object"
        },
        "ViewNavigationGroup": {
            "description": "Description of groups in the navigation menu.\n\nUsed to create nesting levels of menu items.",
            "properties": {
                "child": {
                    "description": "Nested items for the group",
                    "items": {
                        "anyOf": [
                            {
                                "$ref": "#/definitions/ViewNavigationGroup"
                            },
                            {
                                "$ref": "#/definitions/ViewNavigationItem"
                            }
                        ]
                    },
                    "type": "array"
                },
                "defaultView": {
                    "description": "If specified this view will be default view for the group; if not, the first available view will be default view",
                    "type": "string"
                },
                "hidden": {
                    "description": "If true, the group will not be visible in navigation (but still accessible by direct link or drilldown)",
                    "type": "boolean"
                },
                "id": {
                    "description": "TODO identifier will be nullable and string-only in 2.0.0",
                    "type": [
                        "string",
                        "number"
                    ]
                },
                "title": {
                    "description": "Displayed name for the grouup",
                    "type": "string"
                }
            },
            "required": [
                "child",
                "title"
            ],
            "type": "object"
        },
        "ViewNavigationItem": {
            "description": "Description of the destination in the navigation menu.",
            "properties": {
                "hidden": {
                    "type": "boolean"
                },
                "id": {
                    "description": "TODO: remove in 2.0.0",
                    "type": "string"
                },
                "viewName": {
                    "type": "string"
                }
            },
            "type": "object"
        }
    },
    "description": "*.view.json file format\n\nDescribes a view",
    "properties": {
        "name": {
            "description": "Unique identifier for the view",
            "type": "string"
        },
        "title": {
            "description": "Displayed name",
            "type": "string"
        },
        "url": {
            "description": "Url for the view (usually in form of `${screen.name}/${view.name}`)",
            "type": "string"
        },
        "widgets": {
            "anyOf": [
                {
                    "$ref": "#/definitions/ViewMetaWidgetLegacy"
                },
                {
                    "$ref": "#/definitions/ViewMetaWidgetNew"
                }
            ],
            "description": "Widgets present on the view"
        }
    },
    "required": [
        "name",
        "title",
        "url",
        "widgets"
    ],
    "type": "object"
}

