{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/json-document-transform/latest.json",
  "title": "JSON schema for JSON Document Transforms",
  "x-lintel": {
    "source": "https://www.schemastore.org/jdt.json",
    "sourceSha256": "9cfd8cd2b2fadb8074145082bb19e88b921a6bc7acfe0c0f427e60c0937fa149"
  },
  "type": "object",
  "properties": {
    "@jdt.rename": {
      "anyOf": [
        {
          "type": "object",
          "description": "Renames nodes",
          "properties": {
            "@jdt.path": {
              "$ref": "#/$defs/@jdt.path"
            },
            "@jdt.value": {
              "$ref": "#/$defs/@jdt.value"
            }
          }
        },
        {
          "type": "array",
          "description": "Renames nodes",
          "items": {
            "properties": {
              "@jdt.path": {
                "$ref": "#/$defs/@jdt.path"
              },
              "@jdt.value": {
                "$ref": "#/$defs/@jdt.value"
              }
            }
          }
        }
      ]
    },
    "@jdt.replace": {
      "type": [
        "array",
        "object"
      ],
      "description": "Replaces the current node with the given value. ",
      "properties": {
        "@jdt.path": {
          "$ref": "#/$defs/@jdt.path"
        },
        "@jdt.value": {
          "$ref": "#/$defs/@jdt.value"
        }
      },
      "items": {
        "properties": {
          "@jdt.path": {
            "$ref": "#/$defs/@jdt.path"
          },
          "@jdt.value": {
            "$ref": "#/$defs/@jdt.value"
          }
        }
      }
    },
    "@jdt.remove": {
      "type": [
        "array",
        "boolean",
        "object",
        "string"
      ],
      "description": "Removes the node with the given name from the current level.",
      "properties": {
        "@jdt.path": {
          "$ref": "#/$defs/@jdt.path"
        }
      },
      "items": {
        "type": [
          "boolean",
          "integer",
          "null",
          "number",
          "object",
          "string"
        ]
      }
    },
    "@jdt.merge": {
      "description": "Merges the current node value with the given object.",
      "type": [
        "object",
        "array"
      ],
      "properties": {
        "@jdt.path": {
          "$ref": "#/$defs/@jdt.path"
        },
        "@jdt.value": {
          "$ref": "#/$defs/@jdt.value"
        }
      },
      "items": {
        "properties": {
          "@jdt.path": {
            "$ref": "#/$defs/@jdt.path"
          },
          "@jdt.value": {
            "$ref": "#/$defs/@jdt.value"
          }
        }
      }
    }
  },
  "id": "https://json.schemastore.org/jdt.json",
  "$defs": {
    "@jdt.path": {
      "type": "string",
      "description": "Use JSONPath syntax to navigate to the node where the transform should be applied."
    },
    "@jdt.value": {
      "type": "string",
      "description": "The transformation value that should be applied."
    }
  },
  "additionalProperties": {
    "$ref": "#"
  }
}
