{
  "openapi": "3.0.0",
  "info": {
    "title": "小雨万能助手",
    "description": "9个实用AI工具：合同审查、租赁审查、AI面试官、合同生成、小红书文案、翻译、天气、物品识别、简历优化。装一个顶九个。",
    "version": "1.1.0"
  },
  "servers": [
    {
      "url": "https://specialized-publisher-trails-spot.trycloudflare.com",
      "description": "小雨 AI 插件服务"
    }
  ],
  "paths": {
    "/analyze/contract": {
      "post": {
        "summary": "合同审查",
        "description": "审查劳动合同、合作协议、采购合同等，识别风险条款并给出修改建议",
        "operationId": "analyzeContract",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["contract_text"],
                "properties": {
                  "contract_text": {"type": "string", "description": "合同全文", "minLength": 10},
                  "contract_type": {"type": "string", "description": "auto/employment/cooperation/procurement/service", "default": "auto"}
                }
              }
            }
          }
        },
        "responses": {"200": {"description": "审查完成"}}
      }
    },
    "/analyze/lease": {
      "post": {
        "summary": "租赁合同审查",
        "description": "审查租房/商铺租赁合同，重点检查押金、维修、解约条款",
        "operationId": "analyzeLease",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["contract_text"],
                "properties": {
                  "contract_text": {"type": "string", "description": "租赁合同全文", "minLength": 10},
                  "property_type": {"type": "string", "description": "住宅/商铺/办公/厂房", "default": "住宅"}
                }
              }
            }
          }
        },
        "responses": {"200": {"description": "审查完成"}}
      }
    },
    "/analyze/translate": {
      "post": {
        "summary": "文档翻译",
        "description": "中英日韩互译",
        "operationId": "translateText",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["text"],
                "properties": {
                  "text": {"type": "string", "description": "要翻译的文本"},
                  "target_lang": {"type": "string", "description": "zh中文/en英文/ja日文/ko韩文", "default": "zh"}
                }
              }
            }
          }
        },
        "responses": {"200": {"description": "翻译完成"}}
      }
    },
    "/weather": {
      "get": {
        "summary": "天气查询",
        "description": "查询任意城市的实时天气",
        "operationId": "getWeather",
        "parameters": [{"name": "city", "in": "query", "required": true, "schema": {"type": "string"}, "description": "城市名"}],
        "responses": {"200": {"description": "天气信息"}}
      }
    },
    "/identify": {
      "post": {
        "summary": "物品识别",
        "description": "上传照片识别物体，返回名称+趣味冷知识",
        "operationId": "identifyObject",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["image_base64"],
                "properties": {
                  "image_base64": {"type": "string", "description": "图片base64编码（JPEG格式）"}
                }
              }
            }
          }
        },
        "responses": {"200": {"description": "识别结果"}}
      }
    },
    "/analyze/resume": {
      "post": {
        "summary": "简历优化",
        "description": "分析简历内容，给出优化建议",
        "operationId": "analyzeResume",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["resume_text"],
                "properties": {
                  "resume_text": {"type": "string", "description": "简历全文", "minLength": 20},
                  "target_position": {"type": "string", "description": "目标岗位（选填）"}
                }
              }
            }
          }
        },
        "responses": {"200": {"description": "优化建议"}}
      }
    },
    "/analyze/interview": {
      "post": {
        "summary": "AI面试官",
        "description": "模拟面试：输入岗位，AI出题并给反馈。求职者必备。",
        "operationId": "aiInterview",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["position"],
                "properties": {
                  "position": {"type": "string", "description": "目标岗位，如Java开发/产品经理/销售主管"},
                  "experience": {"type": "string", "description": "工作经验年限", "default": "3年"},
                  "skills": {"type": "string", "description": "技能关键词，逗号分隔（选填）"},
                  "interview_type": {"type": "string", "description": "技术/业务/HR/综合", "default": "技术"}
                }
              }
            }
          }
        },
        "responses": {"200": {"description": "面试题+反馈"}}
      }
    },
    "/generate/contract": {
      "post": {
        "summary": "合同生成",
        "description": "输入需求生成标准合同文本。支持劳动合同/租赁/合作协议/保密协议等。",
        "operationId": "generateContract",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["contract_type", "requirements"],
                "properties": {
                  "contract_type": {"type": "string", "description": "劳动合同/租赁合同/合作协议/保密协议/服务合同"},
                  "requirements": {"type": "string", "description": "具体需求，如'月薪1万，试用期2个月'"}
                }
              }
            }
          }
        },
        "responses": {"200": {"description": "生成的合同文本"}}
      }
    },
    "/analyze/xiaohongshu": {
      "post": {
        "summary": "小红书文案生成",
        "description": "把原文转化为小红书爆款文案风格，含标题+正文+标签+互动引导",
        "operationId": "xiaohongshuCopy",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["content"],
                "properties": {
                  "content": {"type": "string", "description": "原始内容（文章/产品介绍/想法）", "minLength": 10},
                  "style": {"type": "string", "description": "种草/测评/教程/故事/Vlog文案", "default": "种草"},
                  "target_audience": {"type": "string", "description": "通用/学生/职场/宝妈/美妆", "default": "通用"}
                }
              }
            }
          }
        },
        "responses": {"200": {"description": "小红书文案"}}
      }
    },
    "/health": {
      "get": {
        "summary": "健康检查",
        "operationId": "health",
        "responses": {"200": {"description": "服务正常"}}
      }
    }
  }
}
