Files
juwan-backend/desc/api/docs/objectstory-api.json

95 lines
2.1 KiB
JSON

{
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0",
"info": {
"title": "文件服务",
"version": "v1"
},
"basePath": "/",
"paths": {
"/api/v1/files": {
"get": {
"produces": [
"application/json"
],
"schemes": [
"https"
],
"summary": "文件获取接口 (如果是私有文件,通过此接口获取或重定向)",
"operationId": "fileGetFile",
"parameters": [
{
"type": "string",
"name": "key",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "",
"schema": {}
}
}
}
},
"/api/v1/upload": {
"post": {
"consumes": [
"application/x-www-form-urlencoded"
],
"produces": [
"application/json"
],
"schemes": [
"https"
],
"summary": "文件上传接口",
"operationId": "fileUpload",
"parameters": [
{
"enum": [
"avatar",
"chat",
"post",
"verification",
"dispute"
],
"type": "string",
"description": "文件类型限制",
"name": "type",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "",
"schema": {
"type": "object",
"properties": {
"url": {
"description": "返回 CDN 地址或访问地址",
"type": "string"
}
}
}
}
}
}
}
},
"x-date": "2026-04-22 22:30:27",
"x-description": "This is a goctl generated swagger file.",
"x-github": "https://github.com/zeromicro/go-zero",
"x-go-zero-doc": "https://go-zero.dev/",
"x-goctl-version": "1.10.1"
}