{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bellatorsi-com/json-schema/bellatorsi-com-xer-import-request-schema.json",
  "title": "XerImportRequest",
  "description": "Request model for POST /api/v1/import/xer.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bellatorsi-com-import-api-openapi.yml#/components/schemas/XerImportRequest",
  "properties": {
    "file_content": {
      "type": "string",
      "title": "File Content",
      "description": "P6 XER file content (text, any encoding — auto-detected)"
    },
    "options": {
      "$ref": "#/$defs/XerImportOptions"
    }
  },
  "type": "object",
  "required": [
    "file_content"
  ],
  "$defs": {
    "XerImportOptions": {
      "properties": {
        "project_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Project Id",
          "description": "Select a specific project from a multi-project XER. Required if XER contains more than one project."
        },
        "strict_validation": {
          "type": "boolean",
          "title": "Strict Validation",
          "default": true
        },
        "auto_detect_start_finish": {
          "type": "boolean",
          "title": "Auto Detect Start Finish",
          "default": true
        },
        "auto_classify_task_types": {
          "type": "boolean",
          "title": "Auto Classify Task Types",
          "default": true
        },
        "use_prefix_classification": {
          "type": "boolean",
          "title": "Use Prefix Classification",
          "description": "Detect task type from name prefix (e.g., 'SM-Buffer', 'PP-FuturePh3', 'AE-Engineering'). Fires only when native P6 task_type is not already set. See Import API Common Patterns § Prefix Classification.",
          "default": true
        },
        "include_warnings": {
          "type": "boolean",
          "title": "Include Warnings",
          "default": true
        },
        "use_activity_id": {
          "type": "boolean",
          "title": "Use Activity Id",
          "description": "Use task_code (Activity ID) as task id instead of numeric task_id.",
          "default": false
        }
      },
      "type": "object",
      "title": "XerImportOptions",
      "description": "Options controlling P6 XER import behavior."
    }
  }
}