{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bellatorsi-com/json-schema/bellatorsi-com-mpp-import-request-schema.json",
  "title": "MppImportRequest",
  "description": "Request model for POST /api/v1/import/mpp.",
  "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/MppImportRequest",
  "properties": {
    "file_content": {
      "type": "string",
      "title": "File Content",
      "description": "MS Project XML file content (UTF-8 encoded text)"
    },
    "options": {
      "$ref": "#/$defs/MppImportOptions"
    }
  },
  "type": "object",
  "required": [
    "file_content"
  ],
  "$defs": {
    "MppImportOptions": {
      "properties": {
        "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', 'LOE-Support', 'PP-Futurework', 'AE-Engineering'). Fires only when native type is not already set. See Import API Common Patterns § Prefix Classification.",
          "default": true
        },
        "include_warnings": {
          "type": "boolean",
          "title": "Include Warnings",
          "default": true
        },
        "preserve_task_ids": {
          "type": "boolean",
          "title": "Preserve Task Ids",
          "default": true
        },
        "baseline_index": {
          "type": "integer",
          "maximum": 10.0,
          "minimum": -1.0,
          "title": "Baseline Index",
          "description": "Which baseline to import: 0 = Baseline, 1-10 = Baseline1-Baseline10, -1 = skip baseline import.",
          "default": 0
        },
        "percent_complete_source": {
          "type": "string",
          "title": "Percent Complete Source",
          "description": "Which MSP percent complete field to map to percent_complete. Options: 'auto' (resource-aware: PercentWorkComplete for resourced tasks, PercentComplete for unresourced), 'duration' (always PercentComplete), 'work' (always PercentWorkComplete), 'physical' (PhysicalPercentComplete). PhysicalPercentComplete is always captured in physical_percent_complete regardless of this setting.",
          "default": "auto"
        },
        "wbs_field_priority": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Wbs Field Priority",
          "description": "Ordered list of custom field aliases to check as the source for wbs_code. First alias found in the project definition AND having a non-empty task value wins. Falls back to native <WBS> element if none match. Case-insensitive alias match. Set to [] to always use only the native <WBS> element."
        },
        "obs_field_priority": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Obs Field Priority",
          "description": "Ordered list of custom field aliases to check as the source for organization_code. First alias with a non-empty task value wins. No native fallback — organization_code remains null if no alias matches. Set to [] to skip OBS extraction entirely."
        }
      },
      "type": "object",
      "title": "MppImportOptions",
      "description": "Options controlling MS Project XML import behavior."
    }
  }
}