{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/IndexingPolicy",
  "title": "IndexingPolicy",
  "type": "object",
  "description": "The indexing policy for a container.",
  "properties": {
    "automatic": {
      "type": "boolean",
      "default": true,
      "description": "Whether indexing is automatic.",
      "example": true
    },
    "indexingMode": {
      "type": "string",
      "enum": [
        "consistent",
        "lazy",
        "none"
      ],
      "default": "consistent",
      "description": "The indexing mode.",
      "example": "consistent"
    },
    "includedPaths": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "The path to be indexed."
          }
        }
      },
      "description": "Paths to include in indexing.",
      "example": []
    },
    "excludedPaths": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "The path to be excluded from indexing."
          }
        }
      },
      "description": "Paths to exclude from indexing.",
      "example": []
    },
    "compositeIndexes": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "order": {
              "type": "string",
              "enum": [
                "ascending",
                "descending"
              ]
            }
          }
        }
      },
      "description": "Composite indexes for the container.",
      "example": []
    },
    "spatialIndexes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Point",
                "Polygon",
                "MultiPolygon",
                "LineString"
              ]
            }
          }
        }
      },
      "description": "Spatial indexes for the container.",
      "example": []
    }
  }
}