{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Toolchain descriptor",
  "description": "This schema defines the properties of a toolchain",

  "type": "object",

  "properties": {

    "description": { "$ref": "../common/1.json#/definitions/description" },

    "datasets" : {
      "$ref": "common.json#/definitions/datasets"
    },

    "blocks": {
      "$ref": "common.json#/definitions/blocks"
    },

    "loops": {
      "type": "array",
      "uniqueItems": true,
      "items": { "$ref": "#/definitions/loop" }
    },

    "analyzers" : {
      "$ref": "common.json#/definitions/analyzers"
    },

    "connections" : {
      "$ref": "common.json#/definitions/connections"
    },

    "representation": {

      "type": "object",

      "properties": {

        "connections": {
          "$ref": "common.json#/definitions/representation/connection_list"
        },
        "blocks": {
          "$ref": "common.json#/definitions/representation/block_list"
        },
        "channel_colors": {
          "$ref": "common.json#/definitions/representation/channel_colors"
        }

      },

      "required": [
        "connections",
        "blocks",
        "channel_colors"
      ],

      "additionalProperties": false

    },

    "schema_version": { "$ref": "../common/1.json#/definitions/version" }

  },

  "required": [
    "datasets",
    "blocks",
    "analyzers",
    "connections",
    "representation"
  ],

  "additionalProperties": false
}
