{
  "type": "object",
  "required": ["rescaling"],
  "properties":{
    "rescaling": {"type": "string", "enum": ["max", "min", "target"]},
    "value": {"oneOf": [{"type": "number"}, {"type": "boolean"}]},
    "multiplier": {"type": "number", "default": 1, "minVal": 0.00001},
    "use_raw": {"type": "boolean", "default": false},
    "filter": {
      "type": "object",
      "properties":{
        "oneOf": [
          {
            "operator": { "oneOf": ["gt", "ge", "lt", "le"], "optional": false},
            "value": {"type": "number", "optional": false}
          },
          {
            "operator": { "oneOf": ["ne", "eq"], "optional": false},
            "value": {
              "oneOf": [{"type": "number"}, {"type": "boolean"}],
              "optional": false}
          },
          {
            "operator": {
              "oneOf": [
                "in",
                "not in"
              ],
              "optional": false
            },
            "value": {"type": "array"}
          },
          {
            "operator": {
              "oneOf": [
                "within",
                "not within"
              ],
              "optional": false
            },
            "value": {
              "type": "array",
              "items": {
                "type": "number"
              },
              "uniqueItems": true,
              "maxItems": 2,
              "minItems": 2
            }
          }
        ]
      }
    }
  }
}
