{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/atlar/json-schema/atlar-forecasted-transaction-jsonpatch-request-schema.json",
  "title": "ForecastedTransactionJSONPatchRequest",
  "description": "JSON Patch Request.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/atlar-forecasted-transactions-api-openapi.yml#/components/schemas/ForecastedTransactionJSONPatchRequest",
  "type": "array",
  "items": {
    "oneOf": [
      {
        "$ref": "#/$defs/ForecastedTransactionJSONPatchReplaceAmountValue"
      },
      {
        "$ref": "#/$defs/ForecastedTransactionJSONPatchReplaceAmountStringValue"
      },
      {
        "$ref": "#/$defs/ForecastedTransactionJSONPatchReplaceAmount"
      },
      {
        "$ref": "#/$defs/ForecastedTransactionJSONPatchReplaceDescription"
      },
      {
        "$ref": "#/$defs/ForecastedTransactionJSONPatchReplaceDate"
      },
      {
        "$ref": "#/$defs/ForecastedTransactionJSONPatchReplaceMetadataKey"
      },
      {
        "$ref": "#/$defs/ForecastedTransactionJSONPatchRemoveMetadataKey"
      }
    ]
  },
  "$defs": {
    "AmountInput": {
      "oneOf": [
        {
          "$ref": "#/$defs/AmountIntegerValueInput"
        },
        {
          "$ref": "#/$defs/AmountStringValueInput"
        }
      ]
    },
    "AmountIntegerValueInput": {
      "type": "object",
      "properties": {
        "currency": {
          "$ref": "#/$defs/CurrencyCode"
        },
        "value": {
          "description": "The amount value as an integer (int64) represented in currency minor units (e.g. 15.02 EUR is represented as the value 1502).",
          "type": "integer",
          "format": "int64"
        }
      },
      "required": [
        "currency",
        "value"
      ]
    },
    "AmountStringValueInput": {
      "type": "object",
      "properties": {
        "currency": {
          "$ref": "#/$defs/CurrencyCode"
        },
        "stringValue": {
          "description": "A string representation of the amount value, which will be a decimal number if the currency has decimals. The number is not formatted for display purposes (e.g. with thousand separator) and always contains the dot `.` character as decimal separator.",
          "type": "string"
        }
      },
      "required": [
        "currency",
        "stringValue"
      ]
    },
    "CurrencyCode": {
      "type": "string",
      "description": "Three-letter ISO 4217 currency code.",
      "minLength": 3,
      "maxLength": 3,
      "pattern": "^[A-Z]{3,3}$"
    },
    "Date": {
      "type": "string",
      "format": "date",
      "description": "`full-date` notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), for example, `2017-07-21`."
    },
    "ForecastedTransactionJSONPatchRemoveMetadataKey": {
      "description": "Remove a specific metadata key.",
      "type": "object",
      "properties": {
        "op": {
          "type": "string",
          "enum": [
            "remove"
          ]
        },
        "path": {
          "type": "string",
          "minLength": 11,
          "maxLength": 74,
          "pattern": "^/metadata/[A-Za-z0-9_\\.\\+\\-]{1,64}$"
        }
      },
      "additionalProperties": false,
      "required": [
        "op",
        "path"
      ]
    },
    "ForecastedTransactionJSONPatchReplaceAmount": {
      "description": "Change the amount and currency together, atomically.",
      "type": "object",
      "properties": {
        "op": {
          "type": "string",
          "enum": [
            "replace"
          ]
        },
        "path": {
          "type": "string",
          "enum": [
            "/amount"
          ]
        },
        "value": {
          "$ref": "#/$defs/AmountInput"
        }
      },
      "additionalProperties": false,
      "required": [
        "op",
        "path",
        "value"
      ]
    },
    "ForecastedTransactionJSONPatchReplaceAmountStringValue": {
      "description": "Change the amount.",
      "type": "object",
      "properties": {
        "op": {
          "type": "string",
          "enum": [
            "replace"
          ]
        },
        "path": {
          "type": "string",
          "enum": [
            "/amount/stringValue"
          ]
        },
        "value": {
          "description": "A string representation of the amount value, which will be a decimal number if the currency has decimals. The number is not formatted for display purposes (e.g. with thousand separator) and always contains the dot `.` character as decimal separator.",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "op",
        "path",
        "value"
      ]
    },
    "ForecastedTransactionJSONPatchReplaceAmountValue": {
      "description": "Change the amount.",
      "type": "object",
      "properties": {
        "op": {
          "type": "string",
          "enum": [
            "replace"
          ]
        },
        "path": {
          "type": "string",
          "enum": [
            "/amount/value"
          ]
        },
        "value": {
          "description": "The amount value as an integer (int64) represented in currency minor units (e.g. 15.02 EUR is represented as the value 1502).",
          "type": "integer",
          "format": "int64"
        }
      },
      "additionalProperties": false,
      "required": [
        "op",
        "path",
        "value"
      ]
    },
    "ForecastedTransactionJSONPatchReplaceDate": {
      "description": "Change execution date.",
      "type": "object",
      "properties": {
        "op": {
          "type": "string",
          "enum": [
            "replace"
          ]
        },
        "path": {
          "type": "string",
          "enum": [
            "/date"
          ]
        },
        "value": {
          "$ref": "#/$defs/Date"
        }
      },
      "additionalProperties": false,
      "required": [
        "op",
        "path",
        "value"
      ]
    },
    "ForecastedTransactionJSONPatchReplaceDescription": {
      "description": "Change the description.",
      "type": "object",
      "properties": {
        "op": {
          "type": "string",
          "enum": [
            "replace"
          ]
        },
        "path": {
          "type": "string",
          "enum": [
            "/description"
          ]
        },
        "value": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "op",
        "path",
        "value"
      ]
    },
    "ForecastedTransactionJSONPatchReplaceMetadataKey": {
      "description": "Set or replace the value of a specific metadata key.",
      "type": "object",
      "properties": {
        "op": {
          "type": "string",
          "enum": [
            "replace"
          ]
        },
        "path": {
          "type": "string",
          "minLength": 11,
          "maxLength": 74,
          "pattern": "^/metadata/[A-Za-z0-9_\\.\\+\\-]{1,64}$"
        },
        "value": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        }
      },
      "additionalProperties": false,
      "required": [
        "op",
        "path",
        "value"
      ]
    }
  }
}