{
  "openapi": "3.0.3",
  "info": {
    "title": "MLTech 美樂信 API",
    "description": "MLTech 美樂信 AI 數位轉型顧問公司 API — 提供聯絡諮詢、AI 工具列表查詢等功能。",
    "version": "1.0.0",
    "contact": { "name": "MLTech 美樂信", "url": "https://www.mltech.tw", "email": "service@mltech.tw" },
    "license": { "name": "MIT" },
    "x-logo": { "url": "https://www.mltech.tw/logo.png", "altText": "MLTech 美樂信" }
  },
  "servers": [{ "url": "https://www.mltech.tw/api", "description": "Production" }],
  "paths": {
    "/contact": {
      "post": {
        "summary": "提交聯絡諮詢",
        "description": "提交免費 AI 導入諮詢申請。",
        "operationId": "submitContact",
        "tags": ["contact"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "email", "message"],
                "properties": {
                  "name": { "type": "string", "description": "姓名" },
                  "email": { "type": "string", "format": "email", "description": "電子郵件" },
                  "company": { "type": "string", "description": "公司名稱" },
                  "message": { "type": "string", "description": "諮詢內容" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "諮詢申請已接收" },
          "400": { "description": "請求參數錯誤" }
        }
      }
    },
    "/tools": {
      "get": {
        "summary": "取得 AI 工具列表",
        "description": "取得 MLTech 免費 AI 工具列表，包含分類與描述。",
        "operationId": "listTools",
        "tags": ["tools"],
        "parameters": [
          { "name": "category", "in": "query", "description": "工具分類", "schema": { "type": "string" } },
          { "name": "lang", "in": "query", "description": "語言 (zh-TW or en)", "schema": { "type": "string", "enum": ["zh-TW", "en"] } }
        ],
        "responses": {
          "200": {
            "description": "工具列表",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": { "type": "string" },
                      "name": { "type": "string" },
                      "category": { "type": "string" },
                      "description": { "type": "string" }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    { "name": "contact", "description": "聯絡諮詢相關 API" },
    { "name": "tools", "description": "AI 工具相關 API" }
  ]
}
