{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-content-fragment-variation-schema.json",
  "title": "ContentFragmentVariation",
  "description": "A representation of a Content Fragment Variation.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-aem-sites-openapi.yml#/components/schemas/ContentFragmentVariation",
  "type": "object",
  "properties": {
    "name": {
      "description": "Variation name",
      "type": "string",
      "readOnly": true
    },
    "title": {
      "description": "Variation title",
      "type": "string",
      "minLength": 1
    },
    "description": {
      "description": "Variation description.",
      "type": "string"
    },
    "fields": {
      "type": "array",
      "description": "Content fragment fields.",
      "items": {
        "$ref": "#/$defs/ContentFragmentField"
      }
    },
    "tags": {
      "readOnly": true,
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "validationStatus": {
      "$ref": "#/$defs/ValidationStatus"
    },
    "references": {
      "type": "array",
      "description": "The properties of the references associated with this variation",
      "items": {
        "$ref": "#/$defs/BaseReference"
      },
      "readOnly": true
    },
    "fieldTags": {
      "description": "The properties of the tags contained in the fragment's tag fields",
      "type": "array",
      "readOnly": true,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "created": {
      "$ref": "#/$defs/AuthoringInfo"
    },
    "modified": {
      "$ref": "#/$defs/AuthoringInfo"
    },
    "card": {
      "$ref": "#/$defs/Card"
    }
  },
  "required": [
    "title",
    "fields",
    "tags",
    "validationStatus",
    "references",
    "fieldTags"
  ],
  "$defs": {
    "AssetValue": {
      "anyOf": [
        {
          "$ref": "#/$defs/Path"
        },
        {
          "$ref": "#/$defs/UUID"
        },
        {
          "$ref": "#/$defs/RemoteAssetProperties"
        },
        {
          "$ref": "#/$defs/ContentReferenceUrl"
        }
      ]
    },
    "AuthoringInfo": {
      "readOnly": true,
      "type": "object",
      "description": "Provides details about an authoring operation (e.g. user and date).",
      "properties": {
        "at": {
          "type": "string",
          "format": "date-time",
          "description": "Date and time of the operation."
        },
        "by": {
          "type": "string",
          "description": "The identifier of the user who performed the operation."
        },
        "fullName": {
          "type": "string",
          "description": "The full name of the user who performed the operation."
        },
        "firstName": {
          "type": "string",
          "description": "The first name of the user who performed the operation."
        },
        "lastName": {
          "type": "string",
          "description": "The last name of the user who performed the operation."
        }
      }
    },
    "BaseReference": {
      "type": "object",
      "description": "Information about referenced resources.",
      "properties": {
        "name": {
          "description": "Item name",
          "type": "string"
        },
        "fieldName": {
          "description": "Name of the field that contains the reference.",
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/ReferenceType"
        },
        "title": {
          "type": "string",
          "description": "Reference title."
        },
        "path": {
          "$ref": "#/$defs/Path"
        },
        "created": {
          "$ref": "#/$defs/AuthoringInfo"
        },
        "modified": {
          "$ref": "#/$defs/AuthoringInfo"
        },
        "published": {
          "$ref": "#/$defs/AuthoringInfo"
        },
        "status": {
          "$ref": "#/$defs/ContentFragmentStatus"
        },
        "previewReplicationStatus": {
          "$ref": "#/$defs/PreviewReplicationStatus"
        },
        "previewStatus": {
          "$ref": "#/$defs/PreviewStatus"
        }
      },
      "required": [
        "type",
        "path"
      ]
    },
    "Card": {
      "type": "object",
      "description": "A representation of a card.",
      "properties": {
        "assets": {
          "type": "array",
          "description": "These assets are extracted from the fragment fields and can be used to display a preview of the fragment's content.",
          "items": {
            "$ref": "#/$defs/AssetValue"
          }
        },
        "texts": {
          "type": "array",
          "description": "These texts are extracted from the fragment fields and can be used to display a preview of the fragment's content.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "ContentFragmentField": {
      "type": "object",
      "description": "A field value of one of the supported types.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the field."
        },
        "type": {
          "$ref": "#/$defs/DataType"
        },
        "multiple": {
          "type": "boolean",
          "description": "Whether the field has multiple values.",
          "default": false
        },
        "locked": {
          "description": "If set to true, the field cannot be edited. \nIn case of live copies, the field inherits its value from the source content fragment and cannot be edited.\n",
          "type": "boolean",
          "default": false
        }
      },
      "required": [
        "name",
        "type"
      ]
    },
    "ContentFragmentStatus": {
      "description": "Status of a Resource",
      "type": "string",
      "readOnly": true,
      "enum": [
        "NEW",
        "DRAFT",
        "PUBLISHED",
        "MODIFIED",
        "UNPUBLISHED"
      ]
    },
    "ContentReferenceUrl": {
      "type": "string",
      "format": "url",
      "description": "The URL of the content reference"
    },
    "DataType": {
      "type": "string",
      "description": "Type of data stored in the field.",
      "enum": [
        "text",
        "long-text",
        "number",
        "float-number",
        "date-time",
        "date",
        "time",
        "boolean",
        "enumeration",
        "tag",
        "content-fragment",
        "content-reference",
        "json",
        "composite"
      ]
    },
    "Path": {
      "type": "string",
      "pattern": "^[^\\\\\\[\\]|*]*$",
      "description": "A valid path to a resource"
    },
    "PreviewReplicationStatus": {
      "description": "The preview replication status of a resource, which can also act as a a filtering criterion that allows users \nto select resources based on their replication status. The following options are available:\n  * `PUBLISHED` - the resource is published\n  * `UNPUBLISHED` - the resource was published and then later unpublished\n  * `MODIFIED` - the resource was published and then later modified on the author\n  * `NEVER_PUBLISHED` - the resource has never been published\n",
      "type": "string",
      "readOnly": true,
      "enum": [
        "PUBLISHED",
        "UNPUBLISHED",
        "MODIFIED",
        "NEVER_PUBLISHED"
      ],
      "x-audience": "cloud"
    },
    "PreviewStatus": {
      "type": "string",
      "x-audience": "cloud",
      "deprecated": true,
      "enum": [
        "IN_SYNC",
        "OUT_OF_SYNC"
      ],
      "readOnly": true
    },
    "ReferenceType": {
      "type": "string",
      "description": "Type of referenced resource",
      "enum": [
        "content-fragment",
        "experience-fragment",
        "asset",
        "page"
      ]
    },
    "RemoteAssetProperties": {
      "type": "object",
      "description": "The properties of a remote asset reference",
      "properties": {
        "repository": {
          "$ref": "#/$defs/RemoteAssetRepository"
        },
        "assetId": {
          "description": "The ID of the asset",
          "allOf": [
            {
              "$ref": "#/$defs/URN"
            }
          ]
        }
      },
      "required": [
        "repository",
        "assetId"
      ]
    },
    "RemoteAssetRepository": {
      "type": "string",
      "description": "The hostname of the remote repository where the asset is stored.",
      "minLength": 1
    },
    "Tag": {
      "description": "A representation of a tag.",
      "type": "object",
      "readOnly": true,
      "properties": {
        "id": {
          "type": "string",
          "description": "Short tag ID.",
          "minLength": 1
        },
        "title": {
          "type": "string",
          "description": "Title that should be displayed instead of the tag name or tag id."
        },
        "i18n": {
          "description": "Localised title and title path variants.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "locale": {
                "type": "string",
                "minLength": 2,
                "description": "A RFC 5646 locale tag."
              },
              "title": {
                "type": "string",
                "description": "The localised title"
              },
              "titlePath": {
                "type": "string",
                "description": "The localised title variant."
              }
            },
            "minItems": 0
          }
        },
        "titlePath": {
          "type": "string",
          "description": "Title variant of the tag ID."
        },
        "name": {
          "type": "string",
          "description": "The tag name."
        },
        "path": {
          "type": "string",
          "description": "Full absolute path of a tag."
        },
        "description": {
          "type": "string",
          "description": "Optional description for a tag."
        }
      },
      "required": [
        "id",
        "i18n"
      ]
    },
    "URN": {
      "description": "A URN schema object",
      "type": "string",
      "pattern": "^urn:[a-z0-9][a-z0-9-]{0,31}:[a-z0-9()+,-.:=@;$_!*'%/?#]+$"
    },
    "UUID": {
      "description": "Resource unique identifier",
      "type": "string",
      "format": "uuid"
    },
    "ValidationMessage": {
      "type": "object",
      "properties": {
        "property": {
          "description": "JSON pointer to an invalid property",
          "type": "string"
        },
        "message": {
          "description": "The reason for the invalid status.",
          "type": "string"
        }
      }
    },
    "ValidationStatus": {
      "type": "array",
      "description": "Provides the validation status of the resource addressed by the current request.\nAn empty or missing array means that the request or resources are valid.\n",
      "items": {
        "$ref": "#/$defs/ValidationMessage"
      }
    }
  }
}