{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-content-fragment-model-schema.json",
  "title": "ContentFragmentModel",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-aem-sites-openapi.yml#/components/schemas/ContentFragmentModel",
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/$defs/Base64URLId"
    },
    "path": {
      "allOf": [
        {
          "$ref": "#/$defs/ContentFragmentModelPath"
        }
      ],
      "description": "The path where this model is currently stored."
    },
    "name": {
      "type": "string",
      "description": "A human-readable name for this model.",
      "minLength": 1
    },
    "technicalName": {
      "type": "string",
      "readOnly": true,
      "description": "The technical name of the model."
    },
    "etag": {
      "allOf": [
        {
          "$ref": "#/$defs/ETag"
        }
      ],
      "description": "The current entity tag for the selected Content Fragment Model."
    },
    "description": {
      "type": "string",
      "description": "A human-readable description for this model."
    },
    "created": {
      "$ref": "#/$defs/AuthoringInfo"
    },
    "modified": {
      "$ref": "#/$defs/AuthoringInfo"
    },
    "published": {
      "$ref": "#/$defs/AuthoringInfo"
    },
    "locked": {
      "type": "boolean",
      "description": "If a model is locked, then no edits can be performed on this model,\nexcept for unlocking it.\n",
      "default": false
    },
    "status": {
      "$ref": "#/$defs/ContentFragmentModelStatus"
    },
    "replicationStatus": {
      "$ref": "#/$defs/ReplicationStatus"
    },
    "previewReplicationStatus": {
      "$ref": "#/$defs/PreviewReplicationStatus"
    },
    "fields": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ContentFragmentModelField"
      }
    },
    "previewStatus": {
      "$ref": "#/$defs/PreviewStatus"
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "previewUrlPattern": {
      "x-audience": "cloud",
      "type": "string",
      "format": "url",
      "description": "Preview URL Pattern for the given Model"
    }
  },
  "required": [
    "id",
    "path",
    "name",
    "created",
    "locked",
    "status",
    "fields"
  ],
  "$defs": {
    "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."
        }
      }
    },
    "Base64URLId": {
      "description": "Defines a `base64url` with no padding encoded ID.",
      "type": "string",
      "minLength": 1
    },
    "ContentFragmentModelField": {
      "description": "Defines a Content Fragment Model field.",
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of this field."
        },
        "label": {
          "type": "string",
          "description": "A label to be used when rendering this field in an editable form.\n"
        },
        "description": {
          "type": "string",
          "description": "A human-readable description for this field.\n"
        },
        "required": {
          "type": "boolean",
          "description": "Defines whether this field is required or optional.",
          "default": false
        },
        "multiple": {
          "type": "boolean",
          "description": "Defines if this field should store multiple values.",
          "default": false
        },
        "minItems": {
          "type": "integer",
          "description": "A positive integer number that defines the minimum number of values that can be stored into this field",
          "format": "int32",
          "minimum": 0
        },
        "maxItems": {
          "type": "integer",
          "description": "A positive integer number that defines the maximum number of values that can be stored into this field",
          "format": "int32",
          "minimum": 1
        },
        "type": {
          "$ref": "#/$defs/DataType"
        },
        "extensionConfig": {
          "type": "object",
          "description": "If this field is related to an extension, this object contains the configuration of the field for use by the extension.\nThe values in this object are defined by the extension and can be used to configure the field's behavior or appearance.\nThe values can be primitive types (string, boolean, number) or arrays of primitive types.\nMore information about Content Fragments extensions can be found at <a href=\"https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/developing/extensibility/ui/content-fragments/overview\">AEM Content Fragments extensibility</a>.\n",
          "additionalProperties": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "boolean"
              },
              {
                "type": "number"
              },
              {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "number"
                    }
                  ]
                }
              }
            ]
          }
        }
      },
      "required": [
        "name",
        "label",
        "type"
      ]
    },
    "ContentFragmentModelPath": {
      "type": "string",
      "description": "A valid path to a Content Fragment Model resource.",
      "pattern": "^\\/conf(\\/.*)?$",
      "readOnly": true
    },
    "ContentFragmentModelStatus": {
      "description": "The status of this model. A model is in `draft` as soon as it's\ncreated, unless the user specifically marks the model as `enabled`.\nA model is in `disabled` state only when a user explicitly disables\nthe model.\n",
      "type": "string",
      "readOnly": true,
      "enum": [
        "enabled",
        "disabled",
        "draft"
      ]
    },
    "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"
      ]
    },
    "ETag": {
      "type": "string",
      "description": "The `ETag` field in a response provides the current entity tag for the selected representation, as determined at the\nconclusion of handling the request. An entity tag is an opaque validator for differentiating between multiple\nrepresentations of the same resource, regardless of whether those multiple representations are due to resource state\nchanges over time, content negotiation resulting in multiple representations being valid at the same time, or both.\nAn entity tag consists of an opaque quoted string, possibly prefixed by a weakness indicator.\n\nFor more details, please head over to [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-etag).\n"
    },
    "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
    },
    "ReplicationStatus": {
      "description": "The 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"
      ]
    },
    "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"
      ]
    }
  }
}