{
  "$id": "rule.json",
  "type": "object",
  "properties": {
    "path": {
      "type": "string"
    },
    "encoding": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "utf8",
            "binary"
          ]
        },
        {
          "type": "object",
          "propertyNames": {
            "enum": [
              "utf8",
              "binary"
            ]
          },
          "patternProperties": {
            ".*": {
              "type": "string"
            }
          }
        }
      ]
    },
    "upgrade": {
      "type": "string",
      "enum": [
        "cover",
        "keep",
        "exist",
        "merge"
      ],
      "default": "cover"
    },
    "glob": {
      "type": "boolean",
      "default": true
    },
    "handler": {
      "$ref": "handler.json"
    },
    "handlers": {
      "type": "array",
      "items": {
        "$ref": "handler.json"
      }
    }
  },
  "required": [
    "path"
  ]
}
