{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.1x0.us/schemas/base-config.json",
  "title": "BindConfigForge Base Configuration",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "defaults": {
      "$ref": "#/$defs/defaults"
    },
    "keys": {
      "type": "object",
      "description": "Externally managed BIND key files known to BindConfigForge.",
      "additionalProperties": {
        "$ref": "#/$defs/key"
      }
    }
  },
  "$defs": {
    "defaults": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "default": "primary",
          "description": "Default BIND zone type."
        },
        "zone_directory": {
          "type": "string",
          "default": ".",
          "description": "Base directory under which per-zone directories are created."
        },
        "key_directory": {
          "type": "string",
          "default": "keys",
          "description": "Directory name or relative path for DNSSEC keys within a zone directory."
        }
      }
    },
    "key": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "file"
      ],
      "properties": {
        "file": {
          "type": "string",
          "minLength": 1,
          "description": "Path to an externally managed BIND key file."
        },
        "include": {
          "type": "boolean",
          "default": true,
          "description": "Whether to create an `include` line for the key."
		}
      }
    }
  }
}
