{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://cms.mydesignsystem.com/settings.schema.json",
  "title": "Settings",
  "description": "Abstracts global settings made for a website into JSON Schema",
  "type": "object",
  "required": [
    "header",
    "footer",
    "seo"
  ],
  "properties": {
    "header": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "$id": "http://schema.mydesignsystem.com/header.schema.json",
      "title": "Header",
      "description": "Header layered on top by the CMS",
      "type": "object",
      "properties": {
        "logo": {
          "title": "Logo",
          "type": "object",
          "properties": {
            "src": {
              "title": "Source",
              "description": "Picture source",
              "type": "string",
              "format": "image"
            },
            "srcInverted": {
              "title": "Source",
              "description": "Picture source",
              "type": "string",
              "format": "image"
            },
            "alt": {
              "title": "Alt text",
              "description": "Alt text to display for picture",
              "type": "string"
            },
            "homepageHref": {
              "type": "string",
              "format": "uri",
              "default": "/"
            },
            "width": {
              "title": "Width",
              "description": "Width of the picture",
              "type": "integer",
              "minimum": 0,
              "examples": [
                300
              ]
            },
            "height": {
              "title": "Height",
              "description": "Height of the picture",
              "type": "integer",
              "minimum": 0,
              "examples": [
                300
              ]
            }
          },
          "additionalProperties": false
        },
        "flyoutInverted": {
          "type": "boolean",
          "title": "Flyout Inverted",
          "description": "Toggle the inversion of the flyout navigation",
          "default": false
        },
        "dropdownInverted": {
          "type": "boolean",
          "title": "Dropdown Inverted",
          "description": "Toggle the inversion of the dropdown navigation",
          "default": false
        },
        "floating": {
          "type": "boolean",
          "title": "Floating",
          "description": "Make the header float over the first Section",
          "default": false
        },
        "inverted": {
          "type": "boolean",
          "title": "Inverted",
          "description": "Invert the color scheme of the header",
          "default": false
        },
        "navItems": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "label": {
                "type": "string"
              },
              "active": {
                "type": "boolean"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "label": {
                      "type": "string"
                    },
                    "active": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false,
            "required": [
              "url",
              "label"
            ]
          },
          "examples": [
            [
              {
                "label": "Active Item",
                "url": "#",
                "active": true
              },
              {
                "label": "Navigation Item",
                "url": "#"
              },
              {
                "label": "Dropdown",
                "url": "#",
                "items": [
                  {
                    "label": "Level 2 Item",
                    "url": "#"
                  },
                  {
                    "label": "Active Item",
                    "active": true,
                    "url": "#"
                  },
                  {
                    "label": "An Item with a longer Label",
                    "url": "#"
                  },
                  {
                    "label": "And One last one",
                    "url": "#"
                  }
                ]
              },
              {
                "label": "One more Item",
                "url": "#"
              },
              {
                "label": "Last Item",
                "url": "#"
              }
            ]
          ]
        }
      },
      "additionalProperties": false
    },
    "footer": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "$id": "http://schema.mydesignsystem.com/footer.schema.json",
      "title": "Footer",
      "description": "Footer component for displaying site logo, byline, and navigation items at the bottom of the page.",
      "type": "object",
      "properties": {
        "logo": {
          "title": "Logo",
          "type": "object",
          "properties": {
            "src": {
              "title": "Source",
              "description": "Picture source",
              "type": "string",
              "format": "image"
            },
            "srcInverted": {
              "title": "Source",
              "description": "Picture source",
              "type": "string",
              "format": "image"
            },
            "alt": {
              "title": "Alt text",
              "description": "Alt text to display for picture",
              "type": "string"
            },
            "homepageHref": {
              "type": "string",
              "format": "uri",
              "default": "/"
            },
            "width": {
              "title": "Width",
              "description": "Width of the picture",
              "type": "integer",
              "minimum": 0,
              "examples": [
                300
              ]
            },
            "height": {
              "title": "Height",
              "description": "Height of the picture",
              "type": "integer",
              "minimum": 0,
              "examples": [
                300
              ]
            }
          },
          "additionalProperties": false
        },
        "byline": {
          "title": "Byline",
          "description": "Small line of text displayed below the logo",
          "type": "string",
          "default": "© 2024 systemics Inc. All rights reserved."
        },
        "inverted": {
          "type": "boolean",
          "title": "Inverted",
          "description": "Invert the color scheme of the footer",
          "default": false
        },
        "navItems": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "label": {
                "type": "string"
              },
              "active": {
                "type": "boolean"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "label": {
                      "type": "string"
                    },
                    "active": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false,
            "required": [
              "url",
              "label"
            ]
          },
          "examples": [
            [
              {
                "label": "Active Item",
                "url": "#",
                "active": true
              },
              {
                "label": "Navigation Item",
                "url": "#"
              },
              {
                "label": "Dropdown",
                "url": "#",
                "items": [
                  {
                    "label": "Level 2 Item",
                    "url": "#"
                  },
                  {
                    "label": "Active Item",
                    "active": true,
                    "url": "#"
                  },
                  {
                    "label": "An Item with a longer Label",
                    "url": "#"
                  },
                  {
                    "label": "And One last one",
                    "url": "#"
                  }
                ]
              },
              {
                "label": "One more Item",
                "url": "#"
              },
              {
                "label": "Last Item",
                "url": "#"
              }
            ]
          ]
        }
      },
      "required": [
        "logo"
      ],
      "additionalProperties": false
    },
    "seo": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "$id": "http://cms.mydesignsystem.com/seo.schema.json",
      "title": "Seo",
      "description": "Abstracts SEO settings for a website into JSON schema",
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "title": "Title",
          "description": "Title used for the page"
        },
        "description": {
          "type": "string",
          "title": "Description",
          "description": "Description used for the page"
        },
        "keywords": {
          "type": "string",
          "title": "Keywords",
          "description": "Keywords used for the page"
        },
        "image": {
          "type": "string",
          "title": "Preview Image",
          "description": "Preview image used for the page",
          "format": "image"
        },
        "cardImage": {
          "type": "string",
          "title": "Card Preview Image",
          "description": "Card preview image (larger, e.g. Twitter) used for the page",
          "format": "image"
        }
      },
      "required": [
        "title"
      ],
      "additionalProperties": false
    },
    "iconSprite": {
      "type": "string",
      "title": "Icon Sprite",
      "description": "Content of the icon sprite for this project"
    },
    "token": {
      "type": "string",
      "title": "CSS custom property overrides",
      "description": "CSS custom property overrides to be included in the global styles"
    },
    "hideBreadcrumbs": {
      "type": "boolean",
      "title": "Hide Breadcrumbs",
      "description": "Whether to hide breadcrumbs across the site",
      "default": false
    }
  },
  "additionalProperties": false
}