{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-find-and-replace-schema.json",
  "title": "FindAndReplace",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-aem-sites-openapi.yml#/components/schemas/FindAndReplace",
  "type": "object",
  "properties": {
    "paths": {
      "type": "array",
      "description": "The list of Content Fragments paths on which Find And Replace operation is performed.",
      "items": {
        "$ref": "#/$defs/ContentFragmentPath"
      },
      "maxItems": 20
    },
    "find": {
      "description": "String we want to replace in all TEXT fields in selected Content Fragments",
      "type": "string",
      "pattern": "^[^<>]*$"
    },
    "replace": {
      "description": "Replacement string.",
      "type": "string",
      "pattern": "^[^<>]*$"
    },
    "dryRun": {
      "description": "When enabled, the operation runs in simulation mode — only simulated results are returned and no changes are persisted.",
      "type": "boolean"
    },
    "ignoreErrors": {
      "description": "True means that we want replacement taking place for all cases when Replacement would be successful and do nothing for cases in error.",
      "type": "boolean"
    },
    "isCaseSensitive": {
      "description": "True means that we want to perform case sensitive search.",
      "type": "boolean",
      "default": true
    },
    "matchExactWord": {
      "description": "A flag indicating whether to only consider the exact matches of the `find` String\nWhen set to `true` (optional), the replacement will occur only for occurrences of the `find` String that are entire words, excluding parts of compound words.\nWhen set to `false` (default), the replacement will happen for any occurrence of the `find` String, including within compound words.\n",
      "type": "boolean",
      "default": false
    },
    "fieldNames": {
      "description": "An optional list of text and long text field names.\nIf provided, it will be used to restrict the Find And Replace operation to those specific fields within the Content Fragments.\nIf not provided, the operation will be performed on all text and long text fields.\n",
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true,
      "maxItems": 10
    }
  },
  "required": [
    "paths",
    "find",
    "replace",
    "dryRun",
    "ignoreErrors"
  ],
  "$defs": {
    "ContentFragmentPath": {
      "type": "string",
      "pattern": "^\\/content\\/dam(\\/.*)?$",
      "description": "A valid path to a Content Fragment resource."
    }
  }
}