{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.1x0.us/schemas/mixin.json",
  "title": "BindConfigForge Mixin",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "string",
      "description": "BIND zone type."
    },
    "inline_signing": {
      "type": "boolean"
    },
    "dnssec_policy": {
      "type": "string",
      "minLength": 1
    },
    "update_policy": {
      "$ref": "#/$defs/updatePolicy"
    },
    "allow_transfer": {
      "$ref": "#/$defs/allowTransfer"
    }
  },
  "$defs": {
    "updatePolicy": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/updatePolicyGrant"
      }
    },
    "updatePolicyGrant": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "grant"
      ],
      "properties": {
        "grant": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "key",
            "match"
          ],
          "properties": {
            "key": {
              "type": "string",
              "minLength": 1,
              "description": "Name of a key declared in the base configuration."
            },
            "match": {
              "type": "string",
              "minLength": 1,
              "description": "BIND update-policy match type. BIND validates the value."
            },
            "name": {
              "type": "string",
              "minLength": 1,
              "description": "Optional BIND update-policy name, potentially containing {zone}."
            },
            "types": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        }
      }
    },
    "allowTransfer": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  }
}
