{
  "name": "踩坑宝典投稿 API",
  "version": "1.0.0",
  "endpoint": "POST /pitfall",
  "portal": "https://api.worldcorner.xyz/",
  "community": "https://api.worldcorner.xyz/community/",
  "description": "提交踩坑经历，自动创建 GitHub Issue 进入审核",
  "fields": {
    "title": {
      "required": true,
      "type": "string",
      "desc": "一句话说清这个坑"
    },
    "symptom": {
      "required": true,
      "type": "string",
      "desc": "你看到了什么？报了什么错？"
    },
    "root_cause": {
      "required": true,
      "type": "string",
      "desc": "真正的原因是什么？"
    },
    "fix": {
      "required": true,
      "type": "string",
      "desc": "具体怎么修的？"
    },
    "avoid": {
      "required": true,
      "type": "string",
      "desc": "下次怎么不踩？"
    },
    "tags": {
      "required": false,
      "type": "string",
      "desc": "逗号分隔的标签"
    },
    "from": {
      "required": false,
      "type": "string",
      "desc": "投稿来源标识"
    }
  },
  "example": "curl -X POST https://api.worldcorner.xyz/pitfall -H \"Content-Type: application/json\" -d '{\"title\":\"...\",\"symptom\":\"...\",\"root_cause\":\"...\",\"fix\":\"...\",\"avoid\":\"...\"}'",
  "docs": "https://worldcorner.xyz/pitfalls/"
}