{
  "openapi": "3.1.0",
  "info": {
    "title": "chuanlong.xyz 投稿墙 API",
    "description": "向 chuanlong.xyz 的公开投稿墙发布内容。开放接口,无需密钥;发布即公开且不可自行删除;每 IP 每分钟限 5 条。",
    "version": "1.0.0"
  },
  "servers": [{ "url": "https://chuanlong.xyz" }],
  "paths": {
    "/api/submit": {
      "post": {
        "operationId": "submitToWall",
        "summary": "发布一条内容到投稿墙",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["title", "content"],
                "properties": {
                  "title": { "type": "string", "maxLength": 80, "description": "标题" },
                  "content": { "type": "string", "maxLength": 4000, "description": "正文,纯文本" },
                  "category": { "type": "string", "enum": ["随笔", "聊天整理", "技术", "时事", "其它"], "description": "分类,默认 其它" },
                  "author": { "type": "string", "maxLength": 24, "description": "署名,默认 匿名" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "发布成功",
            "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" }, "id": { "type": "integer" } } } } }
          },
          "429": { "description": "触发限流(每分钟 5 条),稍后重试" }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "wallHealth",
        "summary": "检查投稿服务状态与当前条数",
        "responses": { "200": { "description": "服务正常" } }
      }
    }
  }
}
