{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sap-btp/json-schema/sap-btp-configuration-document-schema.json",
  "title": "ConfigurationDocument",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sap-btp-document-grounding-openapi.yml#/components/schemas/ConfigurationDocument",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the document."
    },
    "title": {
      "type": "string",
      "description": "Title of the document."
    },
    "absoluteFilePath": {
      "type": "string",
      "description": "Absolute file path of the document in the repository."
    },
    "createdTimestamp": {
      "type": "string",
      "format": "date-time",
      "description": "UTC timestamp when the document was created (RFC 3339 format, e.g., 2025-08-28T06:15:30Z)"
    },
    "type": {
      "anyOf": [
        {
          "enum": [
            "FOLDER",
            "DOCUMENT"
          ]
        },
        {}
      ],
      "description": "Type of the resource. Can be FOLDER, DOCUMENT."
    },
    "metadata": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DocumentMetadata"
      },
      "description": "Metadata key-value pairs associated with the document."
    }
  },
  "$defs": {
    "DocumentMetadata": {
      "type": "object",
      "required": [
        "key",
        "value"
      ],
      "properties": {
        "key": {
          "type": "string",
          "description": "Metadata key name."
        },
        "value": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "An array of string values associated with the metadata key. If the key already exists, its values will be overwritten. Setting the value to null will delete the metadata key-value pair."
        },
        "matchMode": {
          "anyOf": [
            {
              "enum": [
                "ANY",
                "ALL"
              ]
            },
            {}
          ],
          "description": "Match mode for the metadata key (ANY or ALL)."
        }
      }
    }
  }
}