{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "EAOS Architecture Model",
  "type": "object",
  "required": [
    "schemaVersion",
    "project",
    "modules"
  ],
  "properties": {
    "schemaVersion": {
      "type": "string"
    },
    "project": {
      "type": "object",
      "required": [
        "id",
        "name",
        "groupId",
        "javaVersion"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "groupId": {
          "type": "string"
        },
        "javaVersion": {
          "type": "integer",
          "minimum": 21
        }
      }
    },
    "modules": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "type",
          "dependsOn"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "enum": [
              "domain",
              "application",
              "adapter",
              "bootstrap",
              "test-support"
            ]
          },
          "dependsOn": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}