{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schemas.apps.smartmate.io/tables/filter/rules/arrayFieldRule.schema.json",
  "$$target": "https://schemas.apps.smartmate.io/tables/filter/rules/arrayFieldRule.schema.json",
  "title": "arrayFieldRule",
  "type": "object",
  "properties": {
    "field": {
      "description": "The field to filter",
      "oneOf": [
        {
          "$ref": "https://schemas.apps.smartmate.io/patterns/nestedIdentification.schema.json"
        },
        {
          "$ref": "https://schemas.apps.smartmate.io/patterns/parentFieldReference.schema.json"
        }
      ]
    },
    "operator": {
      "description": "The operator. Must be one of the enum items.",
      "type": "string",
      "enum": ["includes", "doesNotInclude"]
    },
    "value": {
      "description": "The value to filter",
      "anyOf": [
        { "type": "string" },
        { "type": "number" }
      ]
    }
  },
  "required": ["field", "operator"],
  "additionalProperties": false
}
