{"openapi":"3.1.0","info":{"title":"open-piste","version":"0.1.0","description":"Open dataset of real-time French ski resort conditions — lift status, piste status, grooming, weather, snow depth, and road access. Data licensed CC BY 4.0: credit 'open-piste (https://open-piste.raed.dev), original data from Lumiplan resort bulletins'.","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"}},"servers":[{"url":"https://open-piste.raed.dev"}],"components":{"schemas":{"ResortSummary":{"type":"object","properties":{"slug":{"type":"string","example":"val-thorens"},"name":{"type":"string","example":"Val Thorens"},"region":{"type":"string","enum":["alpes","pyrenees","vosges","jura","massif-central","andorra"]},"country":{"type":"string","enum":["fr","it","ad","ch"]},"lifts_open":{"type":"integer","nullable":true},"lifts_total":{"type":"integer","nullable":true},"pistes_open":{"type":"integer","nullable":true},"pistes_total":{"type":"integer","nullable":true},"base_snow_depth_cm":{"type":"integer","nullable":true},"summit_snow_depth_cm":{"type":"integer","nullable":true},"avalanche_risk":{"type":"integer","nullable":true,"minimum":1,"maximum":5},"updated_at":{"type":"string","nullable":true,"format":"date-time"},"season_open":{"type":"string","nullable":true,"format":"date","example":"2025-12-06"},"season_close":{"type":"string","nullable":true,"format":"date","example":"2026-04-19"},"is_open":{"type":"boolean","description":"Ski terrain is open. Lifts alone do not count: sightseeing gondolas run outside the season."},"in_season":{"type":"boolean","description":"Today falls inside the published season dates, or December to April when the resort has none."}},"required":["slug","name","region","country","lifts_open","lifts_total","pistes_open","pistes_total","base_snow_depth_cm","summit_snow_depth_cm","avalanche_risk","updated_at","season_open","season_close","is_open","in_season"]},"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"ResortDetail":{"type":"object","properties":{"slug":{"type":"string"},"season_open":{"type":"string","nullable":true,"format":"date"},"season_close":{"type":"string","nullable":true,"format":"date"},"is_open":{"type":"boolean","description":"Ski terrain is open. Lifts alone do not count: sightseeing gondolas run outside the season."},"in_season":{"type":"boolean","description":"Today falls inside the published season dates, or December to April when the resort has none."},"weather_updated_at":{"type":"string","nullable":true,"format":"date-time"},"lifts_updated_at":{"type":"string","nullable":true,"format":"date-time"},"pistes_updated_at":{"type":"string","nullable":true,"format":"date-time"},"weather":{"$ref":"#/components/schemas/Weather"},"lifts":{"type":"array","items":{"$ref":"#/components/schemas/Lift"}},"pistes":{"type":"array","items":{"$ref":"#/components/schemas/Piste"}}},"required":["slug","season_open","season_close","is_open","in_season","weather_updated_at","lifts_updated_at","pistes_updated_at","weather","lifts","pistes"]},"Weather":{"type":"object","properties":{"base_elevation_m":{"type":"integer","nullable":true},"base_snow_depth_cm":{"type":"integer","nullable":true},"base_snow_quality":{"type":"string","nullable":true},"base_fresh_snow_cm":{"type":"integer","nullable":true},"base_fresh_snow_date":{"type":"string","nullable":true},"base_temp_morning_c":{"type":"number","nullable":true},"base_temp_afternoon_c":{"type":"number","nullable":true},"summit_elevation_m":{"type":"integer","nullable":true},"summit_snow_depth_cm":{"type":"integer","nullable":true},"summit_snow_quality":{"type":"string","nullable":true},"summit_fresh_snow_cm":{"type":"integer","nullable":true},"summit_fresh_snow_date":{"type":"string","nullable":true},"summit_temp_morning_c":{"type":"number","nullable":true},"summit_temp_afternoon_c":{"type":"number","nullable":true},"wind_speed_kmh":{"type":"integer","nullable":true},"wind_direction":{"type":"string","nullable":true},"windchill_c":{"type":"number","nullable":true},"avalanche_risk":{"type":"integer","nullable":true,"minimum":1,"maximum":5},"lifts_open":{"type":"integer","nullable":true},"lifts_total":{"type":"integer","nullable":true},"pistes_open":{"type":"integer","nullable":true},"pistes_total":{"type":"integer","nullable":true},"green_open":{"type":"integer","nullable":true},"green_total":{"type":"integer","nullable":true},"blue_open":{"type":"integer","nullable":true},"blue_total":{"type":"integer","nullable":true},"red_open":{"type":"integer","nullable":true},"red_total":{"type":"integer","nullable":true},"black_open":{"type":"integer","nullable":true},"black_total":{"type":"integer","nullable":true},"updated_at":{"type":"string","nullable":true,"format":"date-time"}},"required":["base_elevation_m","base_snow_depth_cm","base_snow_quality","base_fresh_snow_cm","base_fresh_snow_date","base_temp_morning_c","base_temp_afternoon_c","summit_elevation_m","summit_snow_depth_cm","summit_snow_quality","summit_fresh_snow_cm","summit_fresh_snow_date","summit_temp_morning_c","summit_temp_afternoon_c","wind_speed_kmh","wind_direction","windchill_c","avalanche_risk","lifts_open","lifts_total","pistes_open","pistes_total","green_open","green_total","blue_open","blue_total","red_open","red_total","black_open","black_total","updated_at"]},"Lift":{"type":"object","properties":{"name":{"type":"string","example":"TC MERCANTOUR"},"sector":{"type":"string","nullable":true,"example":"PELEVOS"},"lift_type":{"type":"string","nullable":true,"enum":["gondola","detachable_chairlift","chairlift","surface_lift","magic_carpet","funicular","cable_car","train","elevator","unknown",null]},"status":{"type":"string","enum":["open","scheduled","delayed","on_hold","closed","out_of_period","unknown"]},"opening_time":{"type":"string","nullable":true,"example":"09:00"},"closing_time":{"type":"string","nullable":true,"example":"16:30"},"updated_at":{"type":"string","format":"date-time"}},"required":["name","sector","lift_type","status","opening_time","closing_time","updated_at"]},"Piste":{"type":"object","properties":{"name":{"type":"string","example":"BOULEVARD"},"sector":{"type":"string","nullable":true},"difficulty":{"type":"string","nullable":true,"enum":["green","blue","red","black",null]},"activity_type":{"type":"string","nullable":true,"enum":["downhill","snowpark","boardercross","sledge","cross_country","snowshoe","ski_touring","panoramic","snowmobile","pedestrian","other",null]},"status":{"type":"string","enum":["open","scheduled","delayed","on_hold","closed","out_of_period","unknown"]},"grooming":{"type":"string","nullable":true,"enum":["groomed","not_groomed","partially_groomed","groomed_morning","groomed_evening","groomed_48h","forecast","unknown",null]},"opening_time":{"type":"string","nullable":true},"closing_time":{"type":"string","nullable":true},"updated_at":{"type":"string","format":"date-time"}},"required":["name","sector","difficulty","activity_type","status","grooming","opening_time","closing_time","updated_at"]},"Health":{"type":"object","properties":{"status":{"type":"string","enum":["ok","stale"]},"stale":{"type":"boolean"},"resorts":{"type":"integer"},"lifts":{"type":"integer"},"pistes":{"type":"integer"},"resortsWithData":{"type":"object","properties":{"weather":{"type":"integer"},"lifts":{"type":"integer"},"pistes":{"type":"integer"}},"required":["weather","lifts","pistes"]},"lastSuccessfulScrape":{"type":"string","nullable":true,"format":"date-time"}},"required":["status","stale","resorts","lifts","pistes","resortsWithData","lastSuccessfulScrape"]}},"parameters":{}},"paths":{"/resorts":{"get":{"summary":"List all resorts with latest weather summary","operationId":"listResorts","responses":{"200":{"description":"List of resorts","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResortSummary"}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/resorts/{slug}":{"get":{"summary":"Current state for one resort","operationId":"getResort","parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9-]{1,64}$","example":"val-thorens"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Full current state — weather, lifts, pistes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResortDetail"}}}},"404":{"description":"Unknown resort, or no data scraped for it yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/health":{"get":{"summary":"Health check","operationId":"healthCheck","responses":{"200":{"description":"Service status and data coverage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Last successful scrape is more than 9 hours old","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}}}}