{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/yippee-ki-json-configuration-yml/versions/1.1.2.json",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/nagyesta/yippee-ki-json/v1.1.2/schema/yippee-ki-json_config_schema.json",
    "sourceSha256": "071f9fa2141ccd217020a832ab075e5216da2616bee4039014f831f24c29dbf8",
    "fileMatch": [
      "**/yippee-*.yml",
      "**/*.yippee.yml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "actions": {
      "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Configuring-your-actions",
      "type": "array",
      "minItems": 1,
      "description": "The array of transformation action we will be able to select from at startup.",
      "items": {
        "$ref": "#/$defs/actionTypes/$defs/action"
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false,
  "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Configuring-your-actions",
  "$defs": {
    "commonTypes": {
      "$comment": "Some of the reusable base types",
      "$defs": {
        "name": {
          "$comment": "A single JSON key name",
          "type": "string",
          "pattern": "^[a-zA-Z]+[a-zA-Z0-9\\-_]*$"
        },
        "jsonPath": {
          "$comment": "https://github.com/json-path/JsonPath",
          "type": "string",
          "pattern": "^[$@](((\\.|\\.\\.)([a-zA-Z]+[a-zA-Z0-9\\-_]*|\\*))|\\[\\*]|\\[[0-9]+((, [0-9]+)*|:[0-9]+)]|\\['[a-zA-Z]+[a-zA-Z0-9\\-_]*'(, '[a-zA-Z]+[a-zA-Z0-9\\-_]*')*]|\\[\\?\\(.+\\)])*$",
          "description": "A JSON Path selecting one or more nodes of the parsed JSON document."
        },
        "chronoUnit": {
          "type": "string",
          "enum": [
            "NANOS",
            "MICROS",
            "MILLIS",
            "SECONDS",
            "MINUTES",
            "HOURS",
            "HALF_DAYS",
            "DAYS",
            "WEEKS",
            "MONTHS",
            "YEARS",
            "DECADES",
            "CENTURIES",
            "MILLENIA"
          ],
          "description": "The chrono unit we want to use."
        }
      }
    },
    "functionTypes": {
      "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-functions",
      "$defs": {
        "functionChangeCase": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-functions#change-case-function",
          "properties": {
            "name": {
              "type": "string",
              "const": "changeCase",
              "description": "The name of the function."
            },
            "to": {
              "type": "string",
              "enum": [
                "CAPITALIZED",
                "UNCAPITALIZED",
                "LOWER_CASE",
                "UPPER_CASE"
              ],
              "description": "The type of case transformation we want to execute."
            }
          },
          "required": [
            "name",
            "to"
          ],
          "additionalProperties": false
        },
        "functionCloneKey": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-functions#clone-key-function",
          "properties": {
            "name": {
              "type": "string",
              "const": "cloneKey",
              "description": "The name of the function."
            },
            "from": {
              "allOf": [
                {
                  "type": "string",
                  "description": "The name of the key we want to clone from."
                },
                {
                  "$ref": "#/$defs/commonTypes/$defs/name"
                }
              ]
            },
            "to": {
              "allOf": [
                {
                  "type": "string",
                  "description": "The name of the destination key we want to use."
                },
                {
                  "$ref": "#/$defs/commonTypes/$defs/name"
                }
              ]
            }
          },
          "required": [
            "name",
            "from",
            "to"
          ],
          "additionalProperties": false
        },
        "functionAdd": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-functions#decimal-add-function",
          "properties": {
            "name": {
              "type": "string",
              "const": "add",
              "description": "The name of the function."
            },
            "operand": {
              "type": "number",
              "description": "The numerical value we want to use as operand."
            },
            "scale": {
              "type": "integer",
              "description": "The scale of the result we want to see once the calculation is done."
            }
          },
          "required": [
            "name",
            "operand",
            "scale"
          ],
          "additionalProperties": false
        },
        "functionDivide": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-functions#decimal-divide-function",
          "properties": {
            "name": {
              "type": "string",
              "const": "divide",
              "description": "The name of the function."
            },
            "operand": {
              "type": "number",
              "description": "The numerical value we want to use as operand."
            },
            "scale": {
              "type": "integer",
              "description": "The scale of the result we want to see once the calculation is done."
            }
          },
          "required": [
            "name",
            "operand",
            "scale"
          ],
          "additionalProperties": false
        },
        "functionMultiply": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-functions#decimal-multiply-function",
          "properties": {
            "name": {
              "type": "string",
              "const": "multiply",
              "description": "The name of the function."
            },
            "operand": {
              "type": "number",
              "description": "The numerical value we want to use as operand."
            },
            "scale": {
              "type": "integer",
              "description": "The scale of the result we want to see once the calculation is done."
            }
          },
          "required": [
            "name",
            "operand",
            "scale"
          ],
          "additionalProperties": false
        },
        "functionSubtract": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-functions#decimal-subtract-function",
          "properties": {
            "name": {
              "type": "string",
              "const": "subtract",
              "description": "The name of the function."
            },
            "operand": {
              "type": "number",
              "description": "The numerical value we want to use as operand."
            },
            "scale": {
              "type": "integer",
              "description": "The scale of the result we want to see once the calculation is done."
            }
          },
          "required": [
            "name",
            "operand",
            "scale"
          ],
          "additionalProperties": false
        },
        "functionEpochMillisDateAdd": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-functions#epoch-millis-date-add-function",
          "properties": {
            "name": {
              "type": "string",
              "const": "epochMillisDateAdd",
              "description": "The name of the function."
            },
            "amount": {
              "type": "integer",
              "description": "The amount of time we want to apply as adjustment."
            },
            "unit": {
              "$ref": "#/$defs/commonTypes/$defs/chronoUnit"
            }
          },
          "required": [
            "name",
            "amount",
            "unit"
          ],
          "additionalProperties": false
        },
        "functionReplace": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-functions#literal-replace-function",
          "properties": {
            "name": {
              "type": "string",
              "const": "replace",
              "description": "The name of the function."
            },
            "find": {
              "type": "string",
              "description": "The value which needs to be replaced (all occurrences)."
            },
            "replace": {
              "type": "string",
              "description": "The value which needs to be used as replacement (for all occurrences)."
            }
          },
          "required": [
            "name",
            "find",
            "replace"
          ],
          "additionalProperties": false
        },
        "functionRegex": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-functions#regex-replace-function",
          "properties": {
            "name": {
              "type": "string",
              "const": "regex",
              "description": "The name of the function."
            },
            "pattern": {
              "type": "string",
              "description": "The regular expression we want to use for matching, capturing named groups."
            },
            "replacement": {
              "type": "string",
              "description": "The replacement format we want to use allowing EL-like placeholders for the captured groups."
            }
          },
          "required": [
            "name",
            "pattern",
            "replacement"
          ],
          "additionalProperties": false
        },
        "functionStringDateAdd": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-functions#string-date-add-function",
          "properties": {
            "name": {
              "type": "string",
              "const": "stringDateAdd",
              "description": "The name of the function."
            },
            "formatter": {
              "$comment": "https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/format/DateTimeFormatter.html",
              "type": "string",
              "description": "The date time format we want to use for parsing.",
              "default": "yyyy-MM-dd'T'HH:mm:ssZ"
            },
            "amount": {
              "type": "integer",
              "description": "The amount of time we want to apply as adjustment."
            },
            "unit": {
              "$ref": "#/$defs/commonTypes/$defs/chronoUnit"
            }
          },
          "required": [
            "name",
            "amount",
            "unit",
            "formatter"
          ],
          "additionalProperties": false
        },
        "anyFunction": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "enum": [
                    "changeCase",
                    "cloneKey",
                    "add",
                    "divide",
                    "multiply",
                    "subtract",
                    "epochMillisDateAdd",
                    "replace",
                    "regex",
                    "stringDateAdd"
                  ],
                  "additionalItems": false
                }
              },
              "required": [
                "name"
              ]
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "changeCase"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/functionTypes/$defs/functionChangeCase"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "cloneKey"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/functionTypes/$defs/functionCloneKey"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "add"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/functionTypes/$defs/functionAdd"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "divide"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/functionTypes/$defs/functionDivide"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "multiply"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/functionTypes/$defs/functionMultiply"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "subtract"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/functionTypes/$defs/functionSubtract"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "epochMillisDateAdd"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/functionTypes/$defs/functionEpochMillisDateAdd"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "replace"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/functionTypes/$defs/functionReplace"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "regex"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/functionTypes/$defs/functionRegex"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "stringDateAdd"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/functionTypes/$defs/functionStringDateAdd"
              }
            }
          ]
        }
      }
    },
    "supplierTypes": {
      "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-suppliers",
      "$defs": {
        "supplierStaticString": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-suppliers#static-string-supplier",
          "properties": {
            "name": {
              "type": "string",
              "const": "staticString",
              "description": "The name of the supplier."
            },
            "value": {
              "type": "string",
              "description": "The static value that must be returned each time the supplier is called."
            }
          },
          "required": [
            "name",
            "value"
          ],
          "additionalProperties": false
        },
        "supplierStaticJson": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-suppliers#static-json-supplier",
          "properties": {
            "name": {
              "type": "string",
              "const": "staticJson",
              "description": "The name of the supplier."
            },
            "value": {
              "type": "string",
              "description": "The static value that must be parsed and returned each time the supplier is called."
            }
          },
          "required": [
            "name",
            "value"
          ],
          "additionalProperties": false
        },
        "anySupplier": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "enum": [
                    "staticString",
                    "staticJson"
                  ]
                }
              },
              "required": [
                "name"
              ]
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "staticJson"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/supplierTypes/$defs/supplierStaticJson"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "staticString"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/supplierTypes/$defs/supplierStaticString"
              }
            }
          ]
        }
      }
    },
    "predicateTypes": {
      "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-predicates",
      "$defs": {
        "predicateAllMatch": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-predicates#all-match-predicate",
          "properties": {
            "name": {
              "type": "string",
              "const": "allMatch",
              "description": "The name of the predicate."
            },
            "from": {
              "type": "array",
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/predicateTypes/$defs/anyPredicate"
              },
              "description": "The array of predicates we need to evaluate one by one."
            }
          },
          "required": [
            "name",
            "from"
          ],
          "additionalProperties": false
        },
        "predicateAnyMatch": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-predicates#any-match-predicate",
          "properties": {
            "name": {
              "type": "string",
              "const": "anyMatch",
              "description": "The name of the predicate."
            },
            "from": {
              "type": "array",
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/predicateTypes/$defs/anyPredicate"
              },
              "description": "The array of predicates we need to evaluate one by one."
            }
          },
          "required": [
            "name",
            "from"
          ],
          "additionalProperties": false
        },
        "predicateAnyString": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-predicates#any-string-predicate",
          "properties": {
            "name": {
              "type": "string",
              "const": "anyString",
              "description": "The name of the predicate."
            }
          },
          "required": [
            "name"
          ],
          "additionalProperties": false
        },
        "predicateContainsKey": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-predicates#contains-key-predicate",
          "properties": {
            "name": {
              "type": "string",
              "const": "containsKey",
              "description": "The name of the predicate."
            },
            "key": {
              "allOf": [
                {
                  "type": "string",
                  "description": "The key that needs to be verified that it is present."
                },
                {
                  "$ref": "#/$defs/commonTypes/$defs/name"
                }
              ]
            }
          },
          "required": [
            "name",
            "key"
          ],
          "additionalProperties": false
        },
        "predicateEvalOn": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-predicates#eval-on-predicate",
          "properties": {
            "name": {
              "type": "string",
              "const": "evalOn",
              "description": "The name of the predicate."
            },
            "childPath": {
              "type": "string",
              "pattern": "^([a-zA-Z]+[a-zA-Z0-9\\-_]+)(.[a-zA-Z]+[a-zA-Z0-9\\-_]+)*$",
              "description": "The path (relative to the rule's JSON Path) in a dotted format."
            },
            "predicate": {
              "allOf": [
                {
                  "$ref": "#/$defs/predicateTypes/$defs/anyPredicate"
                },
                {
                  "description": "The predicate we need to evaluate."
                }
              ]
            }
          },
          "required": [
            "name",
            "childPath",
            "predicate"
          ],
          "additionalProperties": false
        },
        "predicateIsNull": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-predicates#is-null-predicate",
          "properties": {
            "name": {
              "type": "string",
              "const": "isNull",
              "description": "The name of the predicate."
            }
          },
          "required": [
            "name"
          ],
          "additionalProperties": false
        },
        "predicateNoneMatch": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-predicates#none-match-predicate",
          "properties": {
            "name": {
              "type": "string",
              "const": "noneMatch",
              "description": "The name of the predicate."
            },
            "from": {
              "type": "array",
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/predicateTypes/$defs/anyPredicate"
              },
              "description": "The array of predicates we need to evaluate one by one."
            }
          },
          "required": [
            "name",
            "from"
          ],
          "additionalProperties": false
        },
        "predicateNonNull": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-predicates#non-null-predicate",
          "properties": {
            "name": {
              "type": "string",
              "const": "notNull",
              "description": "The name of the predicate."
            }
          },
          "required": [
            "name"
          ],
          "additionalProperties": false
        },
        "predicateRegex": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-predicates#regex-predicate",
          "properties": {
            "name": {
              "type": "string",
              "const": "regex",
              "description": "The name of the predicate."
            },
            "pattern": {
              "type": "string",
              "description": "The regular expression we need to evaluate."
            }
          },
          "required": [
            "name",
            "pattern"
          ],
          "additionalProperties": false
        },
        "predicateSpEL": {
          "type": "object",
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-predicates#spel-predicate",
          "properties": {
            "name": {
              "type": "string",
              "const": "SpEL",
              "description": "The name of the predicate."
            },
            "expression": {
              "type": "string",
              "description": "The SpEL expression we need to evaluate."
            }
          },
          "required": [
            "name",
            "expression"
          ],
          "additionalProperties": false
        },
        "anyPredicate": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "enum": [
                    "allMatch",
                    "anyMatch",
                    "anyString",
                    "containsKey",
                    "evalOn",
                    "isNull",
                    "noneMatch",
                    "notNull",
                    "regex",
                    "SpEL"
                  ]
                }
              },
              "required": [
                "name"
              ]
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "allMatch"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/predicateTypes/$defs/predicateAllMatch"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "anyMatch"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/predicateTypes/$defs/predicateAnyMatch"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "anyString"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/predicateTypes/$defs/predicateAnyString"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "containsKey"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/predicateTypes/$defs/predicateContainsKey"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "evalOn"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/predicateTypes/$defs/predicateEvalOn"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "isNull"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/predicateTypes/$defs/predicateIsNull"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "noneMatch"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/predicateTypes/$defs/predicateNoneMatch"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "notNull"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/predicateTypes/$defs/predicateNonNull"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "regex"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/predicateTypes/$defs/predicateRegex"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "SpEL"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/predicateTypes/$defs/predicateSpEL"
              }
            }
          ]
        }
      }
    },
    "ruleTypes": {
      "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-rules",
      "$defs": {
        "ruleAdd": {
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-rules#add",
          "properties": {
            "name": {
              "type": "string",
              "const": "add"
            },
            "path": {
              "$ref": "#/$defs/commonTypes/$defs/jsonPath"
            },
            "params": {
              "type": "object",
              "properties": {
                "key": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/supplierTypes/$defs/anySupplier"
                    },
                    {
                      "description": "The supplier that will define the key of the new node."
                    }
                  ]
                },
                "value": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/supplierTypes/$defs/anySupplier"
                    },
                    {
                      "description": "The supplier that will define the value that will be assigned to the key."
                    }
                  ]
                }
              },
              "required": [
                "key",
                "value"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "name",
            "path",
            "params"
          ],
          "additionalProperties": false,
          "type": "object"
        },
        "ruleCalculate": {
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-rules#calculate",
          "properties": {
            "name": {
              "type": "string",
              "const": "calculate"
            },
            "path": {
              "$ref": "#/$defs/commonTypes/$defs/jsonPath"
            },
            "params": {
              "type": "object",
              "properties": {
                "predicate": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/predicateTypes/$defs/anyPredicate"
                    },
                    {
                      "description": "The predicate that will determine whether we should apply the function."
                    }
                  ]
                },
                "numberFunction": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/functionTypes/$defs/anyFunction"
                    },
                    {
                      "description": "The function that will tell the rule what kind of calculation needs to be done."
                    }
                  ]
                }
              },
              "required": [
                "numberFunction"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "name",
            "path",
            "params"
          ],
          "additionalProperties": false,
          "type": "object"
        },
        "ruleCopy": {
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-rules#copy",
          "properties": {
            "name": {
              "type": "string",
              "const": "copy"
            },
            "path": {
              "$ref": "#/$defs/commonTypes/$defs/jsonPath"
            },
            "params": {
              "type": "object",
              "properties": {
                "key": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/supplierTypes/$defs/anySupplier"
                    },
                    {
                      "description": "The supplier that will define the key we want to copy."
                    }
                  ]
                },
                "to": {
                  "type": "object",
                  "description": "The destination specific configuration.",
                  "properties": {
                    "value": {
                      "allOf": [
                        {
                          "$ref": "#/$defs/commonTypes/$defs/jsonPath"
                        },
                        {
                          "description": "The destination path where this rule will attempt to create the copied node."
                        }
                      ]
                    }
                  },
                  "required": [
                    "value"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "key",
                "to"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "name",
            "path",
            "params"
          ],
          "additionalProperties": false,
          "type": "object"
        },
        "ruleDeleteFrom": {
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-rules#delete-from",
          "properties": {
            "name": {
              "type": "string",
              "const": "deleteFrom"
            },
            "path": {
              "$ref": "#/$defs/commonTypes/$defs/jsonPath"
            },
            "params": {
              "type": "object",
              "properties": {
                "predicate": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/predicateTypes/$defs/anyPredicate"
                    },
                    {
                      "description": "The predicate that will determine whether we need to run the rule on the matching path."
                    }
                  ]
                },
                "keepKey": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/predicateTypes/$defs/anyPredicate"
                    },
                    {
                      "description": "The predicate that will be used to test whether a key should be kept, keeping only the matching keys."
                    }
                  ]
                },
                "deleteKey": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/predicateTypes/$defs/anyPredicate"
                    },
                    {
                      "description": "The predicate that will be used to test whether a key should be deleted, deleting all the matching keys."
                    }
                  ]
                },
                "keepValue": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/predicateTypes/$defs/anyPredicate"
                    },
                    {
                      "description": "The predicate that will be used to test whether an entry should be kept, keeping it only if the value matches."
                    }
                  ]
                },
                "deleteValue": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/predicateTypes/$defs/anyPredicate"
                    },
                    {
                      "description": "The predicate that will be used to test whether an entry should be deleted, deleting all of them with matching values."
                    }
                  ]
                }
              },
              "minProperties": 1,
              "additionalProperties": false
            }
          },
          "required": [
            "name",
            "path",
            "params"
          ],
          "additionalProperties": false,
          "type": "object"
        },
        "ruleDelete": {
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-rules#delete",
          "properties": {
            "name": {
              "type": "string",
              "const": "delete"
            },
            "path": {
              "$ref": "#/$defs/commonTypes/$defs/jsonPath"
            }
          },
          "required": [
            "name",
            "path"
          ],
          "additionalProperties": false,
          "type": "object"
        },
        "ruleRename": {
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-rules#rename",
          "properties": {
            "name": {
              "type": "string",
              "const": "rename"
            },
            "path": {
              "$ref": "#/$defs/commonTypes/$defs/jsonPath"
            },
            "params": {
              "type": "object",
              "properties": {
                "oldKey": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/supplierTypes/$defs/anySupplier"
                    },
                    {
                      "description": "The supplier that will define the source key under the matching path."
                    }
                  ]
                },
                "newKey": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/supplierTypes/$defs/anySupplier"
                    },
                    {
                      "description": "The supplier that will define the destination key under the matching path."
                    }
                  ]
                }
              },
              "required": [
                "oldKey",
                "newKey"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "name",
            "path",
            "params"
          ],
          "additionalProperties": false,
          "type": "object"
        },
        "ruleReplaceMap": {
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-rules#replace-map",
          "properties": {
            "name": {
              "type": "string",
              "const": "replaceMap"
            },
            "path": {
              "$ref": "#/$defs/commonTypes/$defs/jsonPath"
            },
            "params": {
              "type": "object",
              "properties": {
                "predicate": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/predicateTypes/$defs/anyPredicate"
                    },
                    {
                      "description": "The predicate that will determine whether we need to run the rule on the matching path."
                    }
                  ]
                },
                "mapFunction": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/functionTypes/$defs/anyFunction"
                    },
                    {
                      "description": "The function that defines the transformation which needs to be done on the selected map/object."
                    }
                  ]
                }
              },
              "required": [
                "mapFunction"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "name",
            "path",
            "params"
          ],
          "additionalProperties": false,
          "type": "object"
        },
        "ruleReplace": {
          "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Built-in-rules#replace",
          "properties": {
            "name": {
              "type": "string",
              "const": "replace"
            },
            "path": {
              "$ref": "#/$defs/commonTypes/$defs/jsonPath"
            },
            "params": {
              "type": "object",
              "properties": {
                "predicate": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/predicateTypes/$defs/anyPredicate"
                    },
                    {
                      "description": "The predicate that will determine whether we need to run the rule on the matching path."
                    }
                  ]
                },
                "stringFunction": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/functionTypes/$defs/anyFunction"
                    },
                    {
                      "description": "The function that defines the transformation which needs to be done on the selected String node."
                    }
                  ]
                }
              },
              "required": [
                "stringFunction"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "name",
            "path",
            "params"
          ],
          "additionalProperties": false,
          "type": "object"
        },
        "anyRule": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "enum": [
                    "add",
                    "calculate",
                    "copy",
                    "deleteFrom",
                    "delete",
                    "rename",
                    "replaceMap",
                    "replace"
                  ],
                  "description": "The name of the rule."
                },
                "path": {
                  "$ref": "#/$defs/commonTypes/$defs/jsonPath"
                },
                "params": {
                  "type": "object",
                  "description": "The optional parameter map to allow configuration of the selected rule."
                }
              },
              "required": [
                "name",
                "path"
              ],
              "additionalProperties": false
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "add"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/ruleTypes/$defs/ruleAdd"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "calculate"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/ruleTypes/$defs/ruleCalculate"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "copy"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/ruleTypes/$defs/ruleCopy"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "deleteFrom"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/ruleTypes/$defs/ruleDeleteFrom"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "delete"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/ruleTypes/$defs/ruleDelete"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "rename"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/ruleTypes/$defs/ruleRename"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "replaceMap"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/ruleTypes/$defs/ruleReplaceMap"
              }
            },
            {
              "if": {
                "properties": {
                  "name": {
                    "const": "replace"
                  }
                }
              },
              "then": {
                "$ref": "#/$defs/ruleTypes/$defs/ruleReplace"
              }
            }
          ]
        }
      }
    },
    "actionTypes": {
      "$comment": "https://github.com/nagyesta/yippee-ki-json/wiki/Configuring-your-actions",
      "$defs": {
        "actionName": {
          "allOf": [
            {
              "$ref": "#/$defs/commonTypes/$defs/name"
            },
            {
              "description": "The name of the action (rule sequence) to allow selecting it when we want to start transformation."
            }
          ]
        },
        "action": {
          "type": "object",
          "properties": {
            "name": {
              "$ref": "#/$defs/actionTypes/$defs/actionName"
            },
            "rules": {
              "type": "array",
              "minItems": 1,
              "description": "The array of rules representing the sequentially triggered steps of the transformation action.",
              "items": {
                "$ref": "#/$defs/ruleTypes/$defs/anyRule"
              },
              "additionalItems": false
            }
          },
          "required": [
            "name",
            "rules"
          ],
          "additionalProperties": false
        }
      }
    }
  },
  "required": [
    "actions"
  ]
}
