{
  "openapi": "3.0.3",
  "info": {
    "title": "Spin My Day API",
    "version": "1.0.0",
    "description": "Spin up a full day out (morning, lunch, afternoon, dinner, evening) around the weather and what is open, in a city, near a location, or in a random city.",
    "contact": {
      "email": "hello@askmizan.com"
    }
  },
  "servers": [
    {
      "url": "https://spinmyday.pages.dev/v1"
    }
  ],
  "paths": {
    "/spin": {
      "get": {
        "operationId": "spinMyDay",
        "summary": "Build a day out. Leave out city and location to spin for a random city.",
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Austin, Texas"
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "lon",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "vibe",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "chill",
                "adventure",
                "date",
                "family",
                "culture",
                "foodie"
              ]
            }
          },
          {
            "name": "budget",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "free"
              ]
            }
          },
          {
            "name": "halal",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Prefer halal food"
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "seed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Repeat a spin exactly; each answer includes a spin_again link with a new seed"
          }
        ],
        "responses": {
          "200": {
            "description": "A day plan with weather, a spoken summary (say) and map links"
          },
          "400": {
            "description": "Invalid option"
          },
          "404": {
            "description": "Place not found or too few places"
          },
          "503": {
            "description": "A data source is not answering"
          }
        }
      }
    },
    "/vibes": {
      "get": {
        "operationId": "listVibes",
        "summary": "The vibes you can ask for",
        "responses": {
          "200": {
            "description": "Vibes"
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Service status",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  }
}