{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Decapod Constitution Graph",
  "type": "object",
  "required": [
    "nodes"
  ],
  "properties": {
    "nodes": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "required": [
          "title",
          "category",
          "dependencies",
          "content"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "dependencies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "content": {
            "type": "object",
            "required": [
              "summary",
              "sections"
            ],
            "properties": {
              "summary": {
                "type": "string"
              },
              "sections": {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object"
                    },
                    {
                      "type": "array"
                    }
                  ]
                }
              },
              "links": {
                "type": "object",
                "additionalProperties": true
              }
            },
            "additionalProperties": false
          }
        }
      }
    }
  }
}
