{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "menuItem": {
      "title": "Menu item",
      "description": "Single menu item (hierarchical)",
      "type": "object",
      "properties": {
        "label": {
          "title": "Menu item label",
          "description": "Human-friendly label",
          "type": "string"
        },
        "url": {
          "title": "Menu item URL",
          "description": "Destination of the link",
          "type": "string",
          "minLength": 1
        },
        "icon": {
          "title": "Menu item icon",
          "description": "Icon image reference",
          "type": "string"
        },
        "desc": {
          "title": "Menu item description",
          "description": "Human-friendly description",
          "type": "string"
        },
        "target": {
          "title": "Menu item open target",
          "description": "Open link in the same window or new one",
          "type": "string"
        },
        "order": {
          "title": "Menu item order",
          "description": "Used to determine the position of the item in the menu",
          "type": "number"
        },
        "children": {
          "title": "Sub-menu items",
          "description": "Direct children items of the current menu item",
          "type": "array",
          "items": {
            "allOf": [
              {
                "$ref": "#/definitions/menuItem"
              }
            ]
          }
        }
      },
      "additionalProperties": false,
      "required": [
        "label",
        "url"
      ]
    }
  },
  "title": "Menus configuration",
  "description": "Menus configuration",
  "type": "object",
  "properties": {
    "main_menu": {
      "title": "Menu configurations",
      "description": "Configuration of each menu items",
      "type": "array",
      "items": {
        "allOf": [
          {
            "$ref": "#/definitions/menuItem"
          }
        ]
      }
    },
    "admin_menu": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "$ref": "#/definitions/menuItem"
          }
        ]
      }
    }
  },
  "additionalProperties": false
}