{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://feedmesports.com/schemas/v1/slate.schema.json",
  "title": "FeedMeSportsSlateV1",
  "type": "object",
  "required": ["version", "season", "week", "league", "status", "lockCutoffTime", "games"],
  "properties": {
    "version": { "type": "string", "const": "v1" },
    "season": { "type": "integer", "example": 2024 },
    "week": { "type": "integer", "minimum": 1, "maximum": 22 },
    "league": { "type": "string", "enum": ["NFL"] },
    "status": { "type": "string", "enum": ["open", "locked", "final"] },
    "lockCutoffTime": { "type": "string", "format": "date-time" },
    "games": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "season", "week", "homeTeam", "awayTeam", "spread", "overUnder", "kickoffTime", "status"],
        "properties": {
          "id": { "type": "string" },
          "season": { "type": "integer" },
          "week": { "type": "integer" },
          "league": { "type": "string" },
          "homeTeam": { "type": "string" },
          "awayTeam": { "type": "string" },
          "spread": { "type": "number", "description": "Spread relative to homeTeam (negative means homeTeam favored)" },
          "overUnder": { "type": "number" },
          "kickoffTime": { "type": "string", "format": "date-time" },
          "status": { "type": "string", "enum": ["open", "locked", "final"] },
          "homeScore": { "type": ["integer", "null"] },
          "awayScore": { "type": ["integer", "null"] },
          "legalOptions": {
            "type": "object",
            "properties": {
              "SU": { "type": "array", "items": { "type": "string" } },
              "ATS": { "type": "array", "items": { "type": "string" } },
              "O/U": { "type": "array", "items": { "type": "string", "enum": ["OVER", "UNDER"] } }
            }
          }
        }
      }
    }
  }
}
