{
  "openapi": "3.1.0",
  "info": {
    "title": "What to Wear API",
    "version": "1.0.0",
    "description": "Weather-aware clothing recommendations and packing lists.",
    "contact": {
      "url": "https://www.whattowear.ca"
    }
  },
  "servers": [
    {
      "url": "https://api.whattowear.ca"
    }
  ],
  "paths": {
    "/weather": {
      "get": {
        "operationId": "getWeather",
        "summary": "Current weather + 7-day forecast for a city.",
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "City name (e.g. \"Paris\"). Resolved via Open-Meteo geocoding."
          },
          {
            "name": "lat",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "description": "Latitude (alt to city)."
          },
          {
            "name": "lon",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "description": "Longitude (alt to city)."
          },
          {
            "name": "units",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "metric",
                "imperial"
              ],
              "default": "metric"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/recommend": {
      "get": {
        "operationId": "recommendOutfit",
        "summary": "Outfit recommendation for a city, day, and time of day.",
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "City name (e.g. \"Paris\"). Resolved via Open-Meteo geocoding."
          },
          {
            "name": "lat",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "description": "Latitude (alt to city)."
          },
          {
            "name": "lon",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "description": "Longitude (alt to city)."
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Forecast date (YYYY-MM-DD). Defaults to today."
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "night"
              ]
            },
            "description": "Daytime (9am–7pm) or evening (8pm–6am)."
          },
          {
            "name": "style",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "casual",
                "business",
                "outdoor"
              ],
              "default": "casual"
            }
          },
          {
            "name": "gender",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "neutral",
                "masc",
                "femme"
              ],
              "default": "neutral"
            }
          },
          {
            "name": "tempPref",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "cold",
                "normal",
                "warm"
              ],
              "default": "normal"
            }
          },
          {
            "name": "units",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "metric",
                "imperial"
              ],
              "default": "metric"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/pack": {
      "get": {
        "operationId": "recommendPacking",
        "summary": "Packing list for a date range. Multi-city supported.",
        "parameters": [
          {
            "name": "cities",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated city names, e.g. \"Paris,Tokyo\"."
          },
          {
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "City name (e.g. \"Paris\"). Resolved via Open-Meteo geocoding."
          },
          {
            "name": "start",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "style",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "casual",
                "business",
                "outdoor"
              ],
              "default": "casual"
            }
          },
          {
            "name": "tempPref",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "cold",
                "normal",
                "warm"
              ],
              "default": "normal"
            }
          },
          {
            "name": "units",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "metric",
                "imperial"
              ],
              "default": "metric"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/compare": {
      "get": {
        "operationId": "compareCities",
        "summary": "Compare current conditions + outfit across multiple cities.",
        "parameters": [
          {
            "name": "cities",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated city names."
          },
          {
            "name": "style",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "casual",
                "business",
                "outdoor"
              ],
              "default": "casual"
            }
          },
          {
            "name": "tempPref",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "cold",
                "normal",
                "warm"
              ],
              "default": "normal"
            }
          },
          {
            "name": "units",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "metric",
                "imperial"
              ],
              "default": "metric"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  }
}