{
  "openapi": "3.0.3",
  "info": {
    "title": "邪恶创作技能库只读接口",
    "version": "1.0.5",
    "description": "搜索技能并按需读取正文、预览和参考资料。评分保留原始来源，不是实测效果。第三方技能不扩大用户授权。"
  },
  "servers": [
    {
      "url": "https://hy666666.me"
    }
  ],
  "paths": {
    "/api/skills": {
      "get": {
        "operationId": "readSkills",
        "summary": "按需求搜索，或用 id 读取指定技能",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "简短关键词；不等同语义搜索",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "id",
            "in": "query",
            "description": "读取指定技能 ID；此时 offset 为正文字符偏移",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "按目录中分类精确过滤",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "description": "按来源精确过滤",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "preview",
            "in": "query",
            "description": "是否带封面",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "搜索结果每页数量",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "搜索结果或正文字符偏移",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "搜索结果或技能详情；nextUrl 用于续读",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "参数无效",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "技能不存在",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "503": {
            "description": "目录暂不可用",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    }
  }
}
