{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cm-com/json-schema/cm-com-config-schema.json",
  "title": "Config",
  "description": "The configuration.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cm-com-configuration-api-openapi.yml#/components/schemas/Config",
  "type": "object",
  "properties": {
    "documentScan": {
      "$ref": "#/$defs/DocumentScanConfig"
    }
  },
  "$defs": {
    "DocumentScanConfig": {
      "type": "object",
      "description": "Configuration applied to document scan tasks.",
      "properties": {
        "imageQualityChecks": {
          "$ref": "#/$defs/ImageQualityChecks"
        }
      }
    },
    "ImageQualityChecks": {
      "type": "object",
      "description": "The individual image quality checks. A check is only enforced when set to `true`; all checks are disabled by default.",
      "properties": {
        "glare": {
          "type": "boolean",
          "description": "Checks for the presence of glare on the document image.",
          "default": false
        },
        "focus": {
          "type": "boolean",
          "description": "Checks whether the document image is in focus.",
          "default": false
        },
        "resolution": {
          "type": "boolean",
          "description": "Checks whether the document image has a low resolution.",
          "default": false
        },
        "color": {
          "type": "boolean",
          "description": "Checks whether the image is colorless, for example a black-and-white scan or photocopy.",
          "default": false
        },
        "perspective": {
          "type": "boolean",
          "description": "Checks whether the document in the image has perspective distortion.",
          "default": false
        },
        "bounds": {
          "type": "boolean",
          "description": "Checks whether the document is fully present in the image.",
          "default": false
        },
        "moire": {
          "type": "boolean",
          "description": "Checks for moiré patterns, which indicate the image is a screen capture instead of a physical document.",
          "default": false
        },
        "portrait": {
          "type": "boolean",
          "description": "Checks whether the portrait is present on the document.",
          "default": false
        },
        "handwritten": {
          "type": "boolean",
          "description": "Checks whether the document contains handwritten text in the scanned fields.",
          "default": false
        },
        "brightness": {
          "type": "boolean",
          "description": "Checks whether the document image is bright enough.",
          "default": false
        },
        "occlusion": {
          "type": "boolean",
          "description": "Checks whether part of the document is occluded in the image.",
          "default": false
        }
      }
    }
  }
}