{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/insightgenius-io/json-schema/insightgenius-io-body-metadata-v1-metadata-post-schema.json",
  "title": "Body_metadata_v1_metadata_post",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/insightgenius-io-openapi.json#/components/schemas/Body_metadata_v1_metadata_post",
  "properties": {
    "file": {
      "type": "string",
      "contentMediaType": "application/octet-stream",
      "title": "File",
      "description": "SPSS .sav file (or use file_id)"
    },
    "file_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "File Id",
      "description": "File session ID from /v1/library/upload"
    },
    "label_overrides": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Label Overrides",
      "description": "Optional JSON: {\"P5D\": {\"1\": \"Pantene\", \"2\": \"Sedal\"}}"
    },
    "include_families": {
      "type": "boolean",
      "title": "Include Families",
      "description": "Incluye el tipo de familia (dossier semántico) por columna — I334",
      "default": false
    },
    "preparation": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Preparation",
      "description": "Source-bound preparation used by the tabulation engine"
    },
    "include_reading": {
      "type": "boolean",
      "title": "Include Reading",
      "description": "Incluye la lectura del archivo para revisarla antes de tabular: escalas, códigos especiales, títulos y «Otro» (24-oct-2026). Exige include_families.",
      "default": false
    },
    "reading_flags": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reading Flags",
      "description": "JSON con las banderas del libro que cambian la lectura: {\"correctness_fixes_v1\": true, \"special_codes_in_base\": true, \"platform_labels_v1\": true, \"platform_titles_v1\": true, \"blank_text_empty_v1\": true, \"special_codes_by_analyst_v1\": true, \"scale_rungs_v2\": true}"
    },
    "book_language": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Book Language",
      "description": "Idioma del libro (es/en/pt/fr/de/nl/it) para las palabras que escribe el motor"
    },
    "declared_families": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Declared Families",
      "description": "JSON con las familias del diseño: {\"code_frame_groups\": {...}, \"mrs_groups\": {...}, \"grid_groups\": {...}} (mismo formato que /v1/tabulate). Con él, las familias y la lectura del archivo se arman sobre lo declarado, igual que el libro con declared_families_v1 (29-oct-2026). Exige include_families."
    }
  },
  "type": "object"
}