{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/modoboa/json-schema/modoboa-patched-policy-schema.json",
  "title": "PatchedPolicy",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/modoboa-amavis-api-openapi.yml#/components/schemas/PatchedPolicy",
  "type": "object",
  "properties": {
    "bypass_virus_checks": {
      "title": "Virus filter",
      "description": "Bypass virus checks or not. Choose 'default' to use global settings.\n\n* `N` - yes\n* `Y` - no\n* `` - default",
      "oneOf": [
        {
          "$ref": "#/$defs/BypassBannedChecksEnum"
        },
        {
          "$ref": "#/$defs/BlankEnum"
        },
        {
          "$ref": "#/$defs/NullEnum"
        }
      ]
    },
    "bypass_spam_checks": {
      "title": "Spam filter",
      "description": "Bypass spam checks or not. Choose 'default' to use global settings.\n\n* `N` - yes\n* `Y` - no\n* `` - default",
      "oneOf": [
        {
          "$ref": "#/$defs/BypassBannedChecksEnum"
        },
        {
          "$ref": "#/$defs/BlankEnum"
        },
        {
          "$ref": "#/$defs/NullEnum"
        }
      ]
    },
    "bypass_banned_checks": {
      "title": "Banned filter",
      "description": "Bypass banned checks or not. Choose 'default' to use global settings.\n\n* `N` - yes\n* `Y` - no\n* `` - default",
      "oneOf": [
        {
          "$ref": "#/$defs/BypassBannedChecksEnum"
        },
        {
          "$ref": "#/$defs/BlankEnum"
        },
        {
          "$ref": "#/$defs/NullEnum"
        }
      ]
    },
    "spam_tag2_level": {
      "type": [
        "number",
        "null"
      ],
      "format": "double"
    },
    "spam_kill_level": {
      "type": [
        "number",
        "null"
      ],
      "format": "double"
    },
    "spam_subject_tag2": {
      "type": [
        "string",
        "null"
      ],
      "title": "Spam marker",
      "description": "Modify spam subject using the specified text. Choose 'default' to use global settings.",
      "maxLength": 192
    }
  },
  "$defs": {
    "BlankEnum": {
      "enum": [
        ""
      ]
    },
    "BypassBannedChecksEnum": {
      "enum": [
        "N",
        "Y"
      ],
      "type": "string",
      "description": "* `N` - yes\n* `Y` - no\n* `` - default"
    },
    "NullEnum": {
      "enum": [
        null
      ]
    }
  }
}