{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schemas.idkyet.fml128.ch/v1/builder.schema.json",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "schema_version": {
      "type": "integer",
      "const": 1
    },
    "project": {
      "type": "string",
      "minLength": 1
    },
    "defaults": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "arch": {
          "type": "string",
          "enum": ["x86_64_v3"]
        },
        "registry": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "layer_files": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1,
      "uniqueItems": true,
      "description": "List of layer file paths."
    },
    "security": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "aur_scan": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "enabled": {
              "type": "boolean",
              "default": true
            },
            "fail_on": {
              "type": "string",
              "enum": ["critical", "high", "medium", "low", "info"],
              "default": "high"
            }
          }
        }
      }
    }
  },
  "required": ["schema_version", "layer_files"]
}
