{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://shapes.penny.coop/menu/1.0.0/schema.json",
  "title": "Menu",
  "description": "A named navigation menu containing recursively nested items.",
  "type": "object",
  "properties": {
    "title": {
      "title": "Title",
      "type": "string",
      "x-penny": {
        "field": "text",
        "input": "text"
      }
    },
    "slug": {
      "title": "Slug",
      "type": "string",
      "x-penny": {
        "field": "text",
        "input": "text"
      }
    },
    "items": {
      "title": "Items",
      "type": "array",
      "items": {
        "$ref": "#/$defs/menuItem"
      },
      "x-penny": {
        "field": "menuItem",
        "input": "menuItems",
        "multiple": true
      }
    }
  },
  "required": [
    "title"
  ],
  "$defs": {
    "menuItem": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string"
        },
        "target": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/menuItem"
          }
        }
      }
    }
  },
  "x-penny": {
    "shape": "menu",
    "version": "1.0.0",
    "source": "app/types/menu.js",
    "sourceName": "menu",
    "kind": "record",
    "plural": "Menus",
    "icon": "Menu",
    "group": "Public",
    "defaultVisibility": "private",
    "publishable": false,
    "fieldOrder": [
      "title",
      "slug",
      "items"
    ]
  }
}
