fix: some api bug

This commit is contained in:
wwweww
2026-03-31 22:12:06 +08:00
parent c5ff4f0216
commit e7970ac25f
219 changed files with 16195 additions and 2126 deletions
+95
View File
@@ -0,0 +1,95 @@
{
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0",
"info": {
"title": "文件服务",
"version": "v1"
},
"basePath": "/",
"paths": {
"/api/v1/files/{fileId}": {
"get": {
"produces": [
"application/json"
],
"schemes": [
"https"
],
"summary": "文件获取接口 (如果是私有文件,通过此接口获取或重定向)",
"operationId": "fileGetFile",
"parameters": [
{
"type": "string",
"name": "fileId",
"in": "path",
"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-03-26 17:05:36",
"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.9.2"
}