{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Generated schema for Root",
  "type": "object",
  "properties": {
    "version": {
      "type": "number"
    },
    "name": {
      "type": "string"
    },
    "word_length": {
      "type": "number"
    },
    "opcode_length": {
      "type": "number"
    },
    "graphical_representation_scale": {
      "type": "number",
      "default": 0.1
    },
    "components": {
      "type": "object",
      "properties": {
        "bus": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "additionalGraphicalPoints": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "x": {
                      "type": "number"
                    },
                    "y": {
                      "type": "number"
                    },
                    "noConnection": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "x",
                    "y"
                  ]
                }
              }
            },
            "required": [
              "name"
            ]
          }
        },
        "registers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "input": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              },
              "in_out_dir": {
                "type": "number"
              }
            },
            "required": [
              "name",
              "input",
              "output"
            ]
          }
        },
        "mux": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              },
              "inputs": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "in_out_dir": {
                "type": "number"
              }
            },
            "required": [
              "name",
              "output",
              "inputs"
            ]
          }
        },
        "alu": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "output": {
              "type": "string"
            },
            "x": {
              "type": "number"
            },
            "y": {
              "type": "number"
            },
            "inputs": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "name",
            "output",
            "inputs"
          ]
        },
        "memory": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "input": {
              "type": "object",
              "properties": {
                "address": {
                  "type": "string"
                },
                "data": {
                  "type": "string"
                }
              },
              "required": [
                "address",
                "data"
              ]
            },
            "output": {
              "type": "string"
            },
            "size": {
              "type": "number"
            }
          },
          "required": [
            "name",
            "input",
            "output",
            "size"
          ]
        }
      },
      "required": [
        "bus",
        "registers",
        "mux",
        "alu",
        "memory"
      ]
    }
  },
  "required": [
    "version",
    "name",
    "word_length",
    "opcode_length",
    "graphical_representation_scale",
    "components"
  ]
}