{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/esquio.json",
  "definitions": {
    "Esquio": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "Products": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Product"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["Products"]
        },
        {
          "type": "null"
        }
      ]
    },
    "Feature": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "Name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "Enabled": {
              "type": "boolean"
            },
            "Toggles": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Toggle"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["Name", "Enabled", "Toggles"]
        },
        {
          "type": "null"
        }
      ]
    },
    "Product": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "Name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "Features": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Feature"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["Name", "Features"]
        },
        {
          "type": "null"
        }
      ]
    },
    "Toggle": {
      "anyOf": [
        {
          "type": "object",
          "required": ["Type", "Parameters"],
          "properties": {
            "Type": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "Parameters": {}
          }
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "properties": {
    "Esquio": {
      "$ref": "#/definitions/Esquio"
    }
  },
  "required": ["Esquio"],
  "title": "JSON schema for Esquio configuration files",
  "type": "object"
}
