{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "urn:trafficparrot:mapping-schema:file-message",
  "version": "1",
  "title": "Traffic Parrot file message mapping",
  "description": "One Traffic Parrot file message mapping: the request file to match and the response file to write, as a JSON file in the file-mappings directory (file-mappings/*.json). A check against this schema is stricter than loading the mapping: it rejects a misspelt key, which Traffic Parrot would ignore.",
  "$comment": "The shared matcher vocabulary is documented in full in http-mapping.schema.json. File message mappings have no state-machine scenario fields: for messaging, 'scenario' is only the directory the file lives in. Maintainer notes: Standalone JSON Schema for a single Traffic Parrot file message mapping file (file-mappings/*.json). Strictness notes: (1) the engine binds these files LENIENTLY (FAIL_ON_UNKNOWN_PROPERTIES=false in the filesystem object mapper) - misspelled fields are silently ignored at load time; this schema rejects unknown properties everywhere, which is exactly the validation gap it exists to close; (2) matcher objects are validated stricter than the engine, which silently ignores unknown sibling keys inside a matcher; (3) bodyType and the transformer class name are constrained to their known shapes although the engine binds them as open strings; (4) response.fileName is required by this schema although a custom response transformer could in principle supply it at runtime - hand-authored mappings must state it; (5) binaryEqualTo is available as the top-level request.bodyMatcher only, with an inline Base64 operand only (not nested inside and/or/not, whose operands are string-value matchers, not on fileNameMatcher, and a bodyFileName reference on it is refused when the mapping loads); (6) the engine's JSON parser relaxations (comments, single quotes) are not modelled - this schema validates strict JSON; (7) fileNameMatcher is REQUIRED although the engine binds it as optional: FileMessageMappingAdapter.requestMatcher() unconditionally wraps request.fileNameMatcher in a FileNameMatcher whose match() dereferences it, so a mapping without fileNameMatcher throws NullPointerException at match time and never matches (the incoming file is skipped) - every mapping the product itself records or builds carries one, so requiring it steers generation to a working shape; (8) priority (minimum 1) is constrained although the engine binds it as an unbounded integer and honours 0 or negative priority in ordering - this matches the numeric strictness of the committed http-mapping.schema.json. Behaviour notes: request.destination.name is the WATCHED DIRECTORY path and response.destination.name the output directory; fileNameMatcher and bodyMatcher combine (both must match) and both are required (see strictness note 7 - to match any file name use a permissive matcher such as {\"matches\": \".*\"}); unlike JMS / IBM MQ there is NO fixedDelayMilliseconds field. Round-trip fields deliberately accepted: mappingName (set to the file name on load, emitted on every loaded-then-re-saved mapping, silently ignored on read) and destination.skipDeclare / destination.declareArguments (always emitted on re-save).",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "description": "Reference to this schema for IDE support. Traffic Parrot ignores it.",
      "examples": [
        "http://localhost:8080/schemas/file-message-mapping.schema.json"
      ]
    },
    "id": {
      "type": "string",
      "description": "Unique identifier for the mapping. When Traffic Parrot saves a mapping it writes id, never mappingId.",
      "examples": [
        "0b1d4c39-6c2f-4e0e-9a51-8f2a3c5d7e90"
      ]
    },
    "mappingId": {
      "type": "string",
      "description": "Older name for id. Traffic Parrot reads it when it loads the mapping, and writes id in its place when it saves the mapping.",
      "examples": [
        "0b1d4c39-6c2f-4e0e-9a51-8f2a3c5d7e90"
      ]
    },
    "mappingName": {
      "type": "string",
      "description": "Do not write this key by hand. Traffic Parrot ignores any value written here: it sets the key to the file name when it loads the mapping, and writes it when it saves the mapping. The schema accepts it so that a saved mapping passes a check.",
      "examples": [
        "order-request.json"
      ]
    },
    "priority": {
      "type": "integer",
      "minimum": 1,
      "description": "Priority of this mapping (default 5, lower number = higher priority). This schema accepts 1 or more.",
      "examples": [
        1
      ]
    },
    "request": {
      "$ref": "#/definitions/request",
      "examples": [
        {
          "destination": {
            "name": "orders/in",
            "type": "QUEUE"
          },
          "fileNameMatcher": {
            "matches": "order-.*[.]json"
          },
          "bodyMatcher": {
            "contains": "orderId"
          }
        }
      ]
    },
    "response": {
      "$ref": "#/definitions/response",
      "examples": [
        {
          "destination": {
            "name": "orders/out",
            "type": "QUEUE"
          },
          "fileName": "confirmation.json",
          "text": "{\"status\": \"accepted\"}"
        }
      ]
    }
  },
  "required": [
    "request",
    "response"
  ],
  "additionalProperties": false,
  "definitions": {
    "request": {
      "type": "object",
      "description": "Request matching criteria: which directory to watch and which incoming files to match.",
      "properties": {
        "destination": {
          "$ref": "#/definitions/destination",
          "description": "Watched input directory: name is the directory path (e.g. incoming/orders).",
          "examples": [
            {
              "name": "orders/in",
              "type": "QUEUE"
            }
          ]
        },
        "fileNameMatcher": {
          "$ref": "#/definitions/stringValueMatcher",
          "description": "Required matcher on the incoming file name (e.g. {\"matches\": \"order-.*\\\\.xml\"}). Combined (AND) with bodyMatcher. Traffic Parrot loads a mapping without it, but that mapping never matches a file, so the schema requires it. To match any file name use a permissive matcher such as {\"matches\": \".*\"}.",
          "$comment": "Required matcher on the incoming file name (e.g. {\"matches\": \"order-.*\\\\.xml\"}). Combined (AND) with bodyMatcher. Required by this schema although the engine binds it as optional: a mapping without it throws NullPointerException at match time and never matches (strictness note 7). To match any file name use a permissive matcher such as {\"matches\": \".*\"}.",
          "examples": [
            {
              "matches": "order-.*[.]json"
            }
          ]
        },
        "bodyMatcher": {
          "$ref": "#/definitions/contentMatcher",
          "description": "Single matcher object applied to the incoming file content (shared string-value matcher vocabulary; binaryEqualTo is additionally available here, matching the file's exact bytes, which is how a file that is not text is matched on its content). This top-level matcher is the one position where the expected value may be externalised as {\"bodyFileName\": \"<file>\"} under __files, read when the mapping loads; a file reference nested inside and/or/not, or on fileNameMatcher, is refused at load with an error naming the mapping file.",
          "examples": [
            {
              "contains": "orderId"
            }
          ]
        }
      },
      "required": [
        "destination",
        "fileNameMatcher",
        "bodyMatcher"
      ],
      "additionalProperties": false
    },
    "response": {
      "type": "object",
      "description": "Response definition: the file to write when the request matches. There is no delay field for file messages.",
      "properties": {
        "destination": {
          "$ref": "#/definitions/destination",
          "description": "Output directory: name is the directory path the response file is written to.",
          "examples": [
            {
              "name": "orders/out",
              "type": "QUEUE"
            }
          ]
        },
        "fileName": {
          "type": "string",
          "description": "Name of the response file to write. May contain Handlebars templates. The schema requires it, although a response transformer could supply it.",
          "examples": [
            "confirmation.json"
          ]
        },
        "text": {
          "type": "string",
          "description": "Response file content. May contain Handlebars templates. A mapping whose transformer builds the whole response may omit it. With a BYTES bodyType it is the content as base64, written as the exact bytes it encodes and not templated.",
          "examples": [
            "{\"status\": \"accepted\"}"
          ]
        },
        "bodyFileName": {
          "type": "string",
          "description": "Response file content read from this file under the __files directory instead of from an inline text. Supported with a TEXT bodyType (the file is read as UTF-8 text) or a BYTES bodyType (the file is written byte for byte, for a binary reply; this is how a recorded binary response is saved). Distinct from fileName, which names the file WRITTEN to the response directory.",
          "examples": [
            "responses/order-accepted.json"
          ]
        },
        "bodyType": {
          "$ref": "#/definitions/bodyType",
          "examples": [
            "TEXT"
          ]
        },
        "fileMessageResponseTransformerClassName": {
          "$ref": "#/definitions/transformerClassName",
          "examples": [
            "com.example.OrderResponseTransformer"
          ]
        }
      },
      "required": [
        "destination",
        "fileName"
      ],
      "not": {
        "required": [
          "text",
          "bodyFileName"
        ],
        "description": "An inline text and a bodyFileName are mutually exclusive: Traffic Parrot rejects a response that sets both."
      },
      "allOf": [
        {
          "if": {
            "required": [
              "bodyFileName"
            ],
            "properties": {
              "bodyFileName": {
                "type": "string",
                "pattern": "\\S"
              }
            }
          },
          "then": {
            "properties": {
              "bodyType": {
                "enum": [
                  "TEXT",
                  "BYTES"
                ]
              }
            }
          },
          "description": "A response body read from a file (bodyFileName) needs a bodyType of TEXT or BYTES, or no bodyType at all. The rule does not apply to a blank bodyFileName.",
          "$comment": "Guard: a file-backed response body is supported only with a TEXT or BYTES bodyType - FileMessageResponse.validate() throws at load for anything else. This is the structural half of the restriction the bodyFileName description states in prose, and prose alone cannot stop a generator or the validate CLI. An ABSENT bodyType is accepted deliberately: this loader leaves the field null and guards on bodyType != null, so only an explicit bodyType other than TEXT or BYTES is refused. A BLANK bodyFileName is accepted for the same reason, which is what the pattern in the if is for: FileMessageResponse.validate() guards on isNotBlank(bodyFileName), so an empty or whitespace-only value never reaches the restriction and the mapping loads."
        },
        {
          "if": {
            "required": [
              "bodyType"
            ],
            "properties": {
              "bodyType": {
                "const": "BYTES"
              }
            }
          },
          "then": {
            "properties": {
              "text": {
                "type": "string",
                "pattern": "^[A-Za-z0-9+/=\\s]*$"
              }
            }
          },
          "description": "An inline BYTES body holds only Base64 characters and whitespace (a long body may be wrapped over several lines). Its length and padding are checked when the mapping loads.",
          "$comment": "Guard: an inline BYTES body holds only base64 characters and whitespace (a long body may be wrapped over several lines). Its length and padding are checked when the mapping loads, by FileMessageResponse.validate()."
        }
      ],
      "additionalProperties": false
    },
    "destination": {
      "type": "object",
      "description": "A file message destination: a directory path in the queue/topic shape shared by all messaging formats.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Directory path (input: watched directory; output: directory the response file is written to).",
          "examples": [
            "orders/in"
          ]
        },
        "type": {
          "type": "string",
          "enum": [
            "QUEUE",
            "TOPIC"
          ],
          "description": "Destination type. File message destinations conventionally use QUEUE.",
          "examples": [
            "QUEUE"
          ]
        },
        "skipDeclare": {
          "type": "boolean",
          "description": "An AMQP setting that means nothing for file messages. Traffic Parrot writes it, as false, every time it saves a mapping; it need not be written by hand.",
          "$comment": "AMQP-oriented field on the shared destination shape; not meaningful for file messages but always emitted on re-save (false).",
          "examples": [
            false
          ]
        },
        "declareArguments": {
          "type": "object",
          "description": "An AMQP setting that means nothing for file messages. Traffic Parrot writes it, as an empty object, every time it saves a mapping; it need not be written by hand.",
          "$comment": "AMQP-oriented field on the shared destination shape; not meaningful for file messages but always emitted on re-save (empty object).",
          "additionalProperties": true,
          "examples": [
            {}
          ]
        }
      },
      "required": [
        "name",
        "type"
      ],
      "additionalProperties": false
    },
    "bodyType": {
      "type": "string",
      "description": "Response body type: TEXT, BYTES, PRINTABLE_CHARACTERS, a proto/... | javaProto/... | protoBase64Bytes/... protobuf type reference, or a fully-qualified Java class name. Traffic Parrot accepts any text here when it loads the mapping; this schema accepts only these forms.",
      "anyOf": [
        {
          "enum": [
            "TEXT",
            "BYTES",
            "PRINTABLE_CHARACTERS"
          ]
        },
        {
          "pattern": "^proto/.+"
        },
        {
          "pattern": "^javaProto/.+"
        },
        {
          "pattern": "^protoBase64Bytes/.+"
        },
        {
          "pattern": "^([a-zA-Z_$][a-zA-Z0-9_$]*\\.)+[a-zA-Z_$][a-zA-Z0-9_$]*$"
        }
      ]
    },
    "transformerClassName": {
      "type": "string",
      "pattern": "^(NO_TRANSFORMER|([a-zA-Z_$][a-zA-Z0-9_$]*\\.)+[a-zA-Z_$][a-zA-Z0-9_$]*)$",
      "description": "Fully-qualified class name of an SDK response transformer, or the NO_TRANSFORMER sentinel."
    },
    "bodyFileRef": {
      "type": "object",
      "description": "Externalised matcher value: the expected value lives in a file under the __files directory. Valid on the top-level request.bodyMatcher only.",
      "properties": {
        "bodyFileName": {
          "type": "string",
          "examples": [
            "requests/expected-order.json"
          ],
          "description": "Name of a file under __files whose content is the matcher's value, in place of an inline value."
        }
      },
      "required": [
        "bodyFileName"
      ],
      "additionalProperties": false,
      "examples": [
        {
          "bodyFileName": "requests/expected-order.json"
        }
      ]
    },
    "contentMatcher": {
      "type": "object",
      "description": "The request.bodyMatcher form: every string-value matcher, with the expected value inline or, for the matchers that offer it, externalised as {\"bodyFileName\": \"<file>\"}, plus binaryEqualTo (byte-for-byte matching of the file content, available at the top level only - not nested inside and/or/not, not on fileNameMatcher). The file form is resolved when the mapping loads and only at this top level - inside and/or/not, and on fileNameMatcher, Traffic Parrot refuses it, which is why those positions use stringValueMatcher.",
      "properties": {
        "equalTo": {
          "description": "Exact string equality.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/bodyFileRef"
            }
          ],
          "examples": [
            "ORD-42"
          ]
        },
        "caseInsensitive": {
          "type": "boolean",
          "description": "Option for equalTo.",
          "examples": [
            true
          ]
        },
        "equalToJson": {
          "description": "Semantic JSON equality. Inline JSON value, a string containing JSON, or a bodyFileName reference object.",
          "type": [
            "string",
            "object",
            "array"
          ],
          "examples": [
            {
              "orderId": 42
            }
          ]
        },
        "ignoreArrayOrder": {
          "type": "boolean",
          "description": "Option for equalToJson / matchesJson.",
          "examples": [
            true
          ]
        },
        "ignoreExtraElements": {
          "type": "boolean",
          "description": "Option for equalToJson / matchesJson.",
          "examples": [
            true
          ]
        },
        "treatNullAsAbsent": {
          "type": "boolean",
          "description": "Option for equalToJson.",
          "examples": [
            true
          ]
        },
        "matchesJsonSchema": {
          "description": "Value must validate against the given JSON Schema (inline object, string, or bodyFileName reference object).",
          "type": [
            "string",
            "object"
          ],
          "examples": [
            {
              "type": "object",
              "required": [
                "orderId"
              ]
            }
          ]
        },
        "schemaVersion": {
          "type": "string",
          "enum": [
            "V4",
            "V6",
            "V7",
            "V201909",
            "V202012"
          ],
          "description": "Option for matchesJsonSchema (default V202012).",
          "examples": [
            "V202012"
          ]
        },
        "equalToXml": {
          "description": "Semantic XML equality.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/bodyFileRef"
            }
          ],
          "examples": [
            "<order><id>42</id></order>"
          ]
        },
        "enablePlaceholders": {
          "type": "boolean",
          "description": "Option for equalToXml.",
          "examples": [
            true
          ]
        },
        "placeholderOpeningDelimiterRegex": {
          "type": "string",
          "description": "Option for equalToXml.",
          "examples": [
            "\\[\\["
          ]
        },
        "placeholderClosingDelimiterRegex": {
          "type": "string",
          "description": "Option for equalToXml.",
          "examples": [
            "\\]\\]"
          ]
        },
        "exemptedComparisons": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Option for equalToXml: XMLUnit ComparisonType names to exempt, in upper case as listed. Checked only beside equalToXml, the matcher that reads it.",
          "examples": [
            [
              "NAMESPACE_URI",
              "SCHEMA_LOCATION"
            ]
          ]
        },
        "ignoreOrderOfSameNode": {
          "type": "boolean",
          "description": "Option for equalToXml.",
          "examples": [
            true
          ]
        },
        "namespaceAwareness": {
          "type": "string",
          "enum": [
            "STRICT",
            "LEGACY",
            "NONE"
          ],
          "description": "Option for equalToXml.",
          "examples": [
            "NONE"
          ]
        },
        "matchesJsonPath": {
          "description": "JSONPath expression match: a string expression, an advanced {\"expression\": ..., <sub-matcher>} object, or a bodyFileName reference object.",
          "type": [
            "string",
            "object"
          ],
          "examples": [
            "$.orderId",
            {
              "expression": "$.status",
              "equalTo": "accepted"
            }
          ]
        },
        "matchesXPath": {
          "description": "XPath expression match: a string expression, an advanced {\"expression\": ..., <sub-matcher>} object, or a bodyFileName reference object.",
          "type": [
            "string",
            "object"
          ],
          "examples": [
            "/order/id",
            {
              "expression": "/order/status/text()",
              "equalTo": "accepted"
            }
          ]
        },
        "xPathNamespaces": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Option for matchesXPath: prefix to namespace URI.",
          "examples": [
            {
              "ord": "http://example.com/orders"
            }
          ]
        },
        "contains": {
          "description": "Substring match.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/bodyFileRef"
            }
          ],
          "examples": [
            "orderId"
          ]
        },
        "doesNotContain": {
          "description": "Negative substring match.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/bodyFileRef"
            }
          ],
          "examples": [
            "error"
          ]
        },
        "matches": {
          "description": "Regex match.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/bodyFileRef"
            }
          ],
          "examples": [
            "ORD-[0-9]+"
          ]
        },
        "doesNotMatch": {
          "description": "Negative regex match.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/bodyFileRef"
            }
          ],
          "examples": [
            ".*test.*"
          ]
        },
        "before": {
          "type": "string",
          "description": "Date-time before the given ISO-8601 instant or now-offset expression.",
          "examples": [
            "now +1 days"
          ]
        },
        "after": {
          "type": "string",
          "description": "Date-time after the given ISO-8601 instant or now-offset expression.",
          "examples": [
            "2026-01-01T00:00:00Z"
          ]
        },
        "equalToDateTime": {
          "type": "string",
          "description": "Date-time equality with the given ISO-8601 instant or now-offset expression.",
          "examples": [
            "now"
          ]
        },
        "actualFormat": {
          "type": "string",
          "description": "Option for before / after / equalToDateTime: format of the actual value.",
          "examples": [
            "dd/MM/yyyy"
          ]
        },
        "truncateExpected": {
          "type": "string",
          "description": "Option for before / after / equalToDateTime: truncate the expected date-time to this point before comparing. One of the examples, in any case, with a space or an underscore between words. Checked only beside before, after or equalToDateTime, the matchers that read it.",
          "examples": [
            "first second of minute",
            "first minute of hour",
            "first hour of day",
            "first day of month",
            "first day of next month",
            "last day of month",
            "first day of year",
            "first day of next year",
            "last day of year"
          ]
        },
        "truncateActual": {
          "type": "string",
          "description": "Option for before / after / equalToDateTime: truncate the actual date-time to this point before comparing. One of the examples, in any case, with a space or an underscore between words. Checked only beside before, after or equalToDateTime, the matchers that read it.",
          "examples": [
            "first second of minute",
            "first minute of hour",
            "first hour of day",
            "first day of month",
            "first day of next month",
            "last day of month",
            "first day of year",
            "first day of next year",
            "last day of year"
          ]
        },
        "applyTruncationLast": {
          "type": "boolean",
          "description": "Option for before / after / equalToDateTime.",
          "examples": [
            true
          ]
        },
        "expectedOffset": {
          "type": "integer",
          "description": "Option for before / after / equalToDateTime.",
          "examples": [
            1
          ]
        },
        "expectedOffsetUnit": {
          "type": "string",
          "description": "Option for before / after / equalToDateTime: the unit of expectedOffset. One of the examples, in any case.",
          "examples": [
            "SECONDS",
            "MINUTES",
            "HOURS",
            "DAYS",
            "MONTHS",
            "YEARS"
          ],
          "pattern": "^(?:[Ss][Ee][Cc][Oo][Nn][Dd][Ss]|[Mm][Ii][Nn][Uu][Tt][Ee][Ss]|[Hh][Oo][Uu][Rr][Ss]|[Dd][Aa][Yy][Ss]|[Mm][Oo][Nn][Tt][Hh][Ss]|[Yy][Ee][Aa][Rr][Ss])$"
        },
        "anything": {
          "type": "string",
          "description": "Matches any value. The operand string is ignored.",
          "examples": [
            "anything"
          ]
        },
        "absent": {
          "description": "The element must be absent. Canonically written as true; the operand value is ignored.",
          "examples": [
            true
          ]
        },
        "and": {
          "type": "array",
          "minItems": 2,
          "items": {
            "$ref": "#/definitions/stringValueMatcher"
          },
          "description": "All nested matchers must match. Nested matchers take inline values only.",
          "examples": [
            [
              {
                "contains": "order"
              },
              {
                "doesNotContain": "test"
              }
            ]
          ]
        },
        "or": {
          "type": "array",
          "minItems": 2,
          "items": {
            "$ref": "#/definitions/stringValueMatcher"
          },
          "description": "At least one nested matcher must match. Nested matchers take inline values only.",
          "examples": [
            [
              {
                "equalTo": "GB"
              },
              {
                "equalTo": "IE"
              }
            ]
          ]
        },
        "not": {
          "$ref": "#/definitions/stringValueMatcher",
          "description": "The nested matcher must not match. Nested matchers take inline values only.",
          "examples": [
            {
              "contains": "test"
            }
          ]
        },
        "matchesPathTemplate": {
          "type": "string",
          "description": "RFC 6570 path template match (string-value sub-matcher form).",
          "examples": [
            "/orders/{orderId}"
          ]
        },
        "matchesXml": {
          "description": "Traffic Parrot: XML match where element/attribute values may be regular expressions.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/bodyFileRef"
            }
          ],
          "examples": [
            "<order><id>42</id></order>"
          ]
        },
        "matchesJson": {
          "description": "Traffic Parrot: JSON match where values may be regular expressions. Inline JSON value, a string containing JSON, or a bodyFileName reference object.",
          "type": [
            "string",
            "object",
            "array"
          ],
          "examples": [
            {
              "orderId": 42
            }
          ]
        },
        "matchesGraphQL": {
          "description": "Traffic Parrot: GraphQL query match. A query string, an {\"operationName\": ..., \"variables\": ...} object, or a bodyFileName reference object.",
          "type": [
            "string",
            "object"
          ],
          "examples": [
            "{ order(id: 42) { status } }",
            {
              "operationName": "GetOrder",
              "variables": {
                "id": 42
              }
            }
          ]
        },
        "matchesSwiftField": {
          "description": "Traffic Parrot: match one field of a SWIFT MT message.",
          "type": "object",
          "properties": {
            "field": {
              "type": "string",
              "examples": [
                "20"
              ],
              "description": "SWIFT MT field tag to read, for example 20 (transaction reference)."
            },
            "matches": {
              "type": "string",
              "examples": [
                "REF[0-9]+"
              ],
              "description": "Regular expression the field's value must match."
            },
            "bodyFileName": {
              "type": "string",
              "examples": [
                "requests/mt103-match.json"
              ],
              "description": "Name of a file under __files that holds this matcher's value, in place of an inline one. Use it alone."
            }
          },
          "anyOf": [
            {
              "required": [
                "field",
                "matches"
              ],
              "not": {
                "required": [
                  "bodyFileName"
                ]
              }
            },
            {
              "required": [
                "bodyFileName"
              ],
              "maxProperties": 1
            }
          ],
          "additionalProperties": false,
          "examples": [
            {
              "field": "20",
              "matches": "REF[0-9]+"
            }
          ]
        },
        "matchesFixField": {
          "description": "Traffic Parrot: match one field of a FIX message.",
          "type": "object",
          "properties": {
            "field": {
              "type": "string",
              "examples": [
                "35"
              ],
              "description": "FIX tag number to read, for example 35 (MsgType)."
            },
            "matches": {
              "type": "string",
              "examples": [
                "D"
              ],
              "description": "Regular expression the tag's value must match."
            },
            "bodyFileName": {
              "type": "string",
              "examples": [
                "requests/fix-order-match.json"
              ],
              "description": "Name of a file under __files that holds this matcher's value, in place of an inline one. Use it alone."
            }
          },
          "anyOf": [
            {
              "required": [
                "field",
                "matches"
              ],
              "not": {
                "required": [
                  "bodyFileName"
                ]
              }
            },
            {
              "required": [
                "bodyFileName"
              ],
              "maxProperties": 1
            }
          ],
          "additionalProperties": false,
          "examples": [
            {
              "field": "35",
              "matches": "D"
            }
          ]
        },
        "matchesCicsField": {
          "description": "Traffic Parrot: match one field of a CICS bridge request (IBM MQ, MQFMT_CICS) by its path in the request's JSON view (MQCIH.TransactionId, ProgramName, COMMAREA.ACCOUNT-NO, COMMAREA.TXN-ENTRY[0].TXN-AMOUNT with 0-based indices), with exactly one of equalTo, matches (a whole-value regular expression), greaterThan, greaterThanOrEqualTo, lessThan or lessThanOrEqualTo. Numbers compare as numbers.",
          "type": "object",
          "properties": {
            "field": {
              "type": "string",
              "examples": [
                "COMMAREA.ACCOUNT-NO"
              ],
              "description": "Path from the root of the request view, names exactly as written: ProgramName, COMMAREA.<copybook field>, MQCIH.<header field> or MQMD.UserIdentifier. A [n] after a name is a 0-based table index, as in COMMAREA.TXN-ENTRY[1].TXN-AMOUNT."
            },
            "equalTo": {
              "type": [
                "string",
                "number"
              ],
              "examples": [
                "1234567890"
              ],
              "description": "The field's value equals this."
            },
            "matches": {
              "type": "string",
              "examples": [
                "[0-9]{10}"
              ],
              "description": "Regular expression the field's value must match."
            },
            "greaterThan": {
              "type": [
                "string",
                "number"
              ],
              "examples": [
                100
              ],
              "description": "The field's numeric value is greater than this."
            },
            "greaterThanOrEqualTo": {
              "type": [
                "string",
                "number"
              ],
              "examples": [
                100
              ],
              "description": "The field's numeric value is greater than or equal to this."
            },
            "lessThan": {
              "type": [
                "string",
                "number"
              ],
              "examples": [
                1000
              ],
              "description": "The field's numeric value is less than this."
            },
            "lessThanOrEqualTo": {
              "type": [
                "string",
                "number"
              ],
              "examples": [
                1000
              ],
              "description": "The field's numeric value is less than or equal to this."
            },
            "bodyFileName": {
              "type": "string",
              "examples": [
                "requests/cics-account-match.json"
              ],
              "description": "Name of a file under __files that holds this matcher's value, in place of an inline one. Use it alone."
            }
          },
          "anyOf": [
            {
              "required": [
                "field"
              ],
              "oneOf": [
                {
                  "required": [
                    "equalTo"
                  ]
                },
                {
                  "required": [
                    "matches"
                  ]
                },
                {
                  "required": [
                    "greaterThan"
                  ]
                },
                {
                  "required": [
                    "greaterThanOrEqualTo"
                  ]
                },
                {
                  "required": [
                    "lessThan"
                  ]
                },
                {
                  "required": [
                    "lessThanOrEqualTo"
                  ]
                }
              ],
              "not": {
                "required": [
                  "bodyFileName"
                ]
              }
            },
            {
              "required": [
                "bodyFileName"
              ],
              "maxProperties": 1
            }
          ],
          "additionalProperties": false,
          "examples": [
            {
              "field": "COMMAREA.ACCOUNT-NO",
              "equalTo": "1234567890"
            }
          ]
        },
        "binaryEqualTo": {
          "type": "string",
          "description": "Byte-for-byte equality of the file content with the Base64-decoded value: the way to match a file that is not text on its content (recording a non-UTF-8 request file writes one beside the file-name matcher). Valid as the top-level bodyMatcher only, and inline only: a {\"bodyFileName\": ...} reference on it is refused when the mapping loads, so the schema does not offer the file form here.",
          "$comment": "Byte-for-byte equality of the file content with the Base64-decoded operand: the way to match a file that is not text on its content (recording a non-UTF-8 request file writes one beside the file-name matcher). Valid as the top-level bodyMatcher only, and inline only: a {\"bodyFileName\": ...} reference on it is refused when the mapping loads (the fork's StringValuePatternJsonDeserializer.buildResolved has no binaryEqualTo arm), so the schema does not offer the file form here.",
          "examples": [
            "SGVsbG8="
          ]
        }
      },
      "additionalProperties": false,
      "anyOf": [
        {
          "required": [
            "equalTo"
          ]
        },
        {
          "required": [
            "equalToJson"
          ]
        },
        {
          "required": [
            "matchesJsonSchema"
          ]
        },
        {
          "required": [
            "equalToXml"
          ]
        },
        {
          "required": [
            "matchesJsonPath"
          ]
        },
        {
          "required": [
            "matchesXPath"
          ]
        },
        {
          "required": [
            "contains"
          ]
        },
        {
          "required": [
            "doesNotContain"
          ]
        },
        {
          "required": [
            "matches"
          ]
        },
        {
          "required": [
            "doesNotMatch"
          ]
        },
        {
          "required": [
            "before"
          ]
        },
        {
          "required": [
            "after"
          ]
        },
        {
          "required": [
            "equalToDateTime"
          ]
        },
        {
          "required": [
            "anything"
          ]
        },
        {
          "required": [
            "absent"
          ]
        },
        {
          "required": [
            "and"
          ]
        },
        {
          "required": [
            "or"
          ]
        },
        {
          "required": [
            "not"
          ]
        },
        {
          "required": [
            "matchesPathTemplate"
          ]
        },
        {
          "required": [
            "matchesXml"
          ]
        },
        {
          "required": [
            "matchesJson"
          ]
        },
        {
          "required": [
            "matchesGraphQL"
          ]
        },
        {
          "required": [
            "matchesSwiftField"
          ]
        },
        {
          "required": [
            "matchesFixField"
          ]
        },
        {
          "required": [
            "matchesCicsField"
          ]
        },
        {
          "required": [
            "binaryEqualTo"
          ]
        }
      ],
      "allOf": [
        {
          "if": {
            "anyOf": [
              {
                "required": [
                  "before"
                ]
              },
              {
                "required": [
                  "after"
                ]
              },
              {
                "required": [
                  "equalToDateTime"
                ]
              }
            ]
          },
          "then": {
            "properties": {
              "truncateExpected": {
                "pattern": "^(?:[Ff][Ii][Rr][Ss][Tt][ _][Ss][Ee][Cc][Oo][Nn][Dd][ _][Oo][Ff][ _][Mm][Ii][Nn][Uu][Tt][Ee]|[Ff][Ii][Rr][Ss][Tt][ _][Mm][Ii][Nn][Uu][Tt][Ee][ _][Oo][Ff][ _][Hh][Oo][Uu][Rr]|[Ff][Ii][Rr][Ss][Tt][ _][Hh][Oo][Uu][Rr][ _][Oo][Ff][ _][Dd][Aa][Yy]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Mm][Oo][Nn][Tt][Hh]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Nn][Ee][Xx][Tt][ _][Mm][Oo][Nn][Tt][Hh]|[Ll][Aa][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Mm][Oo][Nn][Tt][Hh]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Yy][Ee][Aa][Rr]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Nn][Ee][Xx][Tt][ _][Yy][Ee][Aa][Rr]|[Ll][Aa][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Yy][Ee][Aa][Rr])$"
              },
              "truncateActual": {
                "pattern": "^(?:[Ff][Ii][Rr][Ss][Tt][ _][Ss][Ee][Cc][Oo][Nn][Dd][ _][Oo][Ff][ _][Mm][Ii][Nn][Uu][Tt][Ee]|[Ff][Ii][Rr][Ss][Tt][ _][Mm][Ii][Nn][Uu][Tt][Ee][ _][Oo][Ff][ _][Hh][Oo][Uu][Rr]|[Ff][Ii][Rr][Ss][Tt][ _][Hh][Oo][Uu][Rr][ _][Oo][Ff][ _][Dd][Aa][Yy]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Mm][Oo][Nn][Tt][Hh]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Nn][Ee][Xx][Tt][ _][Mm][Oo][Nn][Tt][Hh]|[Ll][Aa][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Mm][Oo][Nn][Tt][Hh]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Yy][Ee][Aa][Rr]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Nn][Ee][Xx][Tt][ _][Yy][Ee][Aa][Rr]|[Ll][Aa][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Yy][Ee][Aa][Rr])$"
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "equalToXml"
            ]
          },
          "then": {
            "properties": {
              "exemptedComparisons": {
                "items": {
                  "enum": [
                    "XML_VERSION",
                    "XML_STANDALONE",
                    "XML_ENCODING",
                    "HAS_DOCTYPE_DECLARATION",
                    "DOCTYPE_NAME",
                    "DOCTYPE_PUBLIC_ID",
                    "DOCTYPE_SYSTEM_ID",
                    "SCHEMA_LOCATION",
                    "NO_NAMESPACE_SCHEMA_LOCATION",
                    "NODE_TYPE",
                    "NAMESPACE_PREFIX",
                    "NAMESPACE_URI",
                    "TEXT_VALUE",
                    "PROCESSING_INSTRUCTION_TARGET",
                    "PROCESSING_INSTRUCTION_DATA",
                    "ELEMENT_TAG_NAME",
                    "ATTR_VALUE_EXPLICITLY_SPECIFIED",
                    "ELEMENT_NUM_ATTRIBUTES",
                    "ATTR_VALUE",
                    "CHILD_NODELIST_LENGTH",
                    "CHILD_NODELIST_SEQUENCE",
                    "CHILD_LOOKUP",
                    "ATTR_NAME_LOOKUP"
                  ]
                }
              }
            }
          }
        }
      ]
    },
    "stringValueMatcher": {
      "type": "object",
      "description": "A single string-value matcher: exactly one primary matcher key plus that matcher's option keys, with the expected value inline - the form for fileNameMatcher and for matchers nested inside and/or/not (no binaryEqualTo: a file name is text, and the operands of and/or/not are string-value matchers). In these positions Traffic Parrot refuses a bodyFileName reference when the mapping loads; only the top-level bodyMatcher (contentMatcher) offers the file form. The unrelated response.bodyFileName field reads from __files.",
      "properties": {
        "equalTo": {
          "type": "string",
          "description": "Exact string equality.",
          "examples": [
            "ORD-42"
          ]
        },
        "caseInsensitive": {
          "type": "boolean",
          "description": "Option for equalTo.",
          "examples": [
            true
          ]
        },
        "equalToJson": {
          "description": "Semantic JSON equality. Inline JSON value or a string containing JSON.",
          "type": [
            "string",
            "object",
            "array"
          ],
          "examples": [
            {
              "orderId": 42
            }
          ]
        },
        "ignoreArrayOrder": {
          "type": "boolean",
          "description": "Option for equalToJson / matchesJson.",
          "examples": [
            true
          ]
        },
        "ignoreExtraElements": {
          "type": "boolean",
          "description": "Option for equalToJson / matchesJson.",
          "examples": [
            true
          ]
        },
        "treatNullAsAbsent": {
          "type": "boolean",
          "description": "Option for equalToJson.",
          "examples": [
            true
          ]
        },
        "matchesJsonSchema": {
          "description": "Value must validate against the given JSON Schema (inline object or string).",
          "type": [
            "string",
            "object"
          ],
          "examples": [
            {
              "type": "object",
              "required": [
                "orderId"
              ]
            }
          ]
        },
        "schemaVersion": {
          "type": "string",
          "enum": [
            "V4",
            "V6",
            "V7",
            "V201909",
            "V202012"
          ],
          "description": "Option for matchesJsonSchema (default V202012).",
          "examples": [
            "V202012"
          ]
        },
        "equalToXml": {
          "type": "string",
          "description": "Semantic XML equality.",
          "examples": [
            "<order><id>42</id></order>"
          ]
        },
        "enablePlaceholders": {
          "type": "boolean",
          "description": "Option for equalToXml.",
          "examples": [
            true
          ]
        },
        "placeholderOpeningDelimiterRegex": {
          "type": "string",
          "description": "Option for equalToXml.",
          "examples": [
            "\\[\\["
          ]
        },
        "placeholderClosingDelimiterRegex": {
          "type": "string",
          "description": "Option for equalToXml.",
          "examples": [
            "\\]\\]"
          ]
        },
        "exemptedComparisons": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Option for equalToXml: XMLUnit ComparisonType names to exempt, in upper case as listed. Checked only beside equalToXml, the matcher that reads it.",
          "examples": [
            [
              "NAMESPACE_URI",
              "SCHEMA_LOCATION"
            ]
          ]
        },
        "ignoreOrderOfSameNode": {
          "type": "boolean",
          "description": "Option for equalToXml.",
          "examples": [
            true
          ]
        },
        "namespaceAwareness": {
          "type": "string",
          "enum": [
            "STRICT",
            "LEGACY",
            "NONE"
          ],
          "description": "Option for equalToXml.",
          "examples": [
            "NONE"
          ]
        },
        "matchesJsonPath": {
          "description": "JSONPath expression match: a string expression or an advanced {\"expression\": ..., <sub-matcher>} object.",
          "type": [
            "string",
            "object"
          ],
          "examples": [
            "$.orderId",
            {
              "expression": "$.status",
              "equalTo": "accepted"
            }
          ]
        },
        "matchesXPath": {
          "description": "XPath expression match: a string expression or an advanced {\"expression\": ..., <sub-matcher>} object.",
          "type": [
            "string",
            "object"
          ],
          "examples": [
            "/order/id",
            {
              "expression": "/order/status/text()",
              "equalTo": "accepted"
            }
          ]
        },
        "xPathNamespaces": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Option for matchesXPath: prefix to namespace URI.",
          "examples": [
            {
              "ord": "http://example.com/orders"
            }
          ]
        },
        "contains": {
          "type": "string",
          "description": "Substring match.",
          "examples": [
            "orderId"
          ]
        },
        "doesNotContain": {
          "type": "string",
          "description": "Negative substring match.",
          "examples": [
            "error"
          ]
        },
        "matches": {
          "type": "string",
          "description": "Regex match.",
          "examples": [
            "ORD-[0-9]+"
          ]
        },
        "doesNotMatch": {
          "type": "string",
          "description": "Negative regex match.",
          "examples": [
            ".*test.*"
          ]
        },
        "before": {
          "type": "string",
          "description": "Date-time before the given ISO-8601 instant or now-offset expression.",
          "examples": [
            "now +1 days"
          ]
        },
        "after": {
          "type": "string",
          "description": "Date-time after the given ISO-8601 instant or now-offset expression.",
          "examples": [
            "2026-01-01T00:00:00Z"
          ]
        },
        "equalToDateTime": {
          "type": "string",
          "description": "Date-time equality with the given ISO-8601 instant or now-offset expression.",
          "examples": [
            "now"
          ]
        },
        "actualFormat": {
          "type": "string",
          "description": "Option for before / after / equalToDateTime: format of the actual value.",
          "examples": [
            "dd/MM/yyyy"
          ]
        },
        "truncateExpected": {
          "type": "string",
          "description": "Option for before / after / equalToDateTime: truncate the expected date-time to this point before comparing. One of the examples, in any case, with a space or an underscore between words. Checked only beside before, after or equalToDateTime, the matchers that read it.",
          "examples": [
            "first second of minute",
            "first minute of hour",
            "first hour of day",
            "first day of month",
            "first day of next month",
            "last day of month",
            "first day of year",
            "first day of next year",
            "last day of year"
          ]
        },
        "truncateActual": {
          "type": "string",
          "description": "Option for before / after / equalToDateTime: truncate the actual date-time to this point before comparing. One of the examples, in any case, with a space or an underscore between words. Checked only beside before, after or equalToDateTime, the matchers that read it.",
          "examples": [
            "first second of minute",
            "first minute of hour",
            "first hour of day",
            "first day of month",
            "first day of next month",
            "last day of month",
            "first day of year",
            "first day of next year",
            "last day of year"
          ]
        },
        "applyTruncationLast": {
          "type": "boolean",
          "description": "Option for before / after / equalToDateTime.",
          "examples": [
            true
          ]
        },
        "expectedOffset": {
          "type": "integer",
          "description": "Option for before / after / equalToDateTime.",
          "examples": [
            1
          ]
        },
        "expectedOffsetUnit": {
          "type": "string",
          "description": "Option for before / after / equalToDateTime: the unit of expectedOffset. One of the examples, in any case.",
          "examples": [
            "SECONDS",
            "MINUTES",
            "HOURS",
            "DAYS",
            "MONTHS",
            "YEARS"
          ],
          "pattern": "^(?:[Ss][Ee][Cc][Oo][Nn][Dd][Ss]|[Mm][Ii][Nn][Uu][Tt][Ee][Ss]|[Hh][Oo][Uu][Rr][Ss]|[Dd][Aa][Yy][Ss]|[Mm][Oo][Nn][Tt][Hh][Ss]|[Yy][Ee][Aa][Rr][Ss])$"
        },
        "anything": {
          "type": "string",
          "description": "Matches any value. The operand string is ignored.",
          "examples": [
            "anything"
          ]
        },
        "absent": {
          "description": "The element must be absent. Canonically written as true; the operand value is ignored.",
          "examples": [
            true
          ]
        },
        "and": {
          "type": "array",
          "minItems": 2,
          "items": {
            "$ref": "#/definitions/stringValueMatcher"
          },
          "description": "All nested matchers must match. Nested matchers take inline values only.",
          "examples": [
            [
              {
                "contains": "order"
              },
              {
                "doesNotContain": "test"
              }
            ]
          ]
        },
        "or": {
          "type": "array",
          "minItems": 2,
          "items": {
            "$ref": "#/definitions/stringValueMatcher"
          },
          "description": "At least one nested matcher must match. Nested matchers take inline values only.",
          "examples": [
            [
              {
                "equalTo": "GB"
              },
              {
                "equalTo": "IE"
              }
            ]
          ]
        },
        "not": {
          "$ref": "#/definitions/stringValueMatcher",
          "description": "The nested matcher must not match. Nested matchers take inline values only.",
          "examples": [
            {
              "contains": "test"
            }
          ]
        },
        "matchesPathTemplate": {
          "type": "string",
          "description": "RFC 6570 path template match (string-value sub-matcher form).",
          "examples": [
            "/orders/{orderId}"
          ]
        },
        "matchesXml": {
          "type": "string",
          "description": "Traffic Parrot: XML match where element/attribute values may be regular expressions.",
          "examples": [
            "<order><id>42</id></order>"
          ]
        },
        "matchesJson": {
          "description": "Traffic Parrot: JSON match where values may be regular expressions. Inline JSON value or a string containing JSON.",
          "type": [
            "string",
            "object",
            "array"
          ],
          "examples": [
            {
              "orderId": 42
            }
          ]
        },
        "matchesGraphQL": {
          "description": "Traffic Parrot: GraphQL query match. A query string or an {\"operationName\": ..., \"variables\": ...} object.",
          "type": [
            "string",
            "object"
          ],
          "examples": [
            "{ order(id: 42) { status } }",
            {
              "operationName": "GetOrder",
              "variables": {
                "id": 42
              }
            }
          ]
        },
        "matchesSwiftField": {
          "description": "Traffic Parrot: match one field of a SWIFT MT message.",
          "type": "object",
          "properties": {
            "field": {
              "type": "string",
              "examples": [
                "20"
              ],
              "description": "SWIFT MT field tag to read, for example 20 (transaction reference)."
            },
            "matches": {
              "type": "string",
              "examples": [
                "REF[0-9]+"
              ],
              "description": "Regular expression the field's value must match."
            }
          },
          "required": [
            "field",
            "matches"
          ],
          "additionalProperties": false,
          "examples": [
            {
              "field": "20",
              "matches": "REF[0-9]+"
            }
          ]
        },
        "matchesFixField": {
          "description": "Traffic Parrot: match one field of a FIX message.",
          "type": "object",
          "properties": {
            "field": {
              "type": "string",
              "examples": [
                "35"
              ],
              "description": "FIX tag number to read, for example 35 (MsgType)."
            },
            "matches": {
              "type": "string",
              "examples": [
                "D"
              ],
              "description": "Regular expression the tag's value must match."
            }
          },
          "required": [
            "field",
            "matches"
          ],
          "additionalProperties": false,
          "examples": [
            {
              "field": "35",
              "matches": "D"
            }
          ]
        },
        "matchesCicsField": {
          "description": "Traffic Parrot: match one field of a CICS bridge request (IBM MQ, MQFMT_CICS) by its path in the request's JSON view (MQCIH.TransactionId, ProgramName, COMMAREA.ACCOUNT-NO, COMMAREA.TXN-ENTRY[0].TXN-AMOUNT with 0-based indices), with exactly one of equalTo, matches (a whole-value regular expression), greaterThan, greaterThanOrEqualTo, lessThan or lessThanOrEqualTo. Numbers compare as numbers.",
          "type": "object",
          "properties": {
            "field": {
              "type": "string",
              "examples": [
                "COMMAREA.ACCOUNT-NO"
              ],
              "description": "Path from the root of the request view, names exactly as written: ProgramName, COMMAREA.<copybook field>, MQCIH.<header field> or MQMD.UserIdentifier. A [n] after a name is a 0-based table index, as in COMMAREA.TXN-ENTRY[1].TXN-AMOUNT."
            },
            "equalTo": {
              "type": [
                "string",
                "number"
              ],
              "examples": [
                "1234567890"
              ],
              "description": "The field's value equals this."
            },
            "matches": {
              "type": "string",
              "examples": [
                "[0-9]{10}"
              ],
              "description": "Regular expression the field's value must match."
            },
            "greaterThan": {
              "type": [
                "string",
                "number"
              ],
              "examples": [
                100
              ],
              "description": "The field's numeric value is greater than this."
            },
            "greaterThanOrEqualTo": {
              "type": [
                "string",
                "number"
              ],
              "examples": [
                100
              ],
              "description": "The field's numeric value is greater than or equal to this."
            },
            "lessThan": {
              "type": [
                "string",
                "number"
              ],
              "examples": [
                1000
              ],
              "description": "The field's numeric value is less than this."
            },
            "lessThanOrEqualTo": {
              "type": [
                "string",
                "number"
              ],
              "examples": [
                1000
              ],
              "description": "The field's numeric value is less than or equal to this."
            }
          },
          "required": [
            "field"
          ],
          "oneOf": [
            {
              "required": [
                "equalTo"
              ]
            },
            {
              "required": [
                "matches"
              ]
            },
            {
              "required": [
                "greaterThan"
              ]
            },
            {
              "required": [
                "greaterThanOrEqualTo"
              ]
            },
            {
              "required": [
                "lessThan"
              ]
            },
            {
              "required": [
                "lessThanOrEqualTo"
              ]
            }
          ],
          "additionalProperties": false,
          "examples": [
            {
              "field": "COMMAREA.ACCOUNT-NO",
              "equalTo": "1234567890"
            }
          ]
        }
      },
      "additionalProperties": false,
      "anyOf": [
        {
          "required": [
            "equalTo"
          ]
        },
        {
          "required": [
            "equalToJson"
          ]
        },
        {
          "required": [
            "matchesJsonSchema"
          ]
        },
        {
          "required": [
            "equalToXml"
          ]
        },
        {
          "required": [
            "matchesJsonPath"
          ]
        },
        {
          "required": [
            "matchesXPath"
          ]
        },
        {
          "required": [
            "contains"
          ]
        },
        {
          "required": [
            "doesNotContain"
          ]
        },
        {
          "required": [
            "matches"
          ]
        },
        {
          "required": [
            "doesNotMatch"
          ]
        },
        {
          "required": [
            "before"
          ]
        },
        {
          "required": [
            "after"
          ]
        },
        {
          "required": [
            "equalToDateTime"
          ]
        },
        {
          "required": [
            "anything"
          ]
        },
        {
          "required": [
            "absent"
          ]
        },
        {
          "required": [
            "and"
          ]
        },
        {
          "required": [
            "or"
          ]
        },
        {
          "required": [
            "not"
          ]
        },
        {
          "required": [
            "matchesPathTemplate"
          ]
        },
        {
          "required": [
            "matchesXml"
          ]
        },
        {
          "required": [
            "matchesJson"
          ]
        },
        {
          "required": [
            "matchesGraphQL"
          ]
        },
        {
          "required": [
            "matchesSwiftField"
          ]
        },
        {
          "required": [
            "matchesFixField"
          ]
        },
        {
          "required": [
            "matchesCicsField"
          ]
        }
      ],
      "allOf": [
        {
          "if": {
            "anyOf": [
              {
                "required": [
                  "before"
                ]
              },
              {
                "required": [
                  "after"
                ]
              },
              {
                "required": [
                  "equalToDateTime"
                ]
              }
            ]
          },
          "then": {
            "properties": {
              "truncateExpected": {
                "pattern": "^(?:[Ff][Ii][Rr][Ss][Tt][ _][Ss][Ee][Cc][Oo][Nn][Dd][ _][Oo][Ff][ _][Mm][Ii][Nn][Uu][Tt][Ee]|[Ff][Ii][Rr][Ss][Tt][ _][Mm][Ii][Nn][Uu][Tt][Ee][ _][Oo][Ff][ _][Hh][Oo][Uu][Rr]|[Ff][Ii][Rr][Ss][Tt][ _][Hh][Oo][Uu][Rr][ _][Oo][Ff][ _][Dd][Aa][Yy]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Mm][Oo][Nn][Tt][Hh]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Nn][Ee][Xx][Tt][ _][Mm][Oo][Nn][Tt][Hh]|[Ll][Aa][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Mm][Oo][Nn][Tt][Hh]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Yy][Ee][Aa][Rr]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Nn][Ee][Xx][Tt][ _][Yy][Ee][Aa][Rr]|[Ll][Aa][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Yy][Ee][Aa][Rr])$"
              },
              "truncateActual": {
                "pattern": "^(?:[Ff][Ii][Rr][Ss][Tt][ _][Ss][Ee][Cc][Oo][Nn][Dd][ _][Oo][Ff][ _][Mm][Ii][Nn][Uu][Tt][Ee]|[Ff][Ii][Rr][Ss][Tt][ _][Mm][Ii][Nn][Uu][Tt][Ee][ _][Oo][Ff][ _][Hh][Oo][Uu][Rr]|[Ff][Ii][Rr][Ss][Tt][ _][Hh][Oo][Uu][Rr][ _][Oo][Ff][ _][Dd][Aa][Yy]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Mm][Oo][Nn][Tt][Hh]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Nn][Ee][Xx][Tt][ _][Mm][Oo][Nn][Tt][Hh]|[Ll][Aa][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Mm][Oo][Nn][Tt][Hh]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Yy][Ee][Aa][Rr]|[Ff][Ii][Rr][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Nn][Ee][Xx][Tt][ _][Yy][Ee][Aa][Rr]|[Ll][Aa][Ss][Tt][ _][Dd][Aa][Yy][ _][Oo][Ff][ _][Yy][Ee][Aa][Rr])$"
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "equalToXml"
            ]
          },
          "then": {
            "properties": {
              "exemptedComparisons": {
                "items": {
                  "enum": [
                    "XML_VERSION",
                    "XML_STANDALONE",
                    "XML_ENCODING",
                    "HAS_DOCTYPE_DECLARATION",
                    "DOCTYPE_NAME",
                    "DOCTYPE_PUBLIC_ID",
                    "DOCTYPE_SYSTEM_ID",
                    "SCHEMA_LOCATION",
                    "NO_NAMESPACE_SCHEMA_LOCATION",
                    "NODE_TYPE",
                    "NAMESPACE_PREFIX",
                    "NAMESPACE_URI",
                    "TEXT_VALUE",
                    "PROCESSING_INSTRUCTION_TARGET",
                    "PROCESSING_INSTRUCTION_DATA",
                    "ELEMENT_TAG_NAME",
                    "ATTR_VALUE_EXPLICITLY_SPECIFIED",
                    "ELEMENT_NUM_ATTRIBUTES",
                    "ATTR_VALUE",
                    "CHILD_NODELIST_LENGTH",
                    "CHILD_NODELIST_SEQUENCE",
                    "CHILD_LOOKUP",
                    "ATTR_NAME_LOOKUP"
                  ]
                }
              }
            }
          }
        }
      ]
    }
  }
}
