{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://outliyr.com/apps/austin-events/events.schema.json",
  "title": "Outliyr Austin Events dataset",
  "description": "Public, read-only Austin-area event listings. Check updated_at and date_range before relying on a result.",
  "type": "object",
  "required": ["v", "count", "updated_at", "date_range", "events"],
  "properties": {
    "v": {"type": "integer", "const": 1},
    "count": {"type": "integer", "minimum": 0},
    "updated_at": {"type": "string", "description": "Pipeline-generated timestamp; use to assess freshness."},
    "date_range": {"type": "string"},
    "platforms": {"type": "array", "items": {"type": "string"}},
    "editors_picks": {"type": "array", "items": {"type": "object"}},
    "editors_picks_count": {"type": "integer", "minimum": 0},
    "events": {"type": "array", "items": {"$ref": "#/$defs/event"}}
  },
  "$defs": {
    "event": {
      "type": "object",
      "required": ["title", "date", "date_display", "time", "location", "city", "category", "tags", "cost", "is_free", "is_online", "link", "platform", "description", "lat", "lng", "distance_miles"],
      "properties": {
        "title": {"type": "string"},
        "date": {"type": "string", "format": "date"},
        "date_display": {"type": "string"},
        "time": {"type": "string"},
        "start_time_iso": {"type": "string", "format": "date-time"},
        "location": {"type": "string"},
        "city": {"type": "string"},
        "category": {"enum": ["health", "growth", "tech", "business", "music", "dance", "arts", "food", "outdoor", "comedy", "community", "family", "spiritual", "games"]},
        "tags": {"type": "array", "items": {"enum": ["biohacking", "longevity"]}, "uniqueItems": true},
        "cost": {"type": "string"},
        "is_free": {"type": "boolean"},
        "price_min": {"type": ["number", "null"], "minimum": 0},
        "is_online": {"type": "boolean"},
        "link": {"type": "string", "format": "uri"},
        "platform": {"type": "string"},
        "image_url": {"type": "string"},
        "description": {"type": "string"},
        "lat": {"type": "number", "minimum": -90, "maximum": 90},
        "lng": {"type": "number", "minimum": -180, "maximum": 180},
        "distance_miles": {"type": "number", "minimum": 0},
        "editors_pick": {"type": "boolean"},
        "pick_rank": {"type": ["integer", "null"], "minimum": 1},
        "pick_reasons": {"type": "array", "items": {"type": "string"}}
      },
      "additionalProperties": true
    }
  }
}
