{
  "openapi": "3.1.0",
  "info": {
    "title": "Alberta Travel Agent API",
    "version": "1.0.0",
    "description": "Agent-friendly read API for destinations, itineraries, guides, practical info, and search."
  },
  "servers": [
    { "url": "https://www.albertatravel.net" },
    { "url": "http://localhost:4321" }
  ],
  "paths": {
    "/api/agent/health": {
      "get": { "summary": "Service health", "responses": { "200": { "description": "OK" } } }
    },
    "/api/agent/context": {
      "get": {
        "summary": "One-call knowledge bundle",
        "parameters": [{ "name": "lang", "in": "query", "schema": { "type": "string", "enum": ["zh", "en"] } }],
        "responses": { "200": { "description": "Context bundle" } }
      }
    },
    "/api/agent/search": {
      "get": {
        "summary": "Unified semantic-lite search",
        "parameters": [
          { "name": "q", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "lang", "in": "query", "schema": { "type": "string", "enum": ["zh", "en"] } }
        ],
        "responses": { "200": { "description": "Search results" }, "400": { "description": "Missing query" } }
      }
    },
    "/api/agent/destinations": {
      "get": {
        "summary": "List/filter destinations",
        "parameters": [
          { "name": "lang", "in": "query", "schema": { "type": "string", "enum": ["zh", "en"] } },
          { "name": "season", "in": "query", "schema": { "type": "string", "enum": ["spring", "summer", "fall", "winter"] } },
          { "name": "q", "in": "query", "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Destination list" } }
      }
    },
    "/api/agent/itineraries": {
      "get": {
        "summary": "List/filter itineraries",
        "parameters": [
          { "name": "lang", "in": "query", "schema": { "type": "string", "enum": ["zh", "en"] } },
          { "name": "days", "in": "query", "schema": { "type": "integer" } },
          { "name": "season", "in": "query", "schema": { "type": "string" } },
          { "name": "style", "in": "query", "schema": { "type": "string" } },
          { "name": "budget", "in": "query", "schema": { "type": "string", "enum": ["mid", "mid_high", "high"] } },
          { "name": "start_city", "in": "query", "schema": { "type": "string" } },
          { "name": "q", "in": "query", "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Itinerary list" } }
      }
    },
    "/api/agent/guides": {
      "get": {
        "summary": "List/filter guides",
        "parameters": [
          { "name": "lang", "in": "query", "schema": { "type": "string", "enum": ["zh", "en"] } },
          { "name": "category", "in": "query", "schema": { "type": "string" } },
          { "name": "tag", "in": "query", "schema": { "type": "string" } },
          { "name": "q", "in": "query", "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Guide list" } }
      }
    },
    "/api/agent/practical": {
      "get": {
        "summary": "Practical playbooks",
        "parameters": [
          { "name": "lang", "in": "query", "schema": { "type": "string", "enum": ["zh", "en"] } },
          { "name": "topic", "in": "query", "schema": { "type": "string", "enum": ["weather", "transportation", "budget", "accommodation"] } }
        ],
        "responses": { "200": { "description": "Practical info" } }
      }
    },
    "/api/contact": {
      "post": {
        "summary": "Create contact inquiry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "email", "phone", "travel_type"],
                "properties": {
                  "name": { "type": "string" },
                  "email": { "type": "string" },
                  "phone": { "type": "string" },
                  "travel_type": { "type": "string" },
                  "message": { "type": "string" }
                }
              }
            }
          }
        },
        "responses": { "200": { "description": "Saved" }, "400": { "description": "Validation error" }, "500": { "description": "Server error" } }
      }
    }
  }
}
