{
  "openapi": "3.0.3",
  "info": {
    "title": "VWCG-1239 下载接口安全增量契约",
    "version": "2026-08-18"
  },
  "paths": {
    "/p/download/zip": {
      "get": {
        "summary": "安全下载附件",
        "description": "仅允许已登录PC后台用户下载 public/static/upload 目录内的普通文件。支持单文件 file_array=path 和批量 file_array[index]=path；任一批量项非法时整体拒绝。",
        "tags": [
          "PC端/进销存/供应商库"
        ],
        "x-apifox-folder": "PC端/进销存/供应商库",
        "security": [
          {
            "pcCookieAuth": []
          }
        ],
        "parameters": [
          {
            "name": "file_array",
            "in": "query",
            "required": true,
            "description": "允许 static/upload/... 相对路径；批量使用 file_array[index]，最多50项。",
            "schema": {
              "oneOf": [
                {
                  "type": "string",
                  "example": "static/upload/material/example.pdf"
                },
                {
                  "type": "array",
                  "maxItems": 50,
                  "items": {
                    "type": "string"
                  }
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功返回文件流；认证或参数失败时沿用现有JSON业务码。",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 1
                    },
                    "message": {
                      "type": "string",
                      "example": "文件路径不合法"
                    },
                    "data": {
                      "type": "array",
                      "items": {}
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "pcCookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "_token"
      }
    }
  }
}
