{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://majesticcore.dev/schemas/libraryMovieItem.schema.json",
  "title": "LibraryMovieItem",
  "description": "Movie item in library response with editions array.",
  "type": "object",
  "required": [
    "movie_id",
    "title",
    "editions",
    "default_edition_index",
    "badge"
  ],
  "properties": {
    "movie_id": { "type": ["integer", "null"] },
    "title": { "type": "string" },
    "year": { "type": ["integer", "null"] },
    "poster_url": { "type": ["string", "null"] },
    "backdrop_url": { "type": ["string", "null"] },
    "overview": { "type": ["string", "null"] },
    "editions": {
      "type": "array",
      "items": { "$ref": "libraryEdition.schema.json" }
    },
    "default_edition_index": { "type": "integer" },
    "badge": {
      "type": "string",
      "enum": [
        "integrity_flagged",
        "missing",
        "analysis_failed",
        "not_supported",
        "not_analyzed",
        "playable",
        "on_disc"
      ]
    },
    "physical_copies": {
      "type": "array",
      "items": { "$ref": "physicalCopyInfo.schema.json" }
    },
    "cast_names": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Actor names for search. Populated from person_movie credits."
    },
    "director_names": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Director names for search. Populated from person_movie crew."
    },
    "has_digital_apple_tv": { "type": "boolean" },
    "has_digital_fandango": { "type": "boolean" }
  },
  "additionalProperties": false
}
